From 22c1de0a40df83bb5628974010a879cb2c17ff53 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Mon, 28 Jul 2003 08:10:32 +0000 Subject: [PATCH] 0.8.2.7: 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 | 19 +++++++++++++++++++ install.sh | 6 ++++-- make.sh | 20 ++------------------ slam.sh | 6 +++++- version.lisp-expr | 2 +- 5 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 find-gnumake.sh diff --git a/find-gnumake.sh b/find-gnumake.sh new file mode 100644 index 0000000..c4186fe --- /dev/null +++ b/find-gnumake.sh @@ -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\"" +} diff --git a/install.sh b/install.sh index 4f93837..dee7db4 100644 --- a/install.sh +++ b/install.sh @@ -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 --- 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 --- 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 diff --git a/version.lisp-expr b/version.lisp-expr index d6b764d..4ce0253 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.8.2.6" +"0.8.2.7" -- 1.7.10.4