0.8alpha.0.32:
authorChristophe Rhodes <csr21@cam.ac.uk>
Fri, 16 May 2003 11:37:09 +0000 (11:37 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Fri, 16 May 2003 11:37:09 +0000 (11:37 +0000)
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
make-target-1.sh
make-target-contrib.sh
make.sh
src/cold/warm.lisp
version.lisp-expr

index 9c2a5ba..30d346a 100644 (file)
@@ -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.
index a085104..4c62246 100644 (file)
 
 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
index 3095bc4..98526b3 100644 (file)
@@ -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 (executable)
--- 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=<whatever> 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
index 455e932..0015e82 100644 (file)
 
   (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))))))
 \f
 ;;;; setting package documentation
 
index 1ea252d..bb739c4 100644 (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.8alpha.0.31"
+"0.8alpha.0.32"