0.8.9.23
[sbcl.git] / doc / manual / docstrings.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 # Until sbcl-0.6.12.8, the shell variable SBCL was bound to a relative
15 # pathname, but now we take care to bind it to an absolute pathname (still
16 # generated relative to `pwd` in the tests/ directory) so that tests
17 # can chdir before invoking SBCL and still work.
18
19 # We create the documentation from the in-tree sbcl if it is found,
20 # else an installed sbcl is used.
21 sbclsystem=`pwd`/../../src/runtime/sbcl
22 if [ -e $sbclsystem ] 
23 then
24 SBCL="${1:-$sbclsystem --core `pwd`/../output/sbcl.core}"
25 else
26 SBCL="${1:-`which sbcl`}"
27 fi
28
29 # List of package names that documentation will be created for.
30 PACKAGES=":SB-EXT"
31
32 # Output directory.  This has to end with a slash (it's interpreted by
33 # Lisp's `pathname' function) or you lose.
34 DOCSTRINGDIR="${DOCSTRINGDIR:-docstrings/}"
35
36
37 echo /creating docstring snippets from SBCL=\'$SBCL\' for packages \'$PACKAGES\'
38
39 echo "(progn (load \"docstrings.lisp\") (docstrings-to-texinfo \"$DOCSTRINGDIR\" $PACKAGES) (sb-ext:quit))" | $SBCL --noinform --sysinit /dev/null --userinit /dev/null --noprint --disable-debugger