mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Remove use of sbcl_pwd in contrib building.
Building the contribs doesn't need an absolute pathname for the source tree; a relative pathname will do. (Further, calling the environment variable SBCL_PWD is peculiarly misleading in this context, since it's not the PWD of most processes involved in make-target-contrib.sh; instead, it's a constant name for the top-level source directory. In the hope of maximal clarity, renamed the environment variable to SBCL_TOP, and SBCL-TOP in Lisp.)
This commit is contained in:
parent
d72399d2f5
commit
7ac4f3d9e0
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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")))
|
||||
|
|
|
|||
|
|
@ -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 "$@"))' </dev/null
|
||||
$(SBCL) --eval $(FROB_READTABLE) --eval '(compile-file #p"SYS:CONTRIB;ASDF;UIOP.LISP" :print nil :output-file (merge-pathnames (parse-native-namestring "$@")))' </dev/null
|
||||
|
||||
$(ASDF_FASL):: asdf.lisp ../../output/sbcl.core $(UIOP_FASL)
|
||||
if [ -d asdf-upstream ] ; then rm -rf asdf-upstream ; fi
|
||||
mkdir -p $(DEST)
|
||||
$(SBCL) --eval $(FROB_READTABLE) --eval '(compile-file #p"SYS:CONTRIB;ASDF;ASDF.LISP" :print nil :output-file (parse-native-namestring "$@"))' </dev/null
|
||||
$(SBCL) --eval $(FROB_READTABLE) --eval '(compile-file #p"SYS:CONTRIB;ASDF;ASDF.LISP" :print nil :output-file (merge-pathnames (parse-native-namestring "$@")))' </dev/null
|
||||
|
||||
install::
|
||||
cp $(FASL) "$(BUILD_ROOT)$(INSTALL_DIR)"
|
||||
|
|
|
|||
|
|
@ -120,12 +120,12 @@ done
|
|||
|
||||
# installing contrib
|
||||
|
||||
. ./sbcl-pwd.sh
|
||||
sbcl_pwd
|
||||
# See make-target-contrib.sh for this variable.
|
||||
SBCL_TOP="../../"
|
||||
|
||||
SBCL="$SBCL_PWD/src/runtime/sbcl --noinform --core $SBCL_PWD/output/sbcl.core --no-userinit --no-sysinit --disable-debugger"
|
||||
SBCL="$SBCL_TOP/src/runtime/sbcl --noinform --core $SBCL_TOP/output/sbcl.core --no-userinit --no-sysinit --disable-debugger"
|
||||
SBCL_BUILDING_CONTRIB=1
|
||||
export SBCL SBCL_BUILDING_CONTRIB SBCL_PWD
|
||||
export SBCL SBCL_BUILDING_CONTRIB SBCL_TOP
|
||||
|
||||
. ./find-gnumake.sh
|
||||
find_gnumake
|
||||
|
|
|
|||
|
|
@ -35,16 +35,17 @@ export CC LANG LC_ALL
|
|||
# Load our build configuration
|
||||
. output/build-config
|
||||
|
||||
. ./sbcl-pwd.sh
|
||||
sbcl_pwd
|
||||
## All programs spawned by make-target-contrib.sh that use this
|
||||
## variable or anything derived from it are started with CWD
|
||||
## contrib/<contrib_name>/. 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue