1998-05-06 22:38:16 -03:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
|
|
|
# Build one of the simple documents.
|
|
|
|
|
|
|
|
WORKDIR=`pwd`
|
|
|
|
cd `dirname $0`/..
|
|
|
|
srcdir=`pwd`
|
|
|
|
cd $WORKDIR
|
|
|
|
|
1998-05-07 14:28:42 -03:00
|
|
|
latex=latex
|
|
|
|
if [ "$1" = "--pdf" ] ; then
|
|
|
|
pdf=true
|
|
|
|
latex=pdflatex
|
|
|
|
shift 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
part=$1; shift 1
|
1998-05-06 22:38:16 -03:00
|
|
|
|
1998-05-07 14:28:42 -03:00
|
|
|
TEXINPUTS=$srcdir/$part:$TEXINPUTS
|
1998-05-06 22:38:16 -03:00
|
|
|
export TEXINPUTS
|
|
|
|
|
1998-05-11 16:06:26 -03:00
|
|
|
echo $srcdir'/tools/newind.py >'$part'.ind'
|
1998-05-07 14:28:42 -03:00
|
|
|
$srcdir/tools/newind.py >$part.ind || exit $?
|
1998-05-11 16:06:26 -03:00
|
|
|
echo "$latex $part"
|
1998-05-07 14:28:42 -03:00
|
|
|
$latex $part || exit $?
|
|
|
|
if [ -f $part.idx ] ; then
|
1998-05-06 22:38:16 -03:00
|
|
|
# using the index
|
1998-05-11 16:06:26 -03:00
|
|
|
echo $srcdir'/tools/fix_hack '$part'.idx'
|
1998-05-07 14:28:42 -03:00
|
|
|
$srcdir/tools/fix_hack $part.idx || exit $?
|
1998-10-19 18:48:05 -03:00
|
|
|
echo 'makeindex -s '$srcdir'/texinputs/python.ist '$part'.idx'
|
|
|
|
makeindex -s $srcdir/texinputs/python.ist $part.idx || exit $?
|
1998-05-06 22:38:16 -03:00
|
|
|
else
|
|
|
|
# skipping the index; clean up the unused file
|
1998-05-07 14:28:42 -03:00
|
|
|
rm -f $part.ind
|
|
|
|
fi
|
|
|
|
if [ "$pdf" ] ; then
|
1998-05-11 16:06:26 -03:00
|
|
|
echo $srcdir'/tools/toc2bkm.py '$part
|
1998-05-07 14:28:42 -03:00
|
|
|
$srcdir/tools/toc2bkm.py $part
|
1998-05-06 22:38:16 -03:00
|
|
|
fi
|
1998-05-11 16:06:26 -03:00
|
|
|
echo "$latex $part"
|
1998-05-07 14:28:42 -03:00
|
|
|
$latex $part || exit $?
|