0.9.11.12
authorRudi Schlatte <rudi@constantly.at>
Wed, 5 Apr 2006 07:46:56 +0000 (07:46 +0000)
committerRudi Schlatte <rudi@constantly.at>
Wed, 5 Apr 2006 07:46:56 +0000 (07:46 +0000)
    new toplevel options --no-sysinit, --no-userinit to inhibit
    loading the corresponding init files
    ... also fixes the win32 build failure that motivated this change

NEWS
doc/manual/start-stop.texinfo
doc/sbcl.1
make-target-2.sh
make-target-contrib.sh
make.sh
src/code/toplevel.lisp
src/runtime/runtime.c
version.lisp-expr

diff --git a/NEWS b/NEWS
index 35e72ee..92abfb2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
 ;;;; -*- coding: utf-8; -*-
 changes in sbcl-0.9.12 relative to sbcl-0.9.11:
+  * new feature: command line options --no-sysinit, --no-userinit to
+    inhibit loading the corresponding init files
   * bug fix: LISTEN sometimes returned T even in cases where no data was
     immediately available from the stream
   * fixed bug: types of the last two arguments to SET-SYNTAX-FROM-CHAR
index 86c1956..1e4811f 100644 (file)
@@ -208,16 +208,19 @@ chance to see it.
 
 @item --sysinit @var{filename}
 Load filename instead of the default system initialization file
-(@pxref{System Initialization File}.) There is no special option to
-cause no system initialization file to be read, but on a Unix
-system ``@code{"--sysinit /dev/null}'' can be used to achieve the same
-effect.
+(@pxref{System Initialization File}.)
+
+@item --no-sysinit
+Don't load a system-wide initialization file.  If this option is given,
+the @code{--sysinit} option is ignored.
 
 @item --userinit @var{filename}
 Load filename instead of the default user initialization file
-(@pxref{User Initialization File}.) There is no special option to
-cause no user initialization file to be read, but ``@code{--userinit
-/dev/null}'' can be used to achieve the same effect.
+(@pxref{User Initialization File}.)
+
+@item --no-userinit
+Don't load a user initialization file.  If this option is given,
+the @code{--userinit} option is ignored.
 
 @item --eval @var{command}
 After executing any initialization file, but before starting the
index cd50ff2..32eae83 100644 (file)
@@ -289,15 +289,19 @@ The toplevel options supported by the standard SBCL core are
 .TP 3
 .B \-\-sysinit <filename>
 Load filename instead of the default system-wide initialization file.
-(See the FILES section.) There is no special option to cause no
-system-wide initialization file to be read, but on a Unix system
-"\-\-sysinit /dev/null" can be used to achieve the same effect.
+(See the FILES section.)
+.TP 3
+.B \-\-no\-sysinit
+Do not load a system-wide initialization file. If this option is
+given, the \-\-sysinit option is ignored.
 .TP 3
 .B \-\-userinit <filename>
 Load filename instead of the default user initialization file. (See
-the FILES section.) There is no special option to cause no user
-initialization file to be read, but on a Unix system "\-\-userinit
-/dev/null" can be used to achieve the same effect.
+the FILES section.)
+.TP 3
+.B \-\-no\-userinit
+Do not load a user initialization file. If this option is
+given, the \-\-userinit option is ignored.
 .TP 3
 .B \-\-eval <command>
 After executing any initialization file, but before starting the
index 998bffe..803c44e 100644 (file)
@@ -32,4 +32,4 @@ export LANG LC_ALL
 echo //doing warm init
 ./src/runtime/sbcl \
 --core output/cold-sbcl.core \
---sysinit /dev/null --userinit /dev/null < make-target-2.lisp
+--no-sysinit --no-userinit < make-target-2.lisp
index 3e96449..6d10ca3 100644 (file)
@@ -34,7 +34,7 @@ SBCL_HOME=$SBCL_BASE/contrib
 export SBCL_HOME
 
 
-SBCL="$SBCL_BASE/src/runtime/sbcl --noinform --core $SBCL_BASE/output/sbcl.core --disable-debugger"
+SBCL="$SBCL_BASE/src/runtime/sbcl --noinform --core $SBCL_BASE/output/sbcl.core --disable-debugger --no-sysinit --no-userinit"
 SBCL_BUILDING_CONTRIB=1
 export SBCL SBCL_BUILDING_CONTRIB
 
diff --git a/make.sh b/make.sh
index 58907b8..3de7b11 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -60,7 +60,11 @@ export LANG LC_ALL
 build_started=`date`
 echo "//starting build: $build_started"
 
-SBCL_XC_HOST="${1:-sbcl --disable-debugger --userinit /dev/null --sysinit /dev/null}"
+if [ "$OSTYPE" = "cygwin" -o "$OSTYPE" = "msys" ] ; then
+    SBCL_XC_HOST="${1:-sbcl --disable-debugger --userinit NUL --sysinit NUL}"
+else
+    SBCL_XC_HOST="${1:-sbcl --disable-debugger --userinit /dev/null --sysinit /dev/null}"
+fi
 export SBCL_XC_HOST
 echo //SBCL_XC_HOST=\"$SBCL_XC_HOST\"
 
index 274b03d..f2147a6 100644 (file)
@@ -360,8 +360,12 @@ steppers to maintain contextual information.")
   (/show0 "entering TOPLEVEL-INIT")
   (let (;; value of --sysinit option
         (sysinit nil)
+        ;; t if --no-sysinit option given
+        (no-sysinit nil)
         ;; value of --userinit option
         (userinit nil)
+        ;; t if --no-userinit option given
+        (no-userinit nil)
         ;; values of --eval options, in reverse order; and also any
         ;; other options (like --load) which're translated into --eval
         ;;
@@ -412,11 +416,17 @@ steppers to maintain contextual information.")
                        (if sysinit
                            (startup-error "multiple --sysinit options")
                            (setf sysinit (pop-option))))
+                      ((string= option "--no-sysinit")
+                       (pop-option)
+                       (setf no-sysinit t))
                       ((string= option "--userinit")
                        (pop-option)
                        (if userinit
                            (startup-error "multiple --userinit options")
                            (setf userinit (pop-option))))
+                      ((string= option "--no-userinit")
+                       (pop-option)
+                       (setf no-userinit t))
                       ((string= option "--eval")
                        (pop-option)
                        (push (pop-option) reversed-evals))
@@ -502,8 +512,8 @@ steppers to maintain contextual information.")
             ;; figure out what's going on.)
             (restart-case
                 (progn
-                  (process-init-file sysinit-truename)
-                  (process-init-file userinit-truename)
+                  (unless no-sysinit (process-init-file sysinit-truename))
+                  (unless no-userinit (process-init-file userinit-truename))
                   (process-eval-options (reverse reversed-evals)))
               (abort ()
                 :report "Skip to toplevel READ/EVAL/PRINT loop."
index 4c5434e..cba2f73 100644 (file)
@@ -148,7 +148,7 @@ start it and work with the customary Lisp READ-EVAL-PRINT loop.\n\
 \n\
 One option idiom which is sometimes useful interactively (e.g. when\n\
 exercising a test case for a bug report) is\n\
-  sbcl --sysinit /dev/null --userinit /dev/null\n\
+  sbcl --no-sysinit --no-userinit\n\
 to keep SBCL from reading any initialization files at startup. And some\n\
 people like to suppress the default startup message:\n\
   sbcl --noinform\n\
index 1e0cf6d..6390dc1 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.9.11.11"
+"0.9.11.12"