[Openmcl-devel] asdf

Gary Byers gb at clozure.com
Mon Feb 6 10:41:36 PST 2006



On Mon, 6 Feb 2006, Robert McAlpine wrote:

> What connects the version of asdf in the openmcl distribution directory to 
> the one that's loaded when I say ... (require 'asdf) and how do I point it 
> somewhere else?
>

REQUIRE in CL is a portable interface to non-portable functionality.

If the second (optional) argument to REQUIRE isn't provided and no
matching module name is on *MODULES*, OpenMCL will (by default) look
in the directories on CCL:*MODULE-SEARCH-PATH*, whose initial value
is:

(#P"ccl:bin;" #P"home:openmcl;modules;" #P"ccl:lib;" #P"ccl:library;"
         #P"ccl:examples;" #P"ccl:tools;")

Each of these directories is tried in order; if the directory contains
a file whose name matches the (downcased) module name and whose extension
is either the platform's fasl extension (.dfsl, .pfsl, .d64fsl ...) or
.lisp, that file is LOADed and REQUIRE considers the module to have been
provided.  (Note that on a case-sensitive file system, this scheme doesn't
make it easy to REQUIRE things whose implementation is in a file with any
upper-case characters in its filename component.)

So,

? (require "ASDF")

ordinarily finds a match in "ccl:tools;asdf.dfsl" on 32-bit Darwin,
and if your home directory contained a directory named "modules"
inside a directory named "openmcl", that directory would be searched
before "ccl:tools;" was.

One can also extend REQUIRE's behavior by adding
functions/function-names to the list CCL:*MODULE-PROVIDER-FUNCTIONS*.
Functions on this list should take one argument (a module name) and,
after doing something arbitrary, should return non-NIL if they want
REQUIRE to consider the "module" to have been found and provided.

The one entry on CCL:*MODULE-PROVIDER-FUNCTIONS* by default is a
symbol that names the traditional function that looks in the
*MODULE-SEARCH-PATHS* directories.




More information about the Openmcl-devel mailing list