0.8.13.70: MORE DOCUMENTATION
[sbcl.git] / doc / manual / make-tempfiles.sh
1 #!/bin/sh
2
3 # Create Texinfo snippets from the documentation of exported symbols.
4
5 # This software is part of the SBCL system. See the README file for
6 # more information.
7 #
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.
11
12 # how we invoke SBCL
13
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
18 if [ -e $sbclsystem ] && [ -e $sbclcore ] 
19 then
20     SBCLRUNTIME="${1:-$sbclsystem --core $sbclcore}"
21     export SBCL_HOME=`pwd`/../../contrib
22 else
23     SBCLRUNTIME="${1:-`which sbcl`}"
24 fi
25
26 SBCL="$SBCLRUNTIME --noinform --sysinit /dev/null --userinit /dev/null --noprint --disable-debugger"
27
28 # Output directory.  This has to end with a slash (it's interpreted by
29 # Lisp's `pathname' function) or you lose.  This is normally set from
30 # Makefile.
31 DOCSTRINGDIR="${DOCSTRINGDIR:-docstrings/}"
32
33 # List of contrib modules that docstring docs will be created for.
34 # This is normally set from Makefile.
35 #MODULES="${MODULES:-sb-md5 :sb-rotate-byte}"
36
37 # List of package names that documentation will be created for.  This
38 # is normally set from Makefile.
39 #PACKAGES="${PACKAGES:-:COMMON-LISP :SB-ALIEN :SB-DEBUG :SB-EXT :SB-GRAY :SB-MOP :SB-PROFILE :SB-THREAD}"
40
41 echo /creating docstring snippets from SBCL=\'$SBCLRUNTIME\' for packages \'$PACKAGES\'
42 echo "(progn (load \"docstrings.lisp\") (dolist (module (quote ($MODULES))) (require module)) (docstrings-to-texinfo \"$DOCSTRINGDIR\" $PACKAGES) (sb-ext:quit))" | $SBCL
43
44 echo /creating package-locks.texi-temp
45 if $SBCL --eval "(let ((plp (find-symbol \"PACKAGE-LOCKED-P\" :sb-ext))) (quit :unix-status (if (and plp (fboundp plp)) 0 1)))";
46 then
47     cp package-locks-extended.texinfo package-locks.texi-temp
48 else
49     cp package-locks-basic.texinfo package-locks.texi-temp
50 fi