Previous: using libraries compiling lib, Up: using libraries compiling [Index]
This library compilation strategy is implemented by a proper execution
mode of Vicare enabled by the command line option
--compile-dependencies of vicare
; when using this
mode the command line option --output is ignored. In
this mode:
compiled-library-build-directory
; all the
libraries loaded from a FASL file are left untouched.
Let’s say we have the libraries:
(alpha beta (1 0)) (alpha gamma (1 2))
in the files:
$(srcdir)/lib/alpha/beta.sls $(srcdir)/lib/alpha/gamma.sls
and we want to compile them to:
$(builddir)/lib/alpha/beta.fasl $(builddir)/lib/alpha/gamma.fasl
we prepare a Scheme script for this purpose, containing the required
import
forms:
;; compile-all.sps -- ;; (import (only (alpha beta)) (only (alpha beta))) ;;; end of file
and we execute it as follows:
vicare \ --source-path $(srcdir)/lib \ --build-directory $(builddir)/lib \ --compile-dependencies compile-all.sps
if the option --library-locator is not used: using --compile-dependencies will automatically select the compile–time library locator.
If a selected library depends on the other selected library:
Vicare will automatically take care of generating the
appropriate binary formats. If a selected library depends on other
libraries, not explicitly selected by the script: Vicare will
automatically take care of generating the appropriate binary formats and
FASL files in the selected compiled-library-build-directory
.
Previous: using libraries compiling lib, Up: using libraries compiling [Index]