Skip to content

Commit b9838d9

Browse files
committed
Fix a comment.
Avoid extra level of recursion in the paper-*/ directories. Added the "info" target to use the subdir. Partparse, however, is broken again.
1 parent 9447e59 commit b9838d9

File tree

1 file changed

+30
-49
lines changed

1 file changed

+30
-49
lines changed

Doc/Makefile

Lines changed: 30 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# The latex sources for each of these documents are in subdirectories
1414
# with the three-letter designations above as the directory names.
1515
#
16-
# The main target "make all" creates DVI and PostScript for these
17-
# four. You can also do "make lib" (etc.) to process individual
16+
# The main target "make all" creates DVI and PostScript for the main
17+
# targets. You can also do "make lib" (etc.) to process individual
1818
# documents.
1919
#
2020
# The document classes and styles are in the texinputs/ directory.
@@ -54,6 +54,8 @@ KPSEWHICH= TEXINPUTS=$(TEXINPUTS) kpsewhich tex
5454
MAKEINDEX= makeindex -s $(srcdir)/texinputs/myindex.ist
5555
ACROREAD= acroread
5656
L2HARGS=
57+
# HTMLDIR should not be '.'!
58+
HTMLDIR= html
5759
PYTHON= python
5860
WEBCHECKER= $(PYTHON) $(srcdir)/../Tools/webchecker/webchecker.py
5961

@@ -63,10 +65,7 @@ LIBDESTDIR= $DESTDIR/lib
6365
LIBDEST= $LIBDESTDIR/python$(VERSION)
6466
DOCDESTDIR= $LIBDEST/doc
6567

66-
# These is only used for .info generation:
67-
EMACS= emacs
68-
MAKEINFO= makeinfo
69-
PARTPARSE= $(PYTHON) $(srcdir)/tools/partparse.py
68+
INFODIR= info
7069

7170
srcdir=.
7271
VPATH=.
@@ -77,12 +76,11 @@ RELEASE=1.5.1
7776
VERSION=1.5
7877

7978
DVIFILES= api.dvi ext.dvi lib.dvi ref.dvi tut.dvi
80-
INFOFILES= python-lib.info
8179
PDFFILES= api.pdf ext.pdf lib.pdf ref.pdf tut.pdf
8280
PSFILES= api.ps ext.ps lib.ps ref.ps tut.ps
8381

8482
# Be careful when messing with this one!
85-
TEXINPUTS= .:$(srcdir)/texinputs:
83+
TEXINPUTS= .:../texinputs:
8684

8785
MKDVI= TEXINPUTS=$(TEXINPUTS) $(srcdir)/tools/mkdvi.sh
8886
MKHTML= TEXINPUTS=$(TEXINPUTS) $(srcdir)/tools/mkhtml.sh
@@ -92,13 +90,19 @@ MKPDF= TEXINPUTS=$(TEXINPUTS) $(srcdir)/tools/mkdvi.sh --pdf
9290
all: all-ps
9391

9492
all-dvi:
95-
(cd paper-$(PAPER); $(MAKE) all-dvi)
93+
(cd paper-$(PAPER); \
94+
$(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
95+
-f ../Makefile do-dvi)
9696

9797
all-pdf:
98-
(cd paper-$(PAPER); $(MAKE) all-pdf)
98+
(cd paper-$(PAPER); \
99+
$(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
100+
-f ../Makefile do-pdf)
99101

100102
all-ps:
101-
(cd paper-$(PAPER); $(MAKE) all-ps)
103+
(cd paper-$(PAPER); \
104+
$(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
105+
-f ../Makefile do-ps)
102106

103107
world: do-ps do-pdf l2h tarballs
104108

@@ -233,34 +237,10 @@ tut.pdf: tut/tut.tex
233237
# The remaining part of the Makefile is concerned with various
234238
# conversions, as described above. See also the README file.
235239

236-
.PRECIOUS: python-lib.texi
240+
.PHONY: info
237241

238-
# The sed script in this target fixes a really nasty little condition in
239-
# libcgi.tex where \e has to be used in a group to get the right behavior,
240-
# and makeinfo can't handle a group without a leading @command. But at
241-
# least the info file gets generated.
242-
243-
lib1.texi: $(LIBFILES) texipre.dat texipost.dat tools/partparse.py
244-
$(PARTPARSE) -o $@ `$(srcdir)/tools/whichlibs`
245-
sed 's/"{\\}n{\\}n/"\\n\\n/' $@ >temp.texi
246-
mv temp.texi $@
247-
248-
python-lib.texi: lib1.texi tools/fix.el
249-
cp lib1.texi temp.texi
250-
$(EMACS) -batch -l $(srcdir)/tools/fix.el -f save-buffer -kill
251-
mv temp.texi $@
252-
253-
python-lib.info: python-lib.texi
254-
$(MAKEINFO) --footnote-style end --fill-column 72 \
255-
--paragraph-indent 0 $<
256-
257-
# this is needed to prevent a second set of info files from being generated,
258-
# at least when using GNU make
259-
.PHONY: lib.info lib.texi
260-
261-
lib.info: python-lib.info
262-
263-
lib.texi: python-lib.texi
242+
info:
243+
(cd $(INFODIR); $(MAKE))
264244

265245
# Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to
266246
# HTML converter. For more info on this program, see
@@ -276,7 +256,7 @@ lib.texi: python-lib.texi
276256
COMMONPERL=perl/manual.perl perl/python.perl
277257

278258
l2h:
279-
(cd html; $(MAKE) TEXINPUTS=../paper-$(PAPER):../texinputs)
259+
(cd $(HTMLDIR); $(MAKE) TEXINPUTS=../paper-$(PAPER):../texinputs)
280260

281261
l2hapi: $(COMMONPERL)
282262
$(MKHTML) api $(L2HARGS)
@@ -303,21 +283,21 @@ webcheck:
303283
$(WEBCHECKER) file:`pwd`/ref/
304284
$(WEBCHECKER) file:`pwd`/tut/
305285

306-
lib-info-$(RELEASE).tar.gz: $(INFOFILES)
307-
tar cf - python-???.info* | gzip -9 >$@
286+
lib-info-$(RELEASE).tar.gz: info
287+
tar cf - -C $(INFODIR) python-???.info* | gzip -9 >$@
308288

309289
latex-$(RELEASE).tar.gz:
310290
$(srcdir)/tools/mktarball.sh
311291

312292
# This snags a PDF version if available, but doesn't fail if not.
313293
pdf-$(RELEASE).tar.gz: $(PDFFILES)
314-
tar cf - ???.pdf | gzip -9 >$@
294+
tar cf - -C paper-$(PAPER) ???.pdf | gzip -9 >$@
315295

316296
postscript-$(RELEASE).tar.gz: $(PSFILES)
317-
tar cf - ???.ps | gzip -9 >$@
297+
tar cf - -C paper-$(PAPER) ???.ps | gzip -9 >$@
318298

319299
html-$(RELEASE).tar.gz:
320-
tar cf - index.html ???/???.css ???/*.html */*.gif \
300+
tar cf - -C $(HTMLDIR) index.html ???/???.css ???/*.html */*.gif \
321301
| gzip -9 >html-$(RELEASE).tar.gz
322302

323303
# convenience targets:
@@ -341,19 +321,20 @@ tarballs: tarpdf tarps tarhtml tarlatex
341321
# - sources: .tex, .bib, .sty, *.cls
342322
# - useful results: .dvi, .pdf, .ps, .texi, .info
343323
clean:
344-
rm -f @* *~ *.aux *.idx *.ilg *.ind *.log *.toc *.blg *.bbl *.py[co]
345-
rm -f *.bak *.orig lib1.texi *.out @webchecker.pickle *.bkm
324+
(cd paper-$(PAPER); rm -f *~ *.aux *.idx *.ilg *.ind *.log *.toc *.bkm)
325+
rm -f *.bak *.orig lib1.texi
326+
(cd $(HTMLDIR); rm -f @webchecker.pickle)
346327
rm -f html-$(RELEASE).tar.gz info-$(RELEASE).tar.gz
347328
rm -f pdf-$(RELEASE).tar.gz postscript-$(RELEASE).tar.gz
348329
rm -f latex-$(RELEASE).tar.gz
349330

350331
l2hclean:
351-
rm -rf api ext lib tut
332+
(cd $(HTMLDIR); rm -rf api ext lib ref tut)
352333

353334
# Remove temporaries as well as final products
354335
clobber: clean l2hclean
355-
rm -f $(DVIFILES) $(PSFILES) $(PDFFILES)
356-
rm -f *.texi python-???.info python-???.info-[0-9]*
336+
(cd paper-$(PAPER); rm -f $(DVIFILES) $(PSFILES) $(PDFFILES))
337+
(cd $(HTMLDIR); rm -f *.texi python-???.info python-???.info-[0-9]*)
357338

358339
realclean: clobber
359340
distclean: clobber

0 commit comments

Comments
 (0)