Changed way *.ind are forced to exist; the files are now reset to contain

an empty index instead of touched.  Note that for modindex.ind, this also
includes "\label{modindex}" so that the modindex.py script doesn't change
the set of labels in the document.

Be more consistent in use of $* in commands.
This commit is contained in:
Fred Drake 1998-02-22 19:47:13 +00:00
parent d028ca989a
commit 5ad78f39e7
1 changed files with 33 additions and 36 deletions

View File

@ -104,7 +104,7 @@ tut-all: tut.dvi tut.pdf tut.ps l2htut
# Rules to build PostScript and PDF formats # Rules to build PostScript and PDF formats
.SUFFIXES: .dvi .ps .pdf .SUFFIXES: .dvi .ps .pdf .tex
.dvi.ps: .dvi.ps:
$(DVIPS) $< >$@ $(DVIPS) $< >$@
@ -126,12 +126,7 @@ tut-all: tut.dvi tut.pdf tut.ps l2htut
# Dependencies # Dependencies
COMMONTEX=myformat.sty copyright.tex boilerplate.tex COMMONTEX=myformat.sty copyright.tex boilerplate.tex
tut.dvi lib.dvi ext.dvi api.dvi: fix_hack $(COMMONTEX) $(DVIFILES): fix_hack $(COMMONTEX)
# Tutorial document
tut.dvi: tut.tex
$(LATEX) tut
$(LATEX) tut
# LaTeX source files for the Python Library Reference # LaTeX source files for the Python Library Reference
LIBFILES = lib.tex \ LIBFILES = lib.tex \
@ -168,31 +163,28 @@ LIBFILES = lib.tex \
# Library document # Library document
lib.dvi: modindex.py indfix.py $(LIBFILES) lib.dvi: modindex.py indfix.py $(LIBFILES)
touch lib.ind echo '\begin{theindex}\end{theindex}' >$*.ind
touch modules.ind echo '\begin{theindex}\label{modindex}\end{theindex}' >modules.ind
$(LATEX) lib $(LATEX) $*
./modindex.py modules.idx ./modindex.py modules.idx
./fix_hack lib.idx ./fix_hack $*.idx
$(MAKEINDEX) lib.idx $(MAKEINDEX) $*.idx
./indfix.py lib.ind ./indfix.py $*.ind
./modindex.py modules.idx $(LATEX) $*
$(LATEX) lib
# Extensions document # Tutorial document
ext.dvi: ext.tex tut.dvi: tut.tex
touch ext.ind $(LATEX) $*
$(LATEX) ext $(LATEX) $*
./fix_hack ext.idx
$(MAKEINDEX) ext.idx
$(LATEX) ext
# Python-C API document # Extending & Embedding, Python/C API documents.
api.dvi: api.tex # Done this way to avoid repeated command sets.
touch api.ind .tex.dvi:
$(LATEX) api echo '\begin{theindex}\end{theindex}' >$*.ind
./fix_hack api.idx $(LATEX) $*
$(MAKEINDEX) api.idx ./fix_hack $*.idx
$(LATEX) api $(MAKEINDEX) $*.idx
$(LATEX) $*
# The remaining part of the Makefile is concerned with various # The remaining part of the Makefile is concerned with various
@ -206,33 +198,35 @@ api.dvi: api.tex
.py.pyc: .py.pyc:
$(PYTHON) -c "import $*" $(PYTHON) -c "import $*"
.PRECIOUS: lib.texi .PRECIOUS: python-lib.texi
# The sed script in this target fixes a really nasty little condition in # The sed script in this target fixes a really nasty little condition in
# libcgi.tex where \e has to be used in a group to get the right behavior, # libcgi.tex where \e has to be used in a group to get the right behavior,
# and makeinfo can't handle a group with a leading @command. But at least # and makeinfo can't handle a group without a leading @command. But at
# the info file gets generated. # least the info file gets generated.
lib1.texi: lib*.tex texipre.dat texipost.dat $(PARTPARSEOBJ) lib1.texi: $(LIBFILES) texipre.dat texipost.dat $(PARTPARSEOBJ)
$(PARTPARSE) -o $@ `./whichlibs` $(PARTPARSE) -o $@ `./whichlibs`
sed 's/"{\\}n{\\}n/"\\n\\n/' $@ >temp.texi sed 's/"{\\}n{\\}n/"\\n\\n/' $@ >temp.texi
mv temp.texi $@ mv temp.texi $@
lib.texi: lib1.texi fix.el python-lib.texi: lib1.texi fix.el
cp lib1.texi temp.texi cp lib1.texi temp.texi
$(EMACS) -batch -l fix.el -f save-buffer -kill $(EMACS) -batch -l fix.el -f save-buffer -kill
mv temp.texi $@ mv temp.texi $@
python-lib.info: lib.texi python-lib.info: python-lib.texi
$(MAKEINFO) --footnote-style end --fill-column 72 \ $(MAKEINFO) --footnote-style end --fill-column 72 \
--paragraph-indent 0 $< --paragraph-indent 0 $<
# this is needed to prevent a second set of info files from being generated, # this is needed to prevent a second set of info files from being generated,
# at least when using GNU make # at least when using GNU make
.PHONY: lib.info .PHONY: lib.info lib.texi
lib.info: python-lib.info lib.info: python-lib.info
lib.texi: python-lib.texi
# Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to # Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to
# HTML converter. For more info on this program, see # HTML converter. For more info on this program, see
# <URL:http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html>. # <URL:http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html>.
@ -330,3 +324,6 @@ l2hclean:
# Remove temporaries as well as final products # Remove temporaries as well as final products
clobber: clean clobber: clean
rm -f *.dvi *.pdf *.ps *.texi *.info *.info-[0-9]* rm -f *.dvi *.pdf *.ps *.texi *.info *.info-[0-9]*
realclean: clobber
distclean: clobber