Fred Drake | 5360879 | 1998-05-07 01:38:16 +0000 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | # |
| 3 | # Build one of the simple documents. |
| 4 | |
| 5 | WORKDIR=`pwd` |
| 6 | cd `dirname $0`/.. |
| 7 | srcdir=`pwd` |
| 8 | cd $WORKDIR |
| 9 | |
Fred Drake | bf33269 | 1998-05-07 17:28:42 +0000 | [diff] [blame^] | 10 | latex=latex |
| 11 | if [ "$1" = "--pdf" ] ; then |
| 12 | pdf=true |
| 13 | latex=pdflatex |
| 14 | shift 1 |
| 15 | fi |
Fred Drake | 5360879 | 1998-05-07 01:38:16 +0000 | [diff] [blame] | 16 | |
Fred Drake | bf33269 | 1998-05-07 17:28:42 +0000 | [diff] [blame^] | 17 | part=$1; shift 1 |
| 18 | |
| 19 | TEXINPUTS=$srcdir/$part:$TEXINPUTS |
Fred Drake | 5360879 | 1998-05-07 01:38:16 +0000 | [diff] [blame] | 20 | export TEXINPUTS |
| 21 | |
| 22 | set -x |
Fred Drake | bf33269 | 1998-05-07 17:28:42 +0000 | [diff] [blame^] | 23 | $srcdir/tools/newind.py >$part.ind || exit $? |
| 24 | $latex $part || exit $? |
| 25 | if [ -f $part.idx ] ; then |
Fred Drake | 5360879 | 1998-05-07 01:38:16 +0000 | [diff] [blame] | 26 | # using the index |
Fred Drake | bf33269 | 1998-05-07 17:28:42 +0000 | [diff] [blame^] | 27 | $srcdir/tools/fix_hack $part.idx || exit $? |
| 28 | makeindex -s $srcdir/texinputs/myindex.ist $part.idx || exit $? |
Fred Drake | 5360879 | 1998-05-07 01:38:16 +0000 | [diff] [blame] | 29 | else |
| 30 | # skipping the index; clean up the unused file |
Fred Drake | bf33269 | 1998-05-07 17:28:42 +0000 | [diff] [blame^] | 31 | rm -f $part.ind |
Fred Drake | 5360879 | 1998-05-07 01:38:16 +0000 | [diff] [blame] | 32 | fi |
Fred Drake | bf33269 | 1998-05-07 17:28:42 +0000 | [diff] [blame^] | 33 | if [ "$pdf" ] ; then |
| 34 | $srcdir/tools/toc2bkm.py $part |
| 35 | fi |
| 36 | $latex $part || exit $? |