Tweak slam.sh to be slightly more configurable regarding the host binary
authorDavid Lichteblau <david@lichteblau.com>
Tue, 12 Jul 2011 09:15:31 +0000 (11:15 +0200)
committerDavid Lichteblau <david@lichteblau.com>
Tue, 11 Sep 2012 12:56:35 +0000 (14:56 +0200)
Developers building with an existing SBCL as a host, which is not
installed as "sbcl" in the path, or which needs a --core option, can
now set XC_LISP and XC_CORE prior to invoking slam.sh.  Previously,
such a host could only be used with slam.sh after custom
modifications to the script.

The default behaviour is unchanged.

slam.sh

diff --git a/slam.sh b/slam.sh
index 63108f3..202c8aa 100644 (file)
--- a/slam.sh
+++ b/slam.sh
@@ -79,7 +79,7 @@ case "$HOST_TYPE" in
            INIT="-noinit"
            CORE="-core"
            ;;
-    sbcl)  LISP="sbcl"
+    sbcl)  LISP="${XC_LISP:-sbcl}"
            INIT="--no-sysinit --no-userinit"
            CORE="--core"
            ;;
@@ -97,7 +97,7 @@ case "$HOST_TYPE" in
            exit 1
 esac
 
-SBCL_XC_HOST="$LISP $INIT"
+SBCL_XC_HOST="$LISP ${XC_CORE:+$CORE $XC_CORE} $INIT"
 export SBCL_XC_HOST
 
 # (We don't do make-host-1.sh at all. Hopefully nothing relevant has