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 | |||||
Fred Drake | 58ff112 | 1998-05-11 19:06:26 +0000 | [diff] [blame^] | 22 | echo $srcdir'/tools/newind.py >'$part'.ind' |
Fred Drake | bf33269 | 1998-05-07 17:28:42 +0000 | [diff] [blame] | 23 | $srcdir/tools/newind.py >$part.ind || exit $? |
Fred Drake | 58ff112 | 1998-05-11 19:06:26 +0000 | [diff] [blame^] | 24 | echo "$latex $part" |
Fred Drake | bf33269 | 1998-05-07 17:28:42 +0000 | [diff] [blame] | 25 | $latex $part || exit $? |
26 | if [ -f $part.idx ] ; then | ||||
Fred Drake | 5360879 | 1998-05-07 01:38:16 +0000 | [diff] [blame] | 27 | # using the index |
Fred Drake | 58ff112 | 1998-05-11 19:06:26 +0000 | [diff] [blame^] | 28 | echo $srcdir'/tools/fix_hack '$part'.idx' |
Fred Drake | bf33269 | 1998-05-07 17:28:42 +0000 | [diff] [blame] | 29 | $srcdir/tools/fix_hack $part.idx || exit $? |
Fred Drake | 58ff112 | 1998-05-11 19:06:26 +0000 | [diff] [blame^] | 30 | echo 'makeindex -s '$srcdir'/texinputs/myindex.ist '$part'.idx' |
Fred Drake | bf33269 | 1998-05-07 17:28:42 +0000 | [diff] [blame] | 31 | makeindex -s $srcdir/texinputs/myindex.ist $part.idx || exit $? |
Fred Drake | 5360879 | 1998-05-07 01:38:16 +0000 | [diff] [blame] | 32 | else |
33 | # skipping the index; clean up the unused file | ||||
Fred Drake | bf33269 | 1998-05-07 17:28:42 +0000 | [diff] [blame] | 34 | rm -f $part.ind |
Fred Drake | 5360879 | 1998-05-07 01:38:16 +0000 | [diff] [blame] | 35 | fi |
Fred Drake | bf33269 | 1998-05-07 17:28:42 +0000 | [diff] [blame] | 36 | if [ "$pdf" ] ; then |
Fred Drake | 58ff112 | 1998-05-11 19:06:26 +0000 | [diff] [blame^] | 37 | echo $srcdir'/tools/toc2bkm.py '$part |
Fred Drake | bf33269 | 1998-05-07 17:28:42 +0000 | [diff] [blame] | 38 | $srcdir/tools/toc2bkm.py $part |
39 | fi | ||||
Fred Drake | 58ff112 | 1998-05-11 19:06:26 +0000 | [diff] [blame^] | 40 | echo "$latex $part" |
Fred Drake | bf33269 | 1998-05-07 17:28:42 +0000 | [diff] [blame] | 41 | $latex $part || exit $? |