add --fancy option to make.sh
authorNikodemus Siivola <nikodemus@random-state.net>
Fri, 2 Dec 2011 12:25:47 +0000 (14:25 +0200)
committerNikodemus Siivola <nikodemus@random-state.net>
Mon, 5 Dec 2011 08:23:56 +0000 (10:23 +0200)
  Enables threads, core compression, xref for internals, and
  after-xc-core. (The last one for convenience, even though it's not user
  visible.)

INSTALL
NEWS
make-config.sh

diff --git a/INSTALL b/INSTALL
index 3137709..631ec4c 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -172,21 +172,11 @@ INSTALLING SBCL
   enabling or disabling features like documentation strings, threads,
   or extra debugging code.
 
-  The preferred way to do this is by creating a file
-  "customize-target-features.lisp", containing a lambda expression
-  which is applied to the default *FEATURES* set and which returns the
-  new *FEATURES* set, e.g.
-
-    (lambda (features)
-      (flet ((enable (x)
-               (pushnew x features))
-             (disable (x)
-               (setf features (remove x features))))
-        ;; Threading support.
-        (enable :sb-thread)))
-
-  This is the preferred way because it lets local changes interact
-  cleanly with CVS changes to the main, global source tree.
+  The preferred way to do this is using commandline arguments to make.sh:
+
+    --fancy                    Enables all supported feature enhancements.
+    --with-<feature>           Enables a specific feature.
+    --without-<feature>        Disables a specific feature.
 
   Some features of interest:
 
@@ -195,17 +185,27 @@ INSTALLING SBCL
       available on x86[-64] Max OS X, x86[-64] FreeBSD, x86 Solaris,
       and PPC Linux.
 
-    :SB-UNICODE
-      Unicode support. Enabled by default. Disabling this feature
-      limits characters to the 8-bit ISO-8859-1 set.
+      NOTE: --fancy enables threads on all platforms where they can
+      be built, even if they aren't 100% stable on that platform.
+
+    :SB-CORE-COMPRESSION
+      Adds zlib as a build-dependency, and makes SBCL able to save
+      compressed cores. Not enabled by default.
 
     :SB-XREF-FOR-INTERNALS
       XREF data for SBCL internals. Not enabled by default, increases
       core size by 5-6mb.
 
+    :SB-UNICODE
+      Unicode support. Enabled by default. Disabling this feature
+      limits characters to the 8-bit ISO-8859-1 set.
+
   A catalog of available features and their meaning can be found in
   "base-target-features.lisp-expr".
 
+  Please do NOT edit base-target-features.lisp-expr in order to enable
+  or disable build features.
+
 2.3. Troubleshooting
 
   "GNU Make not found"
diff --git a/NEWS b/NEWS
index b702cea..60733ce 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 ;;;; -*- coding: utf-8; fill-column: 78 -*-
 changes relative to sbcl-1.0.54:
-  * enhancements to building SBCL:
+  * enhancements to building SBCL using make.sh:
+    ** --fancy can be specified to enable all supported feature enhancements.
     ** --with-<feature> and --without-<feature> can be used to specify
        which features to build with.
     ** --arch option can be used to specify the architecture to build for.
index 7b03394..75cb0c3 100644 (file)
@@ -45,6 +45,7 @@ bad_option() {
 WITH_FEATURES=""
 WITHOUT_FEATURES=""
 
+fancy=false
 some_options=false
 for option
 do
@@ -88,6 +89,11 @@ do
       --without)
         WITHOUT_FEATURES="$WITHOUT_FEATURES :$optarg"
        ;;
+      --fancy)
+        WITH_FEATURES="$WITH_FEATURES :sb-core-compression :sb-xref-for-internals :sb-after-xc-core"
+        # Lower down we add :sb-thread for platforms where it can be built.
+        fancy=true
+        ;;
       -*)
         bad_option "Unknown command-line option to $0: \"$option\""
         ;;
@@ -308,14 +314,6 @@ echo //entering make-config.sh
 echo //ensuring the existence of output/ directory
 if [ ! -d output ] ; then mkdir output; fi
 
-ltf=`pwd`/local-target-features.lisp-expr
-echo //initializing $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 "((lambda (features) (set-difference features (list$WITHOUT_FEATURES)))" >> $ltf
-printf " (union (list$WITH_FEATURES) (list " >> $ltf
-
 echo //guessing default target CPU architecture from host architecture
 case `uname -m` in
     *86) guessed_sbcl_arch=x86 ;;
@@ -350,16 +348,42 @@ if [ "$sbcl_os" = "darwin" ] && [ "`/usr/sbin/sysctl -n hw.optional.x86_64`" = "
 fi
 
 echo //setting up CPU-architecture-dependent information
+if test -n "$SBCL_ARCH"
+then
+    # Normalize it.
+    SBCL_ARCH=`echo $SBCL_ARCH | tr '[A-Z]' '[a-z]' | tr _ -`
+fi
 sbcl_arch=${SBCL_ARCH:-$guessed_sbcl_arch}
 echo sbcl_arch=\"$sbcl_arch\"
 if [ "$sbcl_arch" = "" ] ; then
     echo "can't guess target SBCL architecture, please specify --arch=<name>"
     exit 1
 fi
+if $fancy
+then
+    # If --fancy, enable threads on platforms where they can be built.
+    case $sbcl_arch in
+        x86|x86-64|ppc)
+            WITH_FEATURES="$WITH_FEATURES :sb-thread"
+            echo "Enabling threads due to --fancy."
+            ;;
+        *)
+            echo "No threads on this platform."
+            ;;
+    esac
+fi
+
+ltf=`pwd`/local-target-features.lisp-expr
+echo //initializing $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 "((lambda (features) (set-difference features (list$WITHOUT_FEATURES)))" >> $ltf
+printf " (union (list$WITH_FEATURES) (list " >> $ltf
+
 printf ":%s" "$sbcl_arch" >> $ltf
 
 echo //setting up OS-dependent information
-
 # Under Darwin x86-64, guess whether Darwin 9+ or below.
 if [ "$sbcl_os" = "darwin" ] && [ "$sbcl_arch" = "x86-64" ]; then
     darwin_version=`uname -r`