separate the load-compiled path from the load path
authorAndy Wingo <wingo@pobox.com>
Tue, 2 Jun 2009 20:18:02 +0000 (22:18 +0200)
committerAndy Wingo <wingo@pobox.com>
Wed, 3 Jun 2009 20:20:54 +0000 (22:20 +0200)
commit5b197db838ae12aae948eef92d79d1f37548bac4
treee041f1f33e58b5e6a5a406338f3b9541454ec73f
parent2f9ae9b1040e1b9339bb0bc8b0013a5346622c44
separate the load-compiled path from the load path

* libguile/Makefile.am (libpath.h): Add definitions for SCM_CCACHE_DIR
  and SCM_EFFECTIVE_VERSION. These are private, the header is not
  installed. Add ccachedir to build-info. Rework some other build-info
  definitions.

* libguile/load.c (scm_loc_load_compiled_path): New global, corresponding
  to the new environment variable, GUILE_LOAD_COMPILED_PATH. Compiled
  files will now be searched for in this path, and only in this path.
  (scm_init_load_path): Init the load-compiled path too. We initialize it
  with $pkglibdir/guile/$effective_version/ccache, and also with
  $HOME/.guile-ccache/$effective_version/. This will respect the
  libdir/datadir difference, and it is a preparation for automatic
  compilation support.
  (scm_primitive_load_path): Search only the GUILE_LOAD_COMPILED_PATH for
  compiled files.
  (scm_init_load): Cache scm_loc_load_compiled_path.
libguile/Makefile.am
libguile/load.c