3 # Build one of the simple documents. This can be used to create the DVI,
4 # PDF, or LaTeX "aux" files. It can accept one of three optional parameters:
6 # --aux Create only the LaTeX .aux file
7 # --dvi Create the DeVice Independent output
8 # --pdf Create Adobe PDF output
10 # If no parameter is given, DVI output is produced.
12 # One positional parameter is required: the "base" of the document to
13 # format. For the standard Python documentation, this will be api, ext,
14 # lib, mac, ref, or tut.
24 if [ "$1" = "--pdf" ] ; then
28 elif [ "$1" = "--aux" ] ; then
31 elif [ "$1" = "--dvi" ] ; then
37 TEXINPUTS
=$srcdir/$part:$TEXINPUTS
40 echo $srcdir'/tools/newind.py >'$part'.ind'
41 $srcdir/tools
/newind.py
>$part.ind ||
exit $?
42 echo $srcdir'/tools/newind.py modindex >mod'$part'.ind'
43 $srcdir/tools
/newind.py modindex
>mod
$part.ind ||
exit $?
45 $latex $part ||
exit $?
46 if [ ! -f mod
$part.idx
] ; then
47 echo "Not using module index; removing mod$part.ind"
48 rm mod
$part.ind ||
exit $?
51 # make sure the .dvi isn't interpreted as useful:
52 rm $part.dvi ||
exit $?
54 if [ -f $part.idx
] ; then
56 echo $srcdir'/tools/fix_hack '$part'.idx'
57 $srcdir/tools
/fix_hack
$part.idx ||
exit $?
58 echo 'makeindex -s '$srcdir'/texinputs/python.ist '$part'.idx'
59 makeindex
-s $srcdir/texinputs
/python.ist
$part.idx ||
exit $?
60 echo $srcdir'/tools/indfix.py '$part'.ind'
61 $srcdir/tools
/indfix.py
$part.ind ||
exit $?
63 # skipping the index; clean up the unused file
66 if [ -f mod
$part.idx
] ; then
68 echo 'makeindex -s '$srcdir'/texinputs/python.ist mod'$part'.idx'
69 makeindex
-s $srcdir/texinputs
/python.ist mod
$part.idx ||
exit $?
72 echo $srcdir'/tools/toc2bkm.py '$part
73 $srcdir/tools
/toc2bkm.py
$part ||
exit $?
76 $latex $part ||
exit $?