summaryrefslogtreecommitdiffstats
path: root/Doc/tools/mkdvi.sh
blob: 1bd442a12c2b0b4cec89aa41074e4a35fd0fa7dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/sh
#
#  Build one of the simple documents.

WORKDIR=`pwd`
cd `dirname $0`/..
srcdir=`pwd`
cd $WORKDIR

PART=$1

TEXINPUTS=$srcdir/$PART:$TEXINPUTS
export TEXINPUTS

set -x
$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 $?
else
    # skipping the index; clean up the unused file
    rm -f $PART.ind
fi
latex $PART || exit $?