First we check the two extremes, then if the situation isn't at either
extreme we divide the middle:
To check whether ASDF is already loaded and available for
use, start up your Common LIsp environment, and type:
(POSITION :ASDF *FEATURES*)
If it comes back with a number, ASDF is listed among the
features available, hence presumably it's actually loaded.
(We might do a more detailed check later to see if somebody
is trying to fool us, but for now the presence in the
features list is good enough.)
If it comes back NIL, then ASDF definitely isn't loaded, and
we check the other extreme next.
As an ordinary user, there's no way to determine whether a file is
on the disk in some inaccessible location, so the best we can do is to
check whether the file is on the local disk and accessible, so
we're not checking the absolute extreme per se, we're checking the
combination of not-on-disk and on-disk-but-not-accessible together.
If the program 'locate' is available on your Unix or Linux system,
go to the shell (if you're not already there) and type:
locate asdf.lisp
If it finds a file by that name, check the size by using the ls -l
command on the file name, and if it's about 40k bytes in size then
it might the correct file, but before assuming so you should perform
one extra check by looking at the top of the file, which should
look something like this:
(defvar *asdf-revision* (let* ((v "1.87") (colon (or (position #\: v) -1)) (dot (position #\. v)))If it's the correct size and starts correctly, it's probably the correct file, and you should copy the complete path and filename for future reference.
Now consider the cases between the extremes,
where asdf.lisp is on the
local disk in an accessible location (as shown by good results
from locate and appropriate size and appropriate starting
text), but is not already loaded into your Common Lisp
environment (as shown by NIL return from the call to position
of ASDF within *features*).
Get back into your Common Lisp enviroment and type:
(require :asdf)
If it complains something like:
"modules:asdf" does not exist.
then it means that your Common Lisp environment doesn't know
where to find the file that the locate command found,
so you will need to find another way to load the file.
But if it returns a value like:
("ASDF")
then it means the location is known and you have now reduced the
situation to where it's already loaded. To verify that fact,
re-try this command:
(POSITION :ASDF *FEATURES*)
and expect it to return a number, probably 0 because it's the most
recently-loaded module, hence the most recently added feature.
If the previous attempt failed, indicating that the file is on the
disk in an accessible place, but the location is not known to
the module-loading facility of your Common Lisp environment,
then you will need to manually load the file. Earlier you
copied the path and filename, and here you'll use it.
Start up the Common Lisp environment if not already started,
and type:
(load #P"...path...asdf.lisp")
This ought to load the file, which should result in
ASDF being listed among the features. To verify this,
re-try (POSITION :ASDF *FEATURES*),
which should now return some integer, usually 0.
At this point you know the ASDF situation in regard to the particular Common Lisp environment you're using on some particular computer system. If the file is present and accessible, you know how to load it into the Common Lisp environment if it isn't already loaded by default. The only case that remains is where the file doesn't exist in any accessible location you can find on the computer system, so you need to download it from a Web site before you can load it.
STUB: THESE INSTRUCTIONS NOT WRITTEN HERE. THE URL MIGHT BE http://cclan.cvs.sourceforge.net/*checkout*/cclan/asdf/asdf.lisp BUT I NEED TO ACTUALLY TRY DOWNLOADING THAT FILE MYSELF AND THEN LOADING IT INTO CMUCL BEFORE I'LL FORMALLY WRITE THE DETAILS HERE. .