blob: 7f58378035f76a69f608be2df44ac63032483e0a (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
# you could set this to a4
PAPER=letter
# Where are the various programs?
LATEX= latex
PDFLATEX= pdflatex
DVIPS= dvips -N0 -t $(PAPER)
MAKEINDEX= makeindex -s ../texinputs/python.ist
PYTHON= python
TOOLSDIR= ../tools
TEXINPUTS= .:../texinputs:
MKDVI= TEXINPUTS=$(TEXINPUTS) $(TOOLSDIR)/mkdvi.sh
MKHOWTO= $(TOOLSDIR)/mkhowto.sh --keep
MKPDF= TEXINPUTS=$(TEXINPUTS) $(TOOLSDIR)/mkdvi.sh --pdf
# what's what
MANDVIFILES= api.dvi ext.dvi lib.dvi ref.dvi tut.dvi
HOWTODVIFILES= mac.dvi
MANPDFFILES= api.pdf ext.pdf lib.pdf ref.pdf tut.pdf
HOWTOPDFFILES= mac.pdf
MANPSFILES= api.ps ext.ps lib.ps ref.ps tut.ps
HOWTOPSFILES= mac.ps
DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES)
PDFFILES= $(MANPDFFILES) $(HOWTOPDFFILES)
PSFILES= $(MANPSFILES) $(HOWTOPSFILES)
include ../Makefile.deps
COMMONSTYLES= ../texinputs/python.sty \
../texinputs/pypaper.sty \
../texinputs/python.ist
COMMONTEX= ../texinputs/copyright.tex \
../texinputs/boilerplate.tex
MANSTYLES= ../texinputs/fncychap.sty \
../texinputs/manual.cls \
$(COMMONSTYLES)
HOWTOSTYLES= ../texinputs/howto.cls \
$(COMMONSTYLES)
$(DVIFILES): ../tools/fix_hack ../tools/mkdvi.sh $(COMMONTEX)
$(PDFFILES): ../tools/fix_hack ../tools/mkdvi.sh $(COMMONTEX)
$(MANDVIFILES): $(MANSTYLES)
$(MANPDFFILES): $(MANSTYLES)
$(HOWTODVIFILES): ../tools/mkhowto.sh $(HOWTOSTYLES)
$(HOWTOPDFFILES): ../tools/mkhowto.sh $(HOWTOSTYLES)
# Rules to build PostScript and PDF formats
.SUFFIXES: .dvi .ps .pdf
.dvi.ps:
$(DVIPS) -o $@ $<
all: ps
dvi: $(DVIFILES)
pdf: $(PDFFILES)
ps: $(PSFILES)
README: $(PSFILES)
$(TOOLSDIR)/getpagecounts >$@
# Python Library Reference
lib.dvi: $(TOOLSDIR)/indfix.py $(LIBFILES)
$(TOOLSDIR)/newind.py >$*.ind
$(TOOLSDIR)/newind.py modindex >mod$*.ind
TEXINPUTS=../lib:$(TEXINPUTS) $(LATEX) $*
$(MAKEINDEX) mod$*.idx
$(TOOLSDIR)/fix_hack $*.idx
$(MAKEINDEX) $*.idx
$(TOOLSDIR)/indfix.py $*.ind
TEXINPUTS=../lib:$(TEXINPUTS) $(LATEX) $*
lib.pdf: $(TOOLSDIR)/indfix.py $(LIBFILES)
$(TOOLSDIR)/newind.py >$*.ind
$(TOOLSDIR)/newind.py modindex >mod$*.ind
TEXINPUTS=../lib:$(TEXINPUTS) $(PDFLATEX) $*
$(MAKEINDEX) mod$*.idx
$(TOOLSDIR)/fix_hack $*.idx
$(MAKEINDEX) $*.idx
$(TOOLSDIR)/indfix.py $*.ind
$(TOOLSDIR)/toc2bkm.py $*
TEXINPUTS=../lib:$(TEXINPUTS) $(PDFLATEX) $*
# Python/C API Reference Manual
api.dvi: $(APIFILES)
$(MKDVI) api
api.pdf: $(APIFILES)
$(MKPDF) api
# Extending and Embedding the Python Interpreter
ext.dvi: $(EXTFILES)
$(MKDVI) ext
ext.pdf: $(EXTFILES)
$(MKPDF) ext
# Macintosh Library Modules
mac.dvi: $(MACFILES)
$(MKHOWTO) --dvi ../$*/$*.tex
mac.pdf: $(MACFILES)
$(MKHOWTO) --pdf ../$*/$*.tex
# Python Reference Manual
ref.dvi: $(REFFILES)
$(MKDVI) ref
ref.pdf: $(REFFILES)
$(MKPDF) ref
# Python Tutorial
tut.dvi: $(TUTFILES)
$(MKDVI) tut
tut.pdf: $(TUTFILES)
$(MKPDF) tut
clean:
rm -f *~ *.aux *.idx *.ilg *.ind *.log *.toc *.bkm *.syn
clobber: clean
rm -f $(DVIFILES) $(PSFILES) $(PDFFILES)
realclean: clobber
distclean: clobber
|