0.8.13.41: Require robustness

* Generate smarter loader-stubs for ASDF-modules, so that
               they can be REQUIRE'd even if ASDF:*CENTRAL-REGISTRY*
               is cleared by the user.
            * Correct INSTALL documentation: --core doesn't override
               SBCL_HOME if SBCL_HOME exists.
This commit is contained in:
Nikodemus Siivola 2004-08-08 12:32:04 +00:00
parent 0223ed57f7
commit 80f222325e
5 changed files with 38 additions and 11 deletions

10
INSTALL
View file

@ -39,7 +39,7 @@ INSTALLING SBCL
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".
@ -57,15 +57,17 @@ INSTALLING 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:

4
NEWS
View file

@ -9,6 +9,10 @@ changes in sbcl-0.8.14 relative to sbcl-0.8.13:
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.

View file

@ -17,12 +17,7 @@ export CC SBCL EXTRA_CFLAGS EXTRA_LDFLAGS
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))" \

26
contrib/asdf-stub.lisp Normal file
View file

@ -0,0 +1,26 @@
(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*)

View file

@ -17,4 +17,4 @@
;;; 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"