Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8cab549

Browse files
committed
use_latex(): Hack to pass .syn files though uniq, so that the last module
in a HOWTO document isn't listed in the synopsis table twice. This will do until the real bug is found (low priority!).
1 parent 465a42a commit 8cab549

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Doc/tools/mkhowto.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ use_latex() {
9494
makeindex $MYFILE.idx
9595
$MYDIR/indfix.py $MYFILE.ind
9696
fi
97+
if [ -f $MYFILE.syn ] ; then
98+
# This hack is due to a bug with the module synopsis support that
99+
# causes the last module synopsis to be written out twice in
100+
# howto documents (not present for manuals). Repeated below.
101+
uniq $MYFILE.syn >TEMP.syn && mv TEMP.syn $MYFILE.syn || exit $?
102+
fi
97103
$MYLATEX $MYFILE || exit $?
98104
if [ -f mod$MYFILE.idx ] ; then
99105
makeindex mod$MYFILE.idx
@@ -105,6 +111,9 @@ use_latex() {
105111
if [ -f $MYFILE.toc -a $MYLATEX = pdflatex ] ; then
106112
$MYDIR/toc2bkm.py -c section $MYFILE
107113
fi
114+
if [ -f $MYFILE.syn ] ; then
115+
uniq $MYFILE.syn >TEMP.syn && mv TEMP.syn $MYFILE.syn || exit $?
116+
fi
108117
$MYLATEX $MYFILE || exit $?
109118
}
110119

@@ -121,7 +130,7 @@ build_ps() {
121130
}
122131

123132
cleanup() {
124-
rm -f $1.aux $1.log $1.out $1.toc $1.bkm $1.idx $1.ilg $1.ind
133+
rm -f $1.aux $1.log $1.out $1.toc $1.bkm $1.idx $1.ilg $1.ind $1.syn
125134
rm -f mod$1.idx mod$1.ilg mod$1.ind
126135
if [ ! "$BUILD_DVI" ] ; then
127136
rm -f $1.dvi

0 commit comments

Comments
 (0)