0.6.12.6:
[sbcl.git] / make-config.sh
index 85eaea1..c157609 100644 (file)
@@ -20,12 +20,15 @@ echo //entering make-config.sh
 
 ltf=`pwd`/local-target-features.lisp-expr
 echo //initializing $ltf
-echo '; This is a machine-generated file and should not be edited by hand.' > $ltf
+echo ';;;; This is a machine-generated file.' > $ltf
+echo ';;;; Please do not edit it by hand.' > $ltf
+echo ';;;; See make-config.sh.' > $ltf
 echo -n '(' >> $ltf
 
-echo '//setting up "target"-named symlinks to designate target architecture'
-sbcl_arch=x86 # (the only possibility supported, at least as of sbcl-0.6.7)
-echo -n ":x86" >> $ltf # (again, the only possibility supported)
+echo //setting up CPU-architecture-dependent information
+# Currently supported: x86 alpha
+sbcl_arch=${SBCL_ARCH:-x86}
+echo -n ":$sbcl_arch" >> $ltf 
 for d in src/compiler src/assembly; do
     echo //setting up symlink $d/target
     original_dir=`pwd`
@@ -51,15 +54,15 @@ cd src/runtime/
 rm -f Config
 if [ `uname` = Linux ]; then
     echo -n ' :linux' >> $ltf
-    ln -s Config.x86-linux Config
+    ln -s Config.$sbcl_arch-linux Config
 elif uname | grep BSD; then
     echo -n ' :bsd' >> $ltf
     if [ `uname` = FreeBSD ]; then
        echo -n ' :freebsd' >> $ltf
-       ln -s Config.x86-freebsd Config
+       ln -s Config.$sbcl_arch-freebsd Config
     elif [ `uname` = OpenBSD ]; then
        echo -n ' :openbsd' >> $ltf
-       ln -s Config.x86-openbsd Config
+       ln -s Config.$sbcl_arch-openbsd Config
     else
        echo unsupported BSD variant: `uname`
        exit 1