From df679ed627975948b1cee190f4d79c397588c43e Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Fri, 16 May 2003 11:37:09 +0000 Subject: [PATCH] 0.8alpha.0.32: Improvements in build technology: ... detect and choose GNUMAKE earlier, once and only once. ... provide recompile and use-anyway restarts for warm load. --- make-config.sh | 3 +-- make-target-1.sh | 27 ++++----------------------- make-target-contrib.sh | 4 +--- make.sh | 28 +++++++++++++++++++++++++++- src/cold/warm.lisp | 43 ++++++++++++++++++++++++++++++++----------- version.lisp-expr | 2 +- 6 files changed, 66 insertions(+), 41 deletions(-) diff --git a/make-config.sh b/make-config.sh index 9c2a5ba..30d346a 100644 --- a/make-config.sh +++ b/make-config.sh @@ -66,8 +66,7 @@ if [ "$sbcl_arch" = "x86" ] ; then elif [ "$sbcl_arch" = "mips" ] ; then # Use a little C program to try to guess the endianness. Ware # cross-compilers! - gnumake=${GNUMAKE:-gmake} - $gnumake -C tools-for-build determine-endianness + $GNUMAKE -C tools-for-build determine-endianness tools-for-build/determine-endianness >> $ltf else # Nothing need be done in this case, but sh syntax wants a placeholder. diff --git a/make-target-1.sh b/make-target-1.sh index a085104..4c62246 100644 --- a/make-target-1.sh +++ b/make-target-1.sh @@ -15,25 +15,6 @@ echo //entering make-target-1.sh -# the GNU dialect of "make" -- easier to find or port it than to -# try to figure out how to port to the local dialect... -if [ "$GNUMAKE" != "" ] ; then - # The user is evidently trying to tell us something. - gnumake="$GNUMAKE" -elif [ -x "`which gmake`" ] ; then - # "gmake" is the preferred name in *BSD. - gnumake=gmake -else - # All the world's a Linux, and all its users weary of cautious - # BSDish worries that "make" might not be GNU make; and at this - # point we've already spent quite a while in make-host-1.sh, so - # they're naturally unamused when we bail out complaining we don't - # know where GNU make is. So since it's not really any worse to guess - # wrong here than to fail by not trying, just guess that "make" is - # GNU make and hope for the best. - gnumake=make -fi - # Build the runtime system and symbol table (.nm) file. # # (This C build has to come after the first genesis in order to get @@ -43,14 +24,14 @@ fi # doesn't matter.) echo //building runtime system and symbol table file cd src/runtime -$gnumake clean || exit 1 -$gnumake depend || exit 1 -$gnumake all || exit 1 +$GNUMAKE clean || exit 1 +$GNUMAKE depend || exit 1 +$GNUMAKE all || exit 1 cd ../.. # Use a little C program to grab stuff from the C header files and # smash it into Lisp source code. cd tools-for-build -$gnumake grovel_headers || exit 1 +$GNUMAKE grovel_headers || exit 1 cd .. tools-for-build/grovel_headers > output/stuff-groveled-from-headers.lisp diff --git a/make-target-contrib.sh b/make-target-contrib.sh index 3095bc4..98526b3 100644 --- a/make-target-contrib.sh +++ b/make-target-contrib.sh @@ -24,8 +24,6 @@ SBCL="`pwd`/src/runtime/sbcl --noinform --core `pwd`/output/sbcl.core --userinit SBCL_BUILDING_CONTRIB=1 export SBCL SBCL_BUILDING_CONTRIB -gnumake=${GNUMAKE:-gmake} - mkdir -p contrib/systems rm -f contrib/systems/* @@ -37,5 +35,5 @@ for i in contrib/*; do test -d $i && test -f $i/Makefile || continue; # export INSTALL_DIR=$SBCL_HOME/`basename $i ` test -f $i/test-passed && rm $i/test-passed - $gnumake -C $i test && touch $i/test-passed + $GNUMAKE -C $i test && touch $i/test-passed done diff --git a/make.sh b/make.sh index 8ba89c0..b3b47fa 100755 --- a/make.sh +++ b/make.sh @@ -37,6 +37,8 @@ # when you have weird things in your .cmucl-init file # "openmcl --batch" # to use an OpenMCL binary as a cross-compilation host +# "clisp" +# to use a CLISP binary as a cross-compilation host # # FIXME: Make a more sophisticated command line parser, probably # accepting "sh make.sh --xc-host foolisp" instead of the @@ -60,6 +62,29 @@ SBCL_XC_HOST="${1:-sbcl --noprogrammer}" export SBCL_XC_HOST echo //SBCL_XC_HOST=\"$SBCL_XC_HOST\" +# the GNU dialect of "make" -- easier to find or port it than to +# try to figure out how to port to the local dialect... +if [ "$GNUMAKE" != "" ] ; then + # The user is evidently trying to tell us something. + GNUMAKE="$GNUMAKE" +elif [ -x "`which gmake`" ] ; then + # "gmake" is the preferred name in *BSD. + GNUMAKE=gmake +else + # FIXME: Now that we do this early, maybe prompt the user rather + # than guessing? I'd still be annoyed, though... -- CSR, + # 2003-05-16. + # + # All the world's a Linux, and all its users weary of cautious + # BSDish worries that "make" might not be GNU make; so just guess + # that "make" is GNU make and hope for the best. + GNUMAKE=make +fi + +export GNUMAKE +echo //GNUMAKE=\"$GNUMAKE\" + + # If you're cross-compiling, you should probably just walk through the # make-config.sh script by hand doing the right thing on both the host # and target machines. @@ -77,7 +102,8 @@ sh make-config.sh || exit 1 # identify the target architecture). # On the host system: # SBCL_XC_HOST= sh make-host-1.sh -# Copy src/runtime/sbcl.h from the host system to the target system. +# Copy src/runtime/genesis/*.h from the host system to the target +# system. # On the target system: # sh make-target-1.sh # Copy src/runtime/sbcl.nm and output/stuff-groveled-from-headers.lisp diff --git a/src/cold/warm.lisp b/src/cold/warm.lisp index 455e932..0015e82 100644 --- a/src/cold/warm.lisp +++ b/src/cold/warm.lisp @@ -162,17 +162,38 @@ (let ((fullname (concatenate 'string stem ".lisp"))) (sb-int:/show "about to compile" fullname) - (multiple-value-bind - (compiled-truename compilation-warnings-p compilation-failure-p) - (compile-file fullname) - (declare (ignore compilation-warnings-p)) - (sb-int:/show "done compiling" fullname) - (cond (compilation-failure-p - (error "COMPILE-FILE of ~S failed." fullname)) - (t - (unless (load compiled-truename) - (error "LOAD of ~S failed." compiled-truename)) - (sb-int:/show "done loading" compiled-truename)))))) + (flet ((report-recompile-restart (stream) + (format stream "Recompile file ~S" src)) + (report-continue-restart (stream) + (format stream "Continue, using possibly bogus file ~S" obj))) + (tagbody + retry-compile-file + (multiple-value-bind (output-truename warnings-p failure-p) + (compile-file fullname) + (declare (ignore warnings-p)) + (sb-int:/show "done compiling" fullname) + (cond ((not output-truename) + (error "COMPILE-FILE of ~S failed." src)) + (failure-p + (unwind-protect + (restart-case + (error "FAILURE-P was set when creating ~S." + obj) + (recompile () + :report report-recompile-restart + (go retry-compile-file)) + (continue () + :report report-continue-restart + (setf failure-p nil))) + ;; Don't leave failed object files lying around. + (when (and failure-p (probe-file output-truename)) + (delete-file output-truename) + (format t "~&deleted ~S~%" output-truename)))) + ;; Otherwise: success, just fall through. + (t nil)) + (unless (load output-truename) + (error "LOAD of ~S failed." output-truename)) + (sb-int:/show "done loading" compiled-truename)))))) ;;;; setting package documentation diff --git a/version.lisp-expr b/version.lisp-expr index 1ea252d..bb739c4 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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.8alpha.0.31" +"0.8alpha.0.32" -- 1.7.10.4