]> granicus.if.org Git - python/commitdiff
use_latex(): Hack to pass .syn files though uniq, so that the last module
authorFred Drake <fdrake@acm.org>
Thu, 23 Jul 1998 19:13:52 +0000 (19:13 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 23 Jul 1998 19:13:52 +0000 (19:13 +0000)
in a HOWTO document isn't listed in the synopsis table twice.  This
will do until the real bug is found (low priority!).

Doc/tools/mkhowto.sh

index ac06cebf8be57c54d6cd208c7abd759fb38a05cf..a30afb2f9f13c54721367d6f85a973e3d3d47818 100755 (executable)
@@ -94,6 +94,12 @@ use_latex() {
        makeindex $MYFILE.idx
        $MYDIR/indfix.py $MYFILE.ind
     fi
+    if [ -f $MYFILE.syn ] ; then
+       # This hack is due to a bug with the module synopsis support that
+       # causes the last module synopsis to be written out twice in
+       # howto documents (not present for manuals).  Repeated below.
+       uniq $MYFILE.syn >TEMP.syn && mv TEMP.syn $MYFILE.syn || exit $?
+    fi
     $MYLATEX $MYFILE || exit $?
     if [ -f mod$MYFILE.idx ] ; then
        makeindex mod$MYFILE.idx
@@ -105,6 +111,9 @@ use_latex() {
     if [ -f $MYFILE.toc -a $MYLATEX = pdflatex ] ; then
        $MYDIR/toc2bkm.py -c section $MYFILE
     fi
+    if [ -f $MYFILE.syn ] ; then
+       uniq $MYFILE.syn >TEMP.syn && mv TEMP.syn $MYFILE.syn || exit $?
+    fi
     $MYLATEX $MYFILE || exit $?
 }
 
@@ -121,7 +130,7 @@ build_ps() {
 }
 
 cleanup() {
-    rm -f $1.aux $1.log $1.out $1.toc $1.bkm $1.idx $1.ilg $1.ind
+    rm -f $1.aux $1.log $1.out $1.toc $1.bkm $1.idx $1.ilg $1.ind $1.syn
     rm -f mod$1.idx mod$1.ilg mod$1.ind
     if [ ! "$BUILD_DVI" ] ; then
        rm -f $1.dvi