0.8.16.39:
[sbcl/lichteblau.git] / doc / manual / make-tempfiles.sh
blobd2dc7cd73a75ea4539b6177db107560a681f7c92
1 #!/bin/sh
3 # Create Texinfo snippets from the documentation of exported symbols.
5 # This software is part of the SBCL system. See the README file for
6 # more information.
8 # This software is in the public domain and is provided with
9 # absolutely no warranty. See the COPYING and CREDITS files for
10 # more information.
12 # how we invoke SBCL
14 # We create the documentation from the in-tree sbcl if it is found,
15 # else an installed sbcl is used.
16 sbclsystem=`pwd`/../../src/runtime/sbcl
17 sbclcore=`pwd`/../../output/sbcl.core
19 if [ -e $sbclsystem ] && [ -e $sbclcore ]
20 then
21 SBCLRUNTIME="${1:-$sbclsystem --core $sbclcore}"
22 export SBCL_HOME=`pwd`/../../contrib
23 else
24 SBCLRUNTIME="${1:-`which sbcl`}"
27 SBCL="$SBCLRUNTIME --noinform --sysinit /dev/null --userinit /dev/null --noprint --disable-debugger"
29 # extract version and date
30 VERSION=`$SBCL --eval '(write-line (lisp-implementation-version))' --eval '(sb-ext:quit)'`
31 MONTH=`date "+%Y-%m"`
33 sed -e "s/@VERSION@/$VERSION/" \
34 -e "s/@MONTH@/$MONTH/" < variables.template > variables.texinfo || exit 1
36 # Output directory. This has to end with a slash (it's interpreted by
37 # Lisp's `pathname' function) or you lose. This is normally set from
38 # Makefile.
39 DOCSTRINGDIR="${DOCSTRINGDIR:-docstrings/}"
41 # List of contrib modules that docstring docs will be created for.
42 # This is normally set from Makefile.
43 #MODULES="${MODULES:-sb-md5 :sb-rotate-byte}"
45 # List of package names that documentation will be created for. This
46 # is normally set from Makefile.
47 #PACKAGES="${PACKAGES:-:COMMON-LISP :SB-ALIEN :SB-DEBUG :SB-EXT :SB-GRAY :SB-MOP :SB-PROFILE :SB-THREAD}"
49 echo /creating docstring snippets from SBCL=\'$SBCLRUNTIME\' for packages \'$PACKAGES\'
50 $SBCL <<EOF
51 (load "docstrings.lisp")
52 (dolist (module (quote ($MODULES)))
53 (require module))
54 (sb-texinfo:generate-includes "$DOCSTRINGDIR" $PACKAGES)
55 (sb-ext:quit))
56 EOF
58 echo /creating package-locks.texi-temp
59 if $SBCL --eval "(let ((plp (find-symbol \"PACKAGE-LOCKED-P\" :sb-ext))) (quit :unix-status (if (and plp (fboundp plp)) 0 1)))";
60 then
61 cp package-locks-extended.texinfo package-locks.texi-temp
62 else
63 cp package-locks-basic.texinfo package-locks.texi-temp