blob: 3330acc323483928f997213f9cb14c6bb2bec70e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#! /bin/sh
#
# Build one of the simple documents.
WORKDIR=`pwd`
cd `dirname $0`/..
srcdir=`pwd`
cd $WORKDIR
latex=latex
if [ "$1" = "--pdf" ] ; then
pdf=true
latex=pdflatex
shift 1
fi
part=$1; shift 1
TEXINPUTS=$srcdir/$part:$TEXINPUTS
export TEXINPUTS
echo $srcdir'/tools/newind.py >'$part'.ind'
$srcdir/tools/newind.py >$part.ind || exit $?
echo "$latex $part"
$latex $part || exit $?
if [ -f $part.idx ] ; then
# using the index
echo $srcdir'/tools/fix_hack '$part'.idx'
$srcdir/tools/fix_hack $part.idx || exit $?
echo 'makeindex -s '$srcdir'/texinputs/python.ist '$part'.idx'
makeindex -s $srcdir/texinputs/python.ist $part.idx || exit $?
else
# skipping the index; clean up the unused file
rm -f $part.ind
fi
if [ "$pdf" ] ; then
echo $srcdir'/tools/toc2bkm.py '$part
$srcdir/tools/toc2bkm.py $part
fi
echo "$latex $part"
$latex $part || exit $?
|