gencgc: code_page_p() must die!
[sbcl.git] / doc / manual / make-tempfiles.sh
index d2dc7cd..ec07a3f 100644 (file)
 
 # We create the documentation from the in-tree sbcl if it is found,
 # else an installed sbcl is used.
-sbclsystem=`pwd`/../../src/runtime/sbcl
-sbclcore=`pwd`/../../output/sbcl.core
 
-if [ -e $sbclsystem ] && [ -e $sbclcore ] 
+if [ -z "$1" ]
 then
-    SBCLRUNTIME="${1:-$sbclsystem --core $sbclcore}"
-    export SBCL_HOME=`pwd`/../../contrib
+    . ../../sbcl-pwd.sh
+    sbcl_pwd
+
+    sbclsystem=$SBCL_PWD/../../src/runtime/sbcl
+    sbclcore=$SBCL_PWD/../../output/sbcl.core
+    if [ -f $sbclsystem ] && [ -f $sbclcore ]
+    then
+        SBCLRUNTIME="$sbclsystem --core $sbclcore"
+        SBCL_HOME=$SBCL_PWD/../../obj/sbcl-home/; export SBCL_HOME
+        SBCL_BUILDING_CONTRIB="please asdf install your hook"; export SBCL_BUILDING_CONTRIB
+    else
+        SBCLRUNTIME="`which sbcl`"
+    fi
 else
-    SBCLRUNTIME="${1:-`which sbcl`}"
+    SBCLRUNTIME="$1"
 fi
 
-SBCL="$SBCLRUNTIME --noinform --sysinit /dev/null --userinit /dev/null --noprint --disable-debugger"
+SBCL="$SBCLRUNTIME --noinform --no-sysinit --no-userinit --noprint --disable-debugger"
 
 # extract version and date
-VERSION=`$SBCL --eval '(write-line (lisp-implementation-version))' --eval '(sb-ext:quit)'`
+VERSION=`$SBCL --eval '(write-line (lisp-implementation-version))' --eval '(sb-ext:exit)'`
 MONTH=`date "+%Y-%m"`
 
 sed -e "s/@VERSION@/$VERSION/" \
@@ -48,17 +57,31 @@ DOCSTRINGDIR="${DOCSTRINGDIR:-docstrings/}"
 
 echo /creating docstring snippets from SBCL=\'$SBCLRUNTIME\' for packages \'$PACKAGES\'
 $SBCL <<EOF
-(load "docstrings.lisp") 
-(dolist (module (quote ($MODULES))) 
-  (require module)) 
-(sb-texinfo:generate-includes "$DOCSTRINGDIR" $PACKAGES) 
-(sb-ext:quit))
+(load "docstrings.lisp")
+(require :asdf)
+(dolist (module (quote ($MODULES)))
+  (require module))
+(sb-texinfo:generate-includes "$DOCSTRINGDIR" $PACKAGES)
+(sb-ext:exit))
 EOF
 
 echo /creating package-locks.texi-temp
-if $SBCL --eval "(let ((plp (find-symbol \"PACKAGE-LOCKED-P\" :sb-ext))) (quit :unix-status (if (and plp (fboundp plp)) 0 1)))";
+if $SBCL --eval "(let ((plp (find-symbol \"PACKAGE-LOCKED-P\" :sb-ext))) (exit :code (if (and plp (fboundp plp)) 0 1)))";
 then
     cp package-locks-extended.texinfo package-locks.texi-temp
 else
     cp package-locks-basic.texinfo package-locks.texi-temp
 fi
+
+echo /creating encodings.texi-temp
+$SBCL <<EOF
+(with-open-file (s "encodings.texi-temp" :direction :output :if-exists :supersede)
+  (let (result)
+    (sb-int:dohash ((key val) sb-impl::*external-formats*)
+      (pushnew (sb-impl::ef-names val) result :test #'equal))
+    (setq result (sort result #'string< :key #'car))
+    (format s "@table @code~%~%")
+    (loop for (cname . names) in result
+          do (format s "@item ~S~%~{@code{~S}~^, ~}~%~%" cname names))
+    (format s "@end table~%")))
+EOF