]> granicus.if.org Git - python/commitdiff
Add support for a --pdf option to cause a PDF file to be created instead;
authorFred Drake <fdrake@acm.org>
Thu, 7 May 1998 17:28:42 +0000 (17:28 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 7 May 1998 17:28:42 +0000 (17:28 +0000)
most of the processing is the same and has to be done anyway.

Doc/tools/mkdvi.sh

index 1bd442a12c2b0b4cec89aa41074e4a35fd0fa7dd..2e43e2b7a40d458fcfea3ae98daaf4f2bd31356f 100755 (executable)
@@ -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 $?