0.8.12.7: Merge package locks, AKA "what can go wrong with a 3783 line patch?"
[sbcl.git] / doc / manual / make-tempfiles.sh
1 #!/bin/sh
2
3 # Create Texinfo snippets from the documentation of exported symbols.
4 # Also create contrib-docs.texi-temp to include documentation in contrib/.
5
6 # This software is part of the SBCL system. See the README file for
7 # more information.
8 #
9 # This software is in the public domain and is provided with
10 # absolutely no warranty. See the COPYING and CREDITS files for
11 # more information.
12
13 # how we invoke SBCL
14
15 # We create the documentation from the in-tree sbcl if it is found,
16 # else an installed sbcl is used.
17 sbclsystem=`pwd`/../../src/runtime/sbcl
18 sbclcore=`pwd`/../../output/sbcl.core
19 if [ -e $sbclsystem ] && [ -e $sbclcore ] 
20 then
21     SBCL="${1:-$sbclsystem --core $sbclcore}"
22     export SBCL_HOME=`pwd`/../../contrib
23 else
24     SBCL="${1:-`which sbcl`}"
25 fi
26
27 # Output directory.  This has to end with a slash (it's interpreted by
28 # Lisp's `pathname' function) or you lose.  This is normally set from
29 # Makefile.
30 DOCSTRINGDIR="${DOCSTRINGDIR:-docstrings/}"
31
32 # List of contrib modules that docstring docs will be created for.
33 # This is normally set from Makefile.
34 #MODULES="${MODULES:-sb-md5 :sb-rotate-byte}"
35
36 # List of package names that documentation will be created for.  This
37 # is normally set from Makefile.
38 #PACKAGES="${PACKAGES:-:COMMON-LISP :SB-ALIEN :SB-DEBUG :SB-EXT :SB-GRAY :SB-MOP :SB-PROFILE :SB-THREAD}"
39
40 echo /creating docstring snippets from SBCL=\'$SBCL\' for packages \'$PACKAGES\'
41 echo "(progn (load \"docstrings.lisp\") (dolist (module (quote ($MODULES))) (require module)) (docstrings-to-texinfo \"$DOCSTRINGDIR\" $PACKAGES) (sb-ext:quit))" | $SBCL --noinform --sysinit /dev/null --userinit /dev/null --noprint --disable-debugger
42
43 echo /creating contrib-docs.texi-temp
44 echo "(load \"create-contrib-doc-list.lisp\")" | $SBCL --noinform --sysinit /dev/null --userinit /dev/null --noprint --disable-debugger
45
46 echo /creating package-locks.texi-temp
47 if $SBCL --noinform --sysinit /dev/null --userinit /dev/null --noprint --disable-debugger --eval '(quit :unix-status #+sb-package-locks 0 #-sb-package-locks 1)'
48 then
49     cp package-locks-extended.texinfo package-locks.texi-temp
50 else
51     cp package-locks-basic.texinfo package-locks.texi-temp
52 fi