The SBCL runtime needs to be able to find the ancillary files
associated with it: the "sbcl.core" file, and the contrib modules.
- This can happen in three ways:
+ Finding core can happen in three ways:
1. By default, in a location configured when the system was built.
For binary distributions this is in "/usr/local/lib/sbcl".
$ sbcl --core /foo/bar/sbcl.core
- When using this option contrib modules are looked for in the
- directory where the designated core resides, and in "SBCL_HOME".
-
The usual, recommended approach is method #1. Method #2 is useful if
you're installing SBCL on a system in a non-standard location
(e.g. in your user account), instead of installing SBCL on an entire
system. Method #3 is mostly useful for testing or other special
cases.
+ Contributed modules are primarily looked for in "SBCL_HOME", or the
+ directory the core resides in if "SBCL_HOME" is not set.
+ ASDF:*CENTRAL-REGISTRY* serves as an additional fallback for
+ ASDF-based modules.
+
1.3. Anatomy of SBCL
The two files that SBCL needs to run, at minimum, are:
work for CMUCL)
* documentation: networking interface SB-BSD-SOCKETS' documentation
has been integrated into the user manual.
+ * bug fix: SBCL can now load its contributed modules with REQUIRE
+ even if the system-provided entries have been removed from
+ ASDF:*CENTRAL-REGISTRY*. Infinite recursion in REQUIRE is also
+ detected.
* bug fix: backtraces involving undefined functions or assembly
routines are more informative. (thanks to Brian Downing)
* bug fix: mutually referent alien structures now work correctly.
all: $(EXTRA_ALL_TARGETS)
$(MAKE) -C ../asdf
- $(SBCL) --eval '(load "../asdf/asdf")' \
- --eval "(setf asdf::*central-registry* '((MERGE-PATHNAMES \"systems/\" (TRUENAME (SB-EXT:POSIX-GETENV \"SBCL_HOME\")))))" \
- --eval "(push :sb-building-contrib *features*)" \
- --eval "(asdf:operate 'asdf:load-op :$(SYSTEM))" \
- --eval "(progn (when (probe-file \"$(SYSTEM).fasl\") (error \"fasl file exists\")) (with-open-file (s \"$(SYSTEM).lisp\" :direction :output :if-exists :error) (print (quote (require :asdf)) s) (print (quote (require :$(SYSTEM))) s)) (compile-file \"$(SYSTEM).lisp\") (delete-file \"$(SYSTEM).lisp\"))" \
- --eval "(quit)"
+ $(SBCL) --eval '(defvar *system* "$(SYSTEM)")' --load ../asdf-stub.lisp --eval '(quit)'
test: all
echo "(asdf:operate (quote asdf:load-op) :$(SYSTEM))" \
--- /dev/null
+(load "../asdf/asdf")
+
+(setf asdf::*central-registry*
+ '((merge-pathnames "systems/" (truename (sb-ext:posix-getenv "SBCL_HOME")))))
+(push :sb-building-contrib *features*)
+(asdf:operate 'asdf:load-op *system*)
+
+(defvar *system-stub* (make-pathname :name *system* :type "lisp"))
+
+(when (probe-file (compile-file-pathname *system-stub*))
+ (error "fasl file exists"))
+
+(with-open-file (s *system-stub* :direction :output :if-exists :error)
+ (print '(unless (member "ASDF" *modules* :test #'string=)
+ (load (merge-pathnames "asdf/asdf.fasl" (truename (sb-ext:posix-getenv "SBCL_HOME")))))
+ s)
+ ;; This addition to *central-registry* allows us to find contribs
+ ;; even if the user has frobbed the original contents.
+ (print `(let ((asdf:*central-registry* (cons (merge-pathnames "systems/"
+ (truename (sb-ext:posix-getenv "SBCL_HOME")))
+ asdf:*central-registry*)))
+ (asdf::module-provide-asdf ,*system*))
+ s))
+
+(compile-file *system-stub*)
+(delete-file *system-stub*)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.13.40"
+"0.8.13.41"