diff --git a/contrib/asdf-module.mk b/contrib/asdf-module.mk index 97b1f341b..498f71428 100644 --- a/contrib/asdf-module.mk +++ b/contrib/asdf-module.mk @@ -6,7 +6,7 @@ # ones as dependencies. UNAME:=$(shell uname -s) -DEST=$(SBCL_PWD)/obj/sbcl-home/contrib/ +DEST=$(SBCL_TOP)/obj/sbcl-home/contrib/ FASL=$(DEST)/$(SYSTEM).fasl ASD=$(DEST)/$(SYSTEM).asd diff --git a/contrib/asdf-stub.lisp b/contrib/asdf-stub.lisp index 754eeb1b4..c6da6cc6f 100644 --- a/contrib/asdf-stub.lisp +++ b/contrib/asdf-stub.lisp @@ -14,9 +14,9 @@ sb-ext::(declaim (unmuffle-conditions sb-kernel:redefinition-warning)) (defun setup-asdf-contrib () ;;(setf *resolve-symlinks* nil) - (let* ((sbcl-pwd (getenv-pathname "SBCL_PWD" :ensure-directory t)) - (src-contrib (subpathname sbcl-pwd "contrib/")) - (asdf-cache (subpathname sbcl-pwd "obj/asdf-cache/")) + (let* ((sbcl-top (merge-pathnames (getenv-pathname "SBCL_TOP" :ensure-directory t))) + (src-contrib (subpathname sbcl-top "contrib/")) + (asdf-cache (subpathname sbcl-top "obj/asdf-cache/")) (source-registry '(:source-registry :ignore-inherited-configuration)) (output-translations `(:output-translations (,(namestring src-contrib) ,(namestring asdf-cache)) @@ -49,9 +49,9 @@ sb-ext::(declaim (unmuffle-conditions sb-kernel:redefinition-warning)) (append '(:sb-building-contrib) sb-impl:+internal-features+ *features*)) (setup-asdf-contrib) (let* ((name (string-downcase system)) - (sbcl-pwd (getenv-pathname "SBCL_PWD" :ensure-directory t)) - (out-contrib (subpathname sbcl-pwd "obj/sbcl-home/contrib/")) - (cache-module (subpathname sbcl-pwd (format nil "obj/asdf-cache/~a/" name))) + (sbcl-top (merge-pathnames (getenv-pathname "SBCL_TOP" :ensure-directory t))) + (out-contrib (subpathname sbcl-top "obj/sbcl-home/contrib/")) + (cache-module (subpathname sbcl-top (format nil "obj/asdf-cache/~a/" name))) (system (find-system name)) (system.fasl (output-file 'compile-bundle-op system)) (module.fasl (subpathname out-contrib (strcat name ".fasl"))) diff --git a/contrib/asdf/Makefile b/contrib/asdf/Makefile index 1fd4a3b1b..a641122cd 100644 --- a/contrib/asdf/Makefile +++ b/contrib/asdf/Makefile @@ -1,4 +1,4 @@ -DEST=$(SBCL_PWD)/obj/sbcl-home/contrib/ +DEST=$(SBCL_TOP)/obj/sbcl-home/contrib/ ASDF_FASL=$(DEST)/asdf.fasl UIOP_FASL=$(DEST)/uiop.fasl FASL=$(UIOP_FASL) $(ASDF_FASL) @@ -7,12 +7,12 @@ FROB_READTABLE='(setf (sb-ext:readtable-base-char-preference *readtable*) :both) fasl:: $(UIOP_FASL) $(ASDF_FASL) $(UIOP_FASL):: uiop.lisp ../../output/sbcl.core mkdir -p $(DEST) - $(SBCL) --eval $(FROB_READTABLE) --eval '(compile-file #p"SYS:CONTRIB;ASDF;UIOP.LISP" :print nil :output-file (parse-native-namestring "$@"))' /. Keeping this a relative pathname to the +## toplevel source directory makes the shell and make portions of the +## build system robust against funny stuff in PWD. +SBCL_TOP="../../" -SBCL_HOME="$SBCL_PWD/obj/sbcl-home" -export SBCL_HOME SBCL_PWD -if [ "$OSTYPE" = "cygwin" ] ; then - SBCL_PWD=`echo $SBCL_PWD | sed s/\ /\\\\\\\\\ /g` -fi +SBCL_HOME="$SBCL_TOP/obj/sbcl-home" +export SBCL_HOME SBCL_TOP -SBCL="$SBCL_PWD/src/runtime/sbcl --noinform --core $SBCL_PWD/output/sbcl.core \ +SBCL="$SBCL_TOP/src/runtime/sbcl --noinform --core $SBCL_TOP/output/sbcl.core \ --lose-on-corruption --disable-debugger --no-sysinit --no-userinit" SBCL_BUILDING_CONTRIB=1 export SBCL SBCL_BUILDING_CONTRIB