]> granicus.if.org Git - python/commitdiff
Changed way *.ind are forced to exist; the files are now reset to contain
authorFred Drake <fdrake@acm.org>
Sun, 22 Feb 1998 19:47:13 +0000 (19:47 +0000)
committerFred Drake <fdrake@acm.org>
Sun, 22 Feb 1998 19:47:13 +0000 (19:47 +0000)
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.

Doc/Makefile

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