Up: libutils compiling special   [Index]


7.10.1.1 The build directory

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

Parameter: compiled-libraries-build-directory

Hold #f or a string representing the absolute or relative pathname of a directory; the string must represent a syntactically valid pathname, but the directory might not exist. The build directory is meant to be used when compiling libraries in the build directory of a source package for later installation.

When the selected library locator is compile-time: the store directory is used to search for compiled libraries. It is an error if the library locator is compile-time and no build directory is selected.

Under the build directory: FASL files are stored with pathnames composed from the library stem, which is generated from the library name. For example, if the build directory is $(builddir)/lib the source library:

$(srcdir)/lib/vicare/posix.sls

is stored as:

$(builddir)/lib/vicare/posix.fasl

Such pathnames can be built as follows:

(define binary-pathname-0
  (library-name->library-binary-pathname-in-build-directory
    ?libname))

(define binary-pathname-1
  (library-reference->library-binary-pathname-in-build-directory
    ?libref))

The value of the parameter compiled-libraries-build-directory is composed as follows:

  1. The parameter is initialised to #f.
  2. If the environment variable VICARE_STORE_DIRECTORY is set and holding an valid directory pathname: select its value as parameter value; the directory itself might not exist.
  3. If the option --build-directory is present on the command line: its value is expected to be a string representing a directory pathname, otherwise an error is raised; the directory itself might not exist. Such pathname becomes the value of compiled-libraries-build-directory.
  4. While vicare is running: we can modify at will the content of compiled-libraries-build-directory.

Up: libutils compiling special   [Index]