13
13
# The latex sources for each of these documents are in subdirectories
14
14
# with the three-letter designations above as the directory names.
15
15
#
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
18
18
# documents.
19
19
#
20
20
# The document classes and styles are in the texinputs/ directory.
@@ -54,6 +54,8 @@ KPSEWHICH= TEXINPUTS=$(TEXINPUTS) kpsewhich tex
54
54
MAKEINDEX = makeindex -s $(srcdir ) /texinputs/myindex.ist
55
55
ACROREAD = acroread
56
56
L2HARGS =
57
+ # HTMLDIR should not be '.'!
58
+ HTMLDIR = html
57
59
PYTHON = python
58
60
WEBCHECKER = $(PYTHON ) $(srcdir ) /../Tools/webchecker/webchecker.py
59
61
@@ -63,10 +65,7 @@ LIBDESTDIR= $DESTDIR/lib
63
65
LIBDEST = $LIBDESTDIR/python$(VERSION )
64
66
DOCDESTDIR = $LIBDEST/doc
65
67
66
- # These is only used for .info generation:
67
- EMACS = emacs
68
- MAKEINFO = makeinfo
69
- PARTPARSE = $(PYTHON ) $(srcdir ) /tools/partparse.py
68
+ INFODIR = info
70
69
71
70
srcdir =.
72
71
VPATH =.
@@ -77,12 +76,11 @@ RELEASE=1.5.1
77
76
VERSION =1.5
78
77
79
78
DVIFILES = api.dvi ext.dvi lib.dvi ref.dvi tut.dvi
80
- INFOFILES = python-lib.info
81
79
PDFFILES = api.pdf ext.pdf lib.pdf ref.pdf tut.pdf
82
80
PSFILES = api.ps ext.ps lib.ps ref.ps tut.ps
83
81
84
82
# Be careful when messing with this one!
85
- TEXINPUTS = .:$( srcdir ) /texinputs:
83
+ TEXINPUTS = .:.. /texinputs:
86
84
87
85
MKDVI = TEXINPUTS=$(TEXINPUTS ) $(srcdir ) /tools/mkdvi.sh
88
86
MKHTML = TEXINPUTS=$(TEXINPUTS ) $(srcdir ) /tools/mkhtml.sh
@@ -92,13 +90,19 @@ MKPDF= TEXINPUTS=$(TEXINPUTS) $(srcdir)/tools/mkdvi.sh --pdf
92
90
all : all-ps
93
91
94
92
all-dvi :
95
- (cd paper-$( PAPER) ; $( MAKE) all-dvi)
93
+ (cd paper-$( PAPER) ; \
94
+ $(MAKE ) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS ) \
95
+ -f ../Makefile do-dvi)
96
96
97
97
all-pdf :
98
- (cd paper-$( PAPER) ; $( MAKE) all-pdf)
98
+ (cd paper-$( PAPER) ; \
99
+ $(MAKE ) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS ) \
100
+ -f ../Makefile do-pdf)
99
101
100
102
all-ps :
101
- (cd paper-$( PAPER) ; $( MAKE) all-ps)
103
+ (cd paper-$( PAPER) ; \
104
+ $(MAKE ) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS ) \
105
+ -f ../Makefile do-ps)
102
106
103
107
world : do-ps do-pdf l2h tarballs
104
108
@@ -233,34 +237,10 @@ tut.pdf: tut/tut.tex
233
237
# The remaining part of the Makefile is concerned with various
234
238
# conversions, as described above. See also the README file.
235
239
236
- .PRECIOUS : python-lib.texi
240
+ .PHONY : info
237
241
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) )
264
244
265
245
# Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to
266
246
# HTML converter. For more info on this program, see
@@ -276,7 +256,7 @@ lib.texi: python-lib.texi
276
256
COMMONPERL =perl/manual.perl perl/python.perl
277
257
278
258
l2h :
279
- (cd html ; $( MAKE) TEXINPUTS=../paper-$( PAPER) :../texinputs)
259
+ (cd $( HTMLDIR ) ; $( MAKE) TEXINPUTS=../paper-$( PAPER) :../texinputs)
280
260
281
261
l2hapi : $(COMMONPERL )
282
262
$(MKHTML ) api $(L2HARGS )
@@ -303,21 +283,21 @@ webcheck:
303
283
$(WEBCHECKER ) file:` pwd` /ref/
304
284
$(WEBCHECKER ) file:` pwd` /tut/
305
285
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 > $@
308
288
309
289
latex-$(RELEASE ) .tar.gz :
310
290
$(srcdir ) /tools/mktarball.sh
311
291
312
292
# This snags a PDF version if available, but doesn't fail if not.
313
293
pdf-$(RELEASE ) .tar.gz : $(PDFFILES )
314
- tar cf - ??? .pdf | gzip -9 > $@
294
+ tar cf - -C paper- $( PAPER ) ??? .pdf | gzip -9 > $@
315
295
316
296
postscript-$(RELEASE ) .tar.gz : $(PSFILES )
317
- tar cf - ??? .ps | gzip -9 > $@
297
+ tar cf - -C paper- $( PAPER ) ??? .ps | gzip -9 > $@
318
298
319
299
html-$(RELEASE ) .tar.gz :
320
- tar cf - index.html ??? /??? .css ??? /* .html * /* .gif \
300
+ tar cf - -C $( HTMLDIR ) index.html ??? /??? .css ??? /* .html * /* .gif \
321
301
| gzip -9 > html-$(RELEASE ) .tar.gz
322
302
323
303
# convenience targets:
@@ -341,19 +321,20 @@ tarballs: tarpdf tarps tarhtml tarlatex
341
321
# - sources: .tex, .bib, .sty, *.cls
342
322
# - useful results: .dvi, .pdf, .ps, .texi, .info
343
323
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)
346
327
rm -f html-$(RELEASE ) .tar.gz info-$(RELEASE ) .tar.gz
347
328
rm -f pdf-$(RELEASE ) .tar.gz postscript-$(RELEASE ) .tar.gz
348
329
rm -f latex-$(RELEASE ) .tar.gz
349
330
350
331
l2hclean :
351
- rm -rf api ext lib tut
332
+ (cd $( HTMLDIR ) ; rm -rf api ext lib ref tut)
352
333
353
334
# Remove temporaries as well as final products
354
335
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]* )
357
338
358
339
realclean : clobber
359
340
distclean : clobber
0 commit comments