diff options
author | Fred Drake <fdrake@acm.org> | 1998-05-07 17:28:42 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1998-05-07 17:28:42 (GMT) |
commit | bf332696a1d3853484d5e2a8f85a9fb72ca706dd (patch) | |
tree | 30ffee2e8a4e934e81551082c1218bbd2057e753 /Doc | |
parent | f8e4415578653c3a821c87ae50f613a159f125b0 (diff) | |
download | cpython-bf332696a1d3853484d5e2a8f85a9fb72ca706dd.zip cpython-bf332696a1d3853484d5e2a8f85a9fb72ca706dd.tar.gz cpython-bf332696a1d3853484d5e2a8f85a9fb72ca706dd.tar.bz2 |
Add support for a --pdf option to cause a PDF file to be created instead;
most of the processing is the same and has to be done anyway.
Diffstat (limited to 'Doc')
-rwxr-xr-x | Doc/tools/mkdvi.sh | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/Doc/tools/mkdvi.sh b/Doc/tools/mkdvi.sh index 1bd442a..2e43e2b 100755 --- a/Doc/tools/mkdvi.sh +++ b/Doc/tools/mkdvi.sh @@ -7,20 +7,30 @@ cd `dirname $0`/.. srcdir=`pwd` cd $WORKDIR -PART=$1 +latex=latex +if [ "$1" = "--pdf" ] ; then + pdf=true + latex=pdflatex + shift 1 +fi + +part=$1; shift 1 -TEXINPUTS=$srcdir/$PART:$TEXINPUTS +TEXINPUTS=$srcdir/$part:$TEXINPUTS export TEXINPUTS set -x -$srcdir/tools/newind.py >$PART.ind || exit $? -latex $PART || exit $? -if [ -f $PART.idx ] ; then +$srcdir/tools/newind.py >$part.ind || exit $? +$latex $part || exit $? +if [ -f $part.idx ] ; then # using the index - $srcdir/tools/fix_hack $*.idx || exit $? - makeindex -s $srcdir/texinputs/myindex.ist $*.idx || exit $? + $srcdir/tools/fix_hack $part.idx || exit $? + makeindex -s $srcdir/texinputs/myindex.ist $part.idx || exit $? else # skipping the index; clean up the unused file - rm -f $PART.ind + rm -f $part.ind +fi +if [ "$pdf" ] ; then + $srcdir/tools/toc2bkm.py $part fi -latex $PART || exit $? +$latex $part || exit $? |