0.8.2.7:
authorChristophe Rhodes <csr21@cam.ac.uk>
Mon, 28 Jul 2003 08:10:32 +0000 (08:10 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Mon, 28 Jul 2003 08:10:32 +0000 (08:10 +0000)
Improvements to build technology inspired by Nikodemus Siivola
(sbcl-devel 2003-07-20):
... centralize GNU Make finding functionality, and use it
everywhere;
... remove bashism from slam.sh.

find-gnumake.sh [new file with mode: 0644]
install.sh
make.sh
slam.sh
version.lisp-expr

diff --git a/find-gnumake.sh b/find-gnumake.sh
new file mode 100644 (file)
index 0000000..c4186fe
--- /dev/null
@@ -0,0 +1,19 @@
+# Not a shell script, but something intended to be sourced from shell scripts
+find_gnumake() {
+  # 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
+  elif [ "GNU Make" = "`make -v | head -n 1 | cut -b 0-8`" ]; then
+    GNUMAKE=make
+  else
+    echo "GNU Make not found. Try setting the environment variable GNUMAKE."
+    exit 1
+  fi
+  export GNUMAKE
+  echo "//GNUMAKE=\"$GNUMAKE\""
+}
index 4f93837..dee7db4 100644 (file)
@@ -41,10 +41,12 @@ SBCL="`pwd`/src/runtime/sbcl --noinform --core `pwd`/output/sbcl.core --userinit
 SBCL_BUILDING_CONTRIB=1
 export SBCL SBCL_BUILDING_CONTRIB
 
-gnumake=${GNUMAKE:-gmake}
+. ./find-gnumake.sh
+find_gnumake
+
 for i in contrib/*; do
     test -d $i && test -f $i/test-passed || continue;
     INSTALL_DIR=$SBCL_HOME/`basename $i `
     export INSTALL_DIR
-    ensure_dirs $INSTALL_DIR && $gnumake -C $i install
+    ensure_dirs $INSTALL_DIR && $GNUMAKE -C $i install
 done
diff --git a/make.sh b/make.sh
index cc2aa0f..284d240 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -62,24 +62,8 @@ 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
-elif [ "GNU Make" = "`make -v | head -n 1 | cut -b 0-8`" ]; then
-  GNUMAKE=make
-else
-  echo "GNU Make not found. Try setting the environment variable GNUMAKE."
-  exit 1
-fi
-
-export GNUMAKE
-echo //GNUMAKE=\"$GNUMAKE\"
-
+. ./find-gnumake.sh
+find_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
diff --git a/slam.sh b/slam.sh
index 632672b..95a3194 100644 (file)
--- a/slam.sh
+++ b/slam.sh
@@ -96,11 +96,15 @@ case "$HOST_TYPE" in
            exit 1
 esac
 
-export SBCL_XC_HOST="$LISP $INIT"
+SBCL_XC_HOST="$LISP $INIT"
+export SBCL_XC_HOST
 
 # (We don't do make-host-1.sh at all. Hopefully nothing relevant has
 # changed.)
 
+. ./find-gnumake.sh
+find_gnumake
+
 sh make-target-1.sh || exit 1
 
 # Instead of doing the full make-host-2.sh, we (1) use after-xc.core
index d6b764d..4ce0253 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.8.2.6"
+"0.8.2.7"