1.0.3.40: :EXECUTABLE T implies --noinform
authorJuho Snellman <jsnell@iki.fi>
Fri, 16 Mar 2007 03:57:08 +0000 (03:57 +0000)
committerJuho Snellman <jsnell@iki.fi>
Fri, 16 Mar 2007 03:57:08 +0000 (03:57 +0000)
        * Patch from Kevin Reid.
* Not the right solution. This can be revisited once somebody
          implements the mythical saving of command-line parameters into the
          core.
        * Also check in some fixes to the build process of the manual (patch
          by Richard Kreuter).

NEWS
doc/manual/Makefile
src/runtime/runtime.c
tests/core.test.sh
version.lisp-expr

diff --git a/NEWS b/NEWS
index 037579f..1fe8e06 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,9 @@ changes in sbcl-1.0.4 relative to sbcl-1.0.3:
     and gethostbyname, on platforms where the newer functions are available.
     As a result, the ALIASES field of HOST-ENT will always be NIL on these
     platforms.
+  * change: runtimes with embedded cores (i.e. saved with :EXECUTABLE T)
+    don't print the startup banner, but behave as if --noinform was passed
+    as a command line argument. (thanks to Kevin Reid)
   * optimization: code using alien values with undeclared types is much faster.
   * optimization: the compiler is now able to open code SEARCH in more cases.
   * optimization: more compact typechecks on x86-64 (thanks to Lutz Euler)
index 45f89ea..6a54d40 100644 (file)
@@ -11,9 +11,9 @@ HTMLDIRS=$(basename $(SBCLTEXI)) $(basename $(ASDFTEXI))
 # DOCSTRINGDIR has to end with a slash or you lose (it's passed to
 # Lisp's `pathname' function).
 DOCSTRINGDIR="docstrings/"
-I_FLAGS=-I $(DOCSTRINGDIR) -I ../../contrib/
+CONTRIBDIR="../../contrib/"
+I_FLAGS=-I $(DOCSTRINGDIR) -I $(CONTRIBDIR)
 # List of contrib modules that docstring docs will be created for.
-# FIXME: should check test-passed and not load them.
 MODULES=':sb-md5 :sb-rotate-byte :sb-grovel :sb-sprof :sb-bsd-sockets'
 # List of package names that docstring docs will be created for.
 PACKAGES=":COMMON-LISP :SB-ALIEN :SB-DEBUG :SB-EXT :SB-GRAY :SB-MOP :SB-PROFILE :SB-THREAD :SB-MD5 :SB-ROTATE-BYTE :SB-SPROF :SB-BSD-SOCKETS"
@@ -83,12 +83,16 @@ info: $(INFOFILES)
        $(MAKEINFO) $(I_FLAGS) $<
 
 # Texinfo docstring snippets
-.PHONY: docstrings
-docstrings: tempfiles-stamp
+# Note: assumes contrib module names are the same as the names of
+# directories containing the modules, and that these directories
+# are in $(CONTRIBDIR).
+CONTRIB_FASLS=$(shell find $(shell echo $(MODULES) | sed "s|:|$(CONTRIBDIR)|g") -name '*.fasl')
+docstrings: ../../output/sbcl.core $(CONTRIB_FASLS) tempfiles-stamp
+       for module in $(shell echo $(MODULES)); do test -e $(CONTRIBDIR)/$${module#:}/test-passed || { echo "The documented contrib $$module seems to have failed its tests." && exit 1; }; done
+       DOCSTRINGDIR=$(DOCSTRINGDIR) PACKAGES=$(PACKAGES) MODULES=$(MODULES) sh make-tempfiles.sh "$(SBCL_SYSTEM)" && touch $(DOCSTRINGDIR)
 
 tempfiles-stamp:
-       DOCSTRINGDIR=$(DOCSTRINGDIR) PACKAGES=$(PACKAGES) MODULES=$(MODULES) sh make-tempfiles.sh "$(SBCL_SYSTEM)" && touch tempfiles-stamp
-
+       touch tempfiles-stamp
 
 .PHONY: clean
 clean: 
index f2b52d6..ab61951 100644 (file)
@@ -376,7 +376,7 @@ main(int argc, char *argv[], char *envp[])
         free(copied_core);
     }
 
-    if (!noinform) {
+    if (!noinform && embedded_core_offset == 0) {
         print_banner();
         fflush(stdout);
     }
index 84c6a3d..1c5a0cf 100644 (file)
@@ -14,7 +14,8 @@
 # more information.
 
 tmpcore="core-test-sh-$$.core"
-rm -f $tmpcore
+tmpoutput="core-test-sh-$$.output.txt"
+rm -f "$tmpcore" "$tmpoutput"
 
 # In sbcl-0.7.7 SAVE-LISP-AND-DIE didn't work at all because of
 # flakiness caused by consing/GC/purify twice-and-at-least-twice
@@ -61,6 +62,29 @@ else
     exit 1
 fi
 
-rm -f $tmpcore
+# test suppression of banner in executable cores
+$SBCL <<EOF
+  (save-lisp-and-die "$tmpcore" :executable t)
+EOF
+chmod u+x "$tmpcore"
+./"$tmpcore" >"$tmpoutput" --eval '(quit :unix-status 71)'
+if [ $? != 71 ]; then
+  echo "failure in banner suppression: $?"
+  exit 1
+elif [ -s "$tmpoutput" ]; then
+  echo "failure in banner suppression: nonempty output:"
+  echo ---
+  cat "$tmpoutput"
+  echo ---
+  exit 1
+elif [ -f "$tmpoutput" ]; then
+  echo "/Executable suppressed banner, good."
+else
+  echo "failure in banner suppression: $tmpoutput was not created or something funny happened."
+  exit 1
+fi
+
+rm -f "$tmpcore"
+rm -f "$tmpoutput"
 echo "/returning success from core.test.sh"
 exit 104
index ea4db7a..c295eee 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".)
-"1.0.3.39"
+"1.0.3.40"