Next: , Previous: , Up: libutils file-system   [Index]


7.8.3 Library search paths

The following bindings are exported by the library (vicare libraries).

Parameter: library-binary-search-path

Hold a list of strings representing relative or absolute directory pathnames; the strings must represent syntactically valid pathname specifications, but the directories might not exist. The list is used as search path for binary libraries serialised in FASL files, iterating from head to tail.

Files in the binary search path have pathnames formed by appending a binary library file extension to the library stem and prepending a directory from the search path to the result. Such pathnames can be constructed as follows:

(define dir-pathname
  (car (library-binary-search-path)))

(define libstem
  (library-reference->filename-stem ?libref))

(define binary-pathname
  (directory+library-stem->library-binary-pathname
     dir-pathname libstem))

The value of the parameter library-binary-search-path is composed as follows:

  1. The parameter is initialised to a list of directory pathnames built at package configuration time; the list contains:
    $(libdir)/vicare-scheme
    

    on 64-bit GNU+Linux systems, it is usually:

    /usr/local/lib64/vicare-scheme
    

    and on 32-bit GNU+Linux systems:

    /usr/local/lib/vicare-scheme
    
  2. At the beginning of execution Vicare consults the environment variable VICARE_LIBRARY_PATH; when set, it is expected to hold a colon separated list of directory pathnames, in Unix–style. The list is parsed and the directories are pepended, in the given order, in library-binary-search-path.
  3. If the option -L or --library-path is present on the command line one or more time: every option’s value is expected to be a string representing a directory pathname. Such pathnames are prepended, in the given order, to library-binary-search-path.
  4. While vicare is running: we can modify at will the content of library-binary-search-path.
Parameter: library-source-search-path

Hold a list of strings representing relative or absolute directory pathnames; the strings must represent syntactically valid pathname specifications, but the directories might not exist. The list is used as search path for source libraries stored in text files (in ASCII or UTF-8 format), iterating from head to tail.

Files in the source search path have pathnames formed by appending a source library file extension to the library stem and prepending a directory from the search path to the result. Such pathnames can be constructed as follows:

(define dir-pathname
  (car (library-binary-search-path)))

(define libstem
  (library-name->filename-stem ?libname))

(define source-pathname
  (directory+library-stem->library-source-pathname
     dir-pathname libstem))

The value of the parameter library-source-search-path is composed as follows:

  1. The parameter is initialised to the empty list.
  2. At the beginning of execution, Vicare consults the environment variable VICARE_SOURCE_PATH; when set, it is expected to hold a colon separated list of directory pathnames, in Unix–style. The list is parsed and the directories are prepended, in the given order, to library-source-search-path.
  3. If the option --source-path is present on the command line one or more time: every option’s value is expected to be a string representing a directory pathname. Such pathnames are prepended, in the given order, to library-source-search-path.
  4. While vicare is running: we can modify at will the content of library-source-search-path.

Next: , Previous: , Up: libutils file-system   [Index]