Next: using libraries compiling deps, 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-library of vicare
. In this mode:
compiled-library-build-directory
.
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
we want to compile them to:
$(builddir)/lib/alpha/beta.fasl $(builddir)/lib/alpha/gamma.fasl
and (alpha gamma (1 2))
imports (alpha beta (1 0))
. We
have multiple options:
(alpha beta (1 0))
, we do:
vicare \ --compile-library $(srcdir)/lib/alpha/beta.sls \ --output $(builddir)/lib/alpha/beta.fasl
then, to compile (alpha gamma (1 2))
, we do:
vicare \ --build-directory $(builddir)/lib \ --compile-library $(srcdir)/lib/alpha/gamma.sls \ --output $(builddir)/lib/alpha/gamma.fasl
when the option --compile-library is used and no library locator is explicitly selected with the option --library-locator: the compile-time library locator is automatically selected.
(alpha beta (1 0))
, we do:
vicare \ --build-directory $(builddir)/lib \ --compile-library $(srcdir)/lib/alpha/beta.sls
then, to compile (alpha gamma (1 2))
, we do:
vicare \ --build-directory $(builddir)/lib \ --compile-library $(srcdir)/lib/alpha/gamma.sls
This compilation strategy is useful when compiling a “big” number of libraries with a traditional Makefile:
To use this strategy effectively we need to write all the compilation commands, correctly tracking the dependencies; this is tedious, but there are ways to automatically generate the needed commands.
Next: using libraries compiling deps, Up: using libraries compiling [Index]