blob: 432aa9e9229c4c5b79188225b4c514e8fa4a7771 [file] [log] [blame]
Guido van Rossume83e3801995-03-17 16:01:35 +00001# Makefile for Python documentation
2# ---------------------------------
3#
Guido van Rossum73827c61995-03-20 13:00:32 +00004# See also the README file.
5#
Fred Drake6532b9b1999-04-22 14:16:14 +00006# This is a bit of a mess. The documents are identified by short names:
Fred Draked69e2c41998-05-11 18:25:46 +00007# api -- Python/C API Reference Manual
Fred Drake6532b9b1999-04-22 14:16:14 +00008# doc -- Documenting Python
Fred Draked69e2c41998-05-11 18:25:46 +00009# ext -- Extending and Embedding the Python Interpreter
10# lib -- Library Reference Manual
Fred Drake34116ba1998-07-24 15:42:12 +000011# mac -- Macintosh Library Modules
Fred Drakef2951131998-05-07 19:30:16 +000012# ref -- Python Reference Manual
Fred Draked69e2c41998-05-11 18:25:46 +000013# tut -- Python Tutorial
Greg Ward0862f802000-04-28 16:53:36 +000014# inst -- Installing Python Modules
15# dist -- Distributing Python Modules
Guido van Rossume83e3801995-03-17 16:01:35 +000016#
Fred Drake3a045e82001-01-22 20:47:26 +000017# The LaTeX sources for each of these documents are in subdirectories
Fred Drakef2951131998-05-07 19:30:16 +000018# with the three-letter designations above as the directory names.
Guido van Rossum1f175431996-10-22 20:00:02 +000019#
Fred Drake3a045e82001-01-22 20:47:26 +000020# The main target creates HTML for each of the documents. You can
21# also do "make lib" (etc.) to create the HTML versions of individual
22# documents.
Guido van Rossume83e3801995-03-17 16:01:35 +000023#
Fred Drakef2951131998-05-07 19:30:16 +000024# The document classes and styles are in the texinputs/ directory.
25# These define a number of macros that are similar in name and intent
26# as macros in Texinfo (e.g. \code{...} and \emph{...}), as well as a
Fred Drakeefc17bd1998-07-28 21:05:16 +000027# number of environments for formatting function and data definitions.
Fred Drake3a045e82001-01-22 20:47:26 +000028# Documentation for the macros is included in "Documenting Python"; see
29# http://www.python.org/doc/current/doc/doc.html, or the sources for
30# this document in the doc/ directory.
Guido van Rossume83e3801995-03-17 16:01:35 +000031#
Fred Draked69e2c41998-05-11 18:25:46 +000032# Everything is processed by LaTeX. See the file `README' for more
33# information on the tools needed for processing.
Guido van Rossume83e3801995-03-17 16:01:35 +000034#
35# There's a problem with generating the index which has been solved by
36# a sed command applied to the index file. The shell script fix_hack
37# does this (the Makefile takes care of calling it).
38#
Guido van Rossume83e3801995-03-17 16:01:35 +000039# Additional targets attempt to convert selected LaTeX sources to
40# various other formats. These are generally site specific because
41# the tools used are all but universal. These targets are:
Fred Drake34116ba1998-07-24 15:42:12 +000042#
Fred Drake3a045e82001-01-22 20:47:26 +000043# ps -- convert all documents from LaTeX to PostScript
44# pdf -- convert all documents from LaTeX to the
Fred Drakeefc17bd1998-07-28 21:05:16 +000045# Portable Document Format
Fred Drake34116ba1998-07-24 15:42:12 +000046#
Fred Drakeefc17bd1998-07-28 21:05:16 +000047# See the README file for more information on these targets.
Fred Draked69e2c41998-05-11 18:25:46 +000048#
49# The formatted output is located in subdirectories. For PDF and
50# PostScript, look in the paper-$(PAPER)/ directory. For HTML, look in
Fred Drake34116ba1998-07-24 15:42:12 +000051# the html/ directory. If you want to fix the GNU info process, look
Fred Drakeeb7fe4f1998-08-12 17:08:37 +000052# in the info/ directory; please send patches to python-docs@python.org.
Guido van Rossume83e3801995-03-17 16:01:35 +000053
Fred Drake78430b62000-08-29 16:30:21 +000054# This Makefile only includes information on how to perform builds; for
55# dependency information, see Makefile.deps.
56
Fred Drake3a045e82001-01-22 20:47:26 +000057# Customization -- you *may* have to edit this
Guido van Rossume83e3801995-03-17 16:01:35 +000058
Fred Drake3a045e82001-01-22 20:47:26 +000059# You could set this to a4:
Fred Drakef2951131998-05-07 19:30:16 +000060PAPER=letter
61
Guido van Rossum73827c61995-03-20 13:00:32 +000062# Ideally, you shouldn't need to edit beyond this point
Guido van Rossum5b343731992-07-07 09:06:34 +000063
Fred Drakeeb7fe4f1998-08-12 17:08:37 +000064INFODIR= info
65TOOLSDIR= tools
66
Fred Drake860e2561999-07-12 16:52:50 +000067# This is the *documentation* release, and is used to construct the file
68# names of the downloadable tarballs.
Fred Drake9ae09942001-10-18 18:46:22 +000069RELEASE=2.2b1
Fred Drake860e2561999-07-12 16:52:50 +000070
Fred Drakef6bfe8e2001-02-19 19:19:26 +000071PYTHON= python
72DVIPS= dvips -N0 -t $(PAPER)
73
Fred Drake1385a572001-07-17 16:53:19 +000074MKDVI= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --dvi
75MKHTML= $(PYTHON) tools/mkhowto --html --about html/stdabout.dat \
Fred Drakef6bfe8e2001-02-19 19:19:26 +000076 --address $(PYTHONDOCS) --up-link ../index.html \
77 --up-title "Python Documentation Index" \
78 --global-module-index "../modindex.html"
Fred Drake0c77cf12001-10-19 21:12:57 +000079MKISILOHTML=$(PYTHON) tools/mkhowto --html --about html/stdabout.dat \
80 --l2h-init perl/isilo.perl --numeric --split 1
81MKISILO= iSilo386 -U -y -rCR -d0
Fred Drake1385a572001-07-17 16:53:19 +000082MKPDF= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --pdf
83MKPS= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --ps
Fred Drakef6bfe8e2001-02-19 19:19:26 +000084
85BUILDINDEX=$(TOOLSDIR)/buildindex.py
86
Fred Drake1385a572001-07-17 16:53:19 +000087PYTHONDOCS="See <i><a href=\"about.html\">About this document...</a></i> for information on suggesting changes."
Fred Drakef6bfe8e2001-02-19 19:19:26 +000088HTMLBASE= file:`pwd`
89
90# what's what
91MANDVIFILES= paper-$(PAPER)/api.dvi paper-$(PAPER)/ext.dvi \
92 paper-$(PAPER)/lib.dvi paper-$(PAPER)/mac.dvi \
93 paper-$(PAPER)/ref.dvi paper-$(PAPER)/tut.dvi
94HOWTODVIFILES= paper-$(PAPER)/doc.dvi paper-$(PAPER)/inst.dvi \
95 paper-$(PAPER)/dist.dvi
96
97MANPDFFILES= paper-$(PAPER)/api.pdf paper-$(PAPER)/ext.pdf \
98 paper-$(PAPER)/lib.pdf paper-$(PAPER)/mac.pdf \
99 paper-$(PAPER)/ref.pdf paper-$(PAPER)/tut.pdf
100HOWTOPDFFILES= paper-$(PAPER)/doc.pdf paper-$(PAPER)/inst.pdf \
101 paper-$(PAPER)/dist.pdf
102
103MANPSFILES= paper-$(PAPER)/api.ps paper-$(PAPER)/ext.ps \
104 paper-$(PAPER)/lib.ps paper-$(PAPER)/mac.ps \
105 paper-$(PAPER)/ref.ps paper-$(PAPER)/tut.ps
106HOWTOPSFILES= paper-$(PAPER)/doc.ps paper-$(PAPER)/inst.ps \
107 paper-$(PAPER)/dist.ps
108
109DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES)
110PDFFILES= $(MANPDFFILES) $(HOWTOPDFFILES)
111PSFILES= $(MANPSFILES) $(HOWTOPSFILES)
112
Fred Drake0099d8f2001-10-25 15:12:31 +0000113HTMLCSSFILES=html/api/api.css \
114 html/doc/doc.css \
115 html/ext/ext.css \
116 html/lib/lib.css \
117 html/mac/mac.css \
118 html/ref/ref.css \
119 html/tut/tut.css \
120 html/inst/inst.css \
121 html/dist/dist.css
122
123ISILOCSSFILES=isilo/api/api.css \
124 isilo/doc/doc.css \
125 isilo/ext/ext.css \
126 isilo/lib/lib.css \
127 isilo/mac/mac.css \
128 isilo/ref/ref.css \
129 isilo/tut/tut.css \
130 isilo/inst/inst.css \
131 isilo/dist/dist.css
132
133ALLCSSFILES=$(HTMLCSSFILES) $(ISILOCSSFILES)
134
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000135INDEXFILES=html/api/api.html \
136 html/doc/doc.html \
137 html/ext/ext.html \
138 html/lib/lib.html \
139 html/mac/mac.html \
140 html/ref/ref.html \
141 html/tut/tut.html \
142 html/inst/inst.html \
143 html/dist/dist.html
144
Fred Drake5afb5e52001-07-18 21:17:29 +0000145ALLHTMLFILES=$(INDEXFILES) html/index.html html/modindex.html html/acks.html
146
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000147COMMONPERL= perl/manual.perl perl/python.perl perl/l2hinit.perl
148
Fred Drake520b0092001-10-29 17:40:40 +0000149ANNOAPI=api/refcounts.dat tools/anno-api.py
150
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000151include Makefile.deps
Fred Drake33d05b91998-01-13 16:33:09 +0000152
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000153# These must be declared phony since there
154# are directories with matching names:
Greg Ward0862f802000-04-28 16:53:36 +0000155.PHONY: api doc ext lib mac ref tut inst dist
Fred Drake0c77cf12001-10-19 21:12:57 +0000156.PHONY: html info isilo
Fred Drake3f8a59f1998-07-24 13:58:27 +0000157
Fred Drakebbe33c51998-05-07 01:39:06 +0000158
Guido van Rossume83e3801995-03-17 16:01:35 +0000159# Main target
Fred Drake3a045e82001-01-22 20:47:26 +0000160all: html
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000161
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000162dvi: $(DVIFILES)
163pdf: $(PDFFILES)
164ps: $(PSFILES)
Fred Drakee4837a11998-03-06 21:29:34 +0000165
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000166world: ps pdf html distfiles
Guido van Rossum20aca5a1991-01-25 13:29:04 +0000167
Fred Drakef2951131998-05-07 19:30:16 +0000168
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000169# Rules to build PostScript and PDF formats
170.SUFFIXES: .dvi .ps
171
172.dvi.ps:
173 $(DVIPS) -o $@ $<
Fred Draked69e2c41998-05-11 18:25:46 +0000174
175
176# Targets for each document:
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000177# Python/C API Reference Manual
Fred Drake520b0092001-10-29 17:40:40 +0000178paper-$(PAPER)/api.dvi: $(ANNOAPIFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000179 cd paper-$(PAPER) && $(MKDVI) api.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000180
Fred Drake520b0092001-10-29 17:40:40 +0000181paper-$(PAPER)/api.pdf: $(ANNOAPIFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000182 cd paper-$(PAPER) && $(MKPDF) api.tex
Fred Drake15087431999-03-16 16:11:27 +0000183
Fred Drake520b0092001-10-29 17:40:40 +0000184paper-$(PAPER)/api.tex: api/api.tex $(ANNOAPI)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000185 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/api.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000186
Fred Drake520b0092001-10-29 17:40:40 +0000187paper-$(PAPER)/abstract.tex: api/abstract.tex $(ANNOAPI)
188 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/abstract.tex
189
190paper-$(PAPER)/concrete.tex: api/concrete.tex $(ANNOAPI)
191 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/concrete.tex
192
193paper-$(PAPER)/exceptions.tex: api/exceptions.tex $(ANNOAPI)
194 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/exceptions.tex
195
196paper-$(PAPER)/init.tex: api/init.tex $(ANNOAPI)
197 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/init.tex
198
199paper-$(PAPER)/intro.tex: api/intro.tex $(ANNOAPI)
200 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/intro.tex
201
202paper-$(PAPER)/memory.tex: api/memory.tex $(ANNOAPI)
203 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/memory.tex
204
205paper-$(PAPER)/newtypes.tex: api/newtypes.tex $(ANNOAPI)
206 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/newtypes.tex
207
208paper-$(PAPER)/refcounting.tex: api/refcounting.tex $(ANNOAPI)
209 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/refcounting.tex
210
211paper-$(PAPER)/utilities.tex: api/utilities.tex $(ANNOAPI)
212 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/utilities.tex
213
214paper-$(PAPER)/veryhigh.tex: api/veryhigh.tex $(ANNOAPI)
215 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/veryhigh.tex
216
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000217# Distributing Python Modules
218paper-$(PAPER)/dist.dvi: $(DISTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000219 cd paper-$(PAPER) && $(MKDVI) ../dist/dist.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000220
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000221paper-$(PAPER)/dist.pdf: $(DISTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000222 cd paper-$(PAPER) && $(MKPDF) ../dist/dist.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000223
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000224# Documenting Python
225paper-$(PAPER)/doc.dvi: $(DOCFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000226 cd paper-$(PAPER) && $(MKDVI) ../doc/doc.tex
Fred Drake3f8a59f1998-07-24 13:58:27 +0000227
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000228paper-$(PAPER)/doc.pdf: $(DOCFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000229 cd paper-$(PAPER) && $(MKPDF) ../doc/doc.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000230
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000231# Extending and Embedding the Python Interpreter
232paper-$(PAPER)/ext.dvi: $(EXTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000233 cd paper-$(PAPER) && $(MKDVI) ../ext/ext.tex
Greg Ward0862f802000-04-28 16:53:36 +0000234
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000235paper-$(PAPER)/ext.pdf: $(EXTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000236 cd paper-$(PAPER) && $(MKPDF) ../ext/ext.tex
Greg Ward0862f802000-04-28 16:53:36 +0000237
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000238# Installing Python Modules
239paper-$(PAPER)/inst.dvi: $(INSTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000240 cd paper-$(PAPER) && $(MKDVI) ../inst/inst.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000241
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000242paper-$(PAPER)/inst.pdf: $(INSTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000243 cd paper-$(PAPER) && $(MKPDF) ../inst/inst.tex
Fred Drakef2951131998-05-07 19:30:16 +0000244
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000245# Python Library Reference
246paper-$(PAPER)/lib.dvi: $(LIBFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000247 cd paper-$(PAPER) && $(MKDVI) ../lib/lib.tex
Fred Drake15087431999-03-16 16:11:27 +0000248
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000249paper-$(PAPER)/lib.pdf: $(LIBFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000250 cd paper-$(PAPER) && $(MKPDF) ../lib/lib.tex
Fred Drakef2951131998-05-07 19:30:16 +0000251
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000252# Macintosh Library Modules
253paper-$(PAPER)/mac.dvi: $(MACFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000254 cd paper-$(PAPER) && $(MKDVI) ../mac/mac.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000255
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000256paper-$(PAPER)/mac.pdf: $(MACFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000257 cd paper-$(PAPER) && $(MKPDF) ../mac/mac.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000258
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000259# Python Reference Manual
260paper-$(PAPER)/ref.dvi: $(REFFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000261 cd paper-$(PAPER) && $(MKDVI) ../ref/ref.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000262
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000263paper-$(PAPER)/ref.pdf: $(REFFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000264 cd paper-$(PAPER) && $(MKPDF) ../ref/ref.tex
Fred Drakeddae4141998-02-17 15:45:25 +0000265
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000266# Python Tutorial
267paper-$(PAPER)/tut.dvi: $(TUTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000268 cd paper-$(PAPER) && $(MKDVI) ../tut/tut.tex
Greg Ward0862f802000-04-28 16:53:36 +0000269
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000270paper-$(PAPER)/tut.pdf: $(TUTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000271 cd paper-$(PAPER) && $(MKPDF) ../tut/tut.tex
Guido van Rossume83e3801995-03-17 16:01:35 +0000272
273# The remaining part of the Makefile is concerned with various
Guido van Rossum73827c61995-03-20 13:00:32 +0000274# conversions, as described above. See also the README file.
Guido van Rossume83e3801995-03-17 16:01:35 +0000275
Fred Drakeb9838d91998-05-08 15:43:08 +0000276info:
Fred Drake1385a572001-07-17 16:53:19 +0000277 cd $(INFODIR) && $(MAKE)
Fred Drake5ad78f31998-02-22 19:47:13 +0000278
Guido van Rossum73827c61995-03-20 13:00:32 +0000279# Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to
280# HTML converter. For more info on this program, see
Guido van Rossume83e3801995-03-17 16:01:35 +0000281# <URL:http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html>.
Guido van Rossume83e3801995-03-17 16:01:35 +0000282
Guido van Rossum9cb64801997-12-29 20:01:55 +0000283# Note that LaTeX2HTML inserts references to an icons directory in
284# each page that it generates. I have placed a copy of this directory
285# in the distribution to simplify the process of creating a
286# self-contained HTML distribution; for this purpose I have also added
287# a (trivial) index.html. Change the definition of $ICONSERVER in
Fred Drake9fab3aa1998-04-28 19:20:43 +0000288# perl/l2hinit.perl to use a different location for the icons directory.
Guido van Rossume83e3801995-03-17 16:01:35 +0000289
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000290# If you have the standard LaTeX2HTML icons installed, the versions shipped
291# with this documentation should be stored in a separate directory and used
292# instead. The standard set does *not* include all the icons used in the
293# Python documentation.
Fred Drakebbe33c51998-05-07 01:39:06 +0000294
Fred Drake0099d8f2001-10-25 15:12:31 +0000295$(ALLCSSFILES): html/style.css
296 cp $< $@
297
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000298$(INDEXFILES): $(COMMONPERL) html/about.dat tools/node2label.pl
Guido van Rossum6938f061994-08-01 12:22:53 +0000299
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000300html/acks.html: ACKS $(TOOLSDIR)/support.py $(TOOLSDIR)/mkackshtml
Fred Drake1385a572001-07-17 16:53:19 +0000301 $(PYTHON) $(TOOLSDIR)/mkackshtml --address $(PYTHONDOCS) \
Fred Draked27ed852001-02-22 23:06:21 +0000302 --output html/acks.html <ACKS
Guido van Rossum6938f061994-08-01 12:22:53 +0000303
Fred Drake1385a572001-07-17 16:53:19 +0000304
305# html/index.html is dependent on $(INDEXFILES) since we want the date
306# on the front index to be updated whenever any of the child documents
307# are updated and boilerplate.tex uses \today as the date. The index
308# files are not used to actually generate content.
309
310BOILERPLATE=texinputs/boilerplate.tex
311html/index.html: $(INDEXFILES)
312html/index.html: html/index.html.in $(BOILERPLATE) tools/rewrite.py
313 $(PYTHON) tools/rewrite.py $(BOILERPLATE) RELEASE=$(RELEASE) \
314 <$< >$@
315
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000316html/modindex.html: $(TOOLSDIR)/support.py $(TOOLSDIR)/mkmodindex
317html/modindex.html: html/lib/lib.html html/mac/mac.html
Fred Drake1385a572001-07-17 16:53:19 +0000318 cd html && \
319 $(PYTHON) ../$(TOOLSDIR)/mkmodindex --columns 4 \
320 --output modindex.html --address $(PYTHONDOCS) \
321 lib/modindex.html mac/modindex.html
Fred Drake7d5f5dd1999-03-18 19:08:47 +0000322
Fred Drake0099d8f2001-10-25 15:12:31 +0000323html: $(ALLHTMLFILES) $(HTMLCSSFILES)
Guido van Rossum970871f1993-02-21 20:10:26 +0000324
Fred Drake0099d8f2001-10-25 15:12:31 +0000325api: html/api/api.html html/api/api.css
326html/api/api.html: $(APIFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000327 $(MKHTML) --dir html/api api/api.tex
Fred Drakea6bb3961998-05-06 19:51:39 +0000328
Fred Drake0099d8f2001-10-25 15:12:31 +0000329doc: html/doc/doc.html html/doc/doc.css
330html/doc/doc.html: $(DOCFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000331 $(MKHTML) --dir html/doc doc/doc.tex
Fred Drakecdbd3911998-05-15 17:02:10 +0000332
Fred Drake0099d8f2001-10-25 15:12:31 +0000333ext: html/ext/ext.html html/ext/ext.css
334html/ext/ext.html: $(EXTFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000335 $(MKHTML) --dir html/ext ext/ext.tex
Guido van Rossume83e3801995-03-17 16:01:35 +0000336
Fred Drake0099d8f2001-10-25 15:12:31 +0000337lib: html/lib/lib.html html/lib/lib.css
338html/lib/lib.html: $(LIBFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000339 $(MKHTML) --dir html/lib lib/lib.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000340
Fred Drake0099d8f2001-10-25 15:12:31 +0000341mac: html/mac/mac.html html/mac/mac.css
342html/mac/mac.html: $(MACFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000343 $(MKHTML) --dir html/mac mac/mac.tex
Greg Ward0862f802000-04-28 16:53:36 +0000344
Fred Drake0099d8f2001-10-25 15:12:31 +0000345ref: html/ref/ref.html html/ref/ref.css
346html/ref/ref.html: $(REFFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000347 $(MKHTML) --dir html/ref ref/ref.tex
Greg Ward0862f802000-04-28 16:53:36 +0000348
Fred Drake0099d8f2001-10-25 15:12:31 +0000349tut: html/tut/tut.html html/tut/tut.css
350html/tut/tut.html: $(TUTFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000351 $(MKHTML) --dir html/tut --numeric --split 3 tut/tut.tex
352
Fred Drake0099d8f2001-10-25 15:12:31 +0000353inst: html/inst/inst.html html/inst/inst.css
354html/inst/inst.html: $(INSTFILES) perl/distutils.perl
Fred Drake8c011582001-03-01 18:38:56 +0000355 $(MKHTML) --dir html/inst --split 4 inst/inst.tex
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000356
Fred Drake0099d8f2001-10-25 15:12:31 +0000357dist: html/dist/dist.html html/dist/dist.css
358html/dist/dist.html: $(DISTFILES) perl/distutils.perl
Fred Drake8c011582001-03-01 18:38:56 +0000359 $(MKHTML) --dir html/dist --split 4 dist/dist.tex
Fred Drakee7a8c972000-04-07 16:27:15 +0000360
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000361
Fred Drake0c77cf12001-10-19 21:12:57 +0000362# The iSilo format is used by the iSilo document reader for PalmOS devices.
363
364ISILOINDEXFILES=isilo/api/api.html \
365 isilo/doc/doc.html \
366 isilo/ext/ext.html \
367 isilo/lib/lib.html \
368 isilo/mac/mac.html \
369 isilo/ref/ref.html \
370 isilo/tut/tut.html \
371 isilo/inst/inst.html \
372 isilo/dist/dist.html
373
374$(ISILOINDEXFILES): $(COMMONPERL) html/about.dat perl/isilo.perl
375
376isilo: isilo/python-api-$(RELEASE).pdb \
377 isilo/python-doc-$(RELEASE).pdb \
378 isilo/python-ext-$(RELEASE).pdb \
379 isilo/python-lib-$(RELEASE).pdb \
380 isilo/python-mac-$(RELEASE).pdb \
381 isilo/python-ref-$(RELEASE).pdb \
382 isilo/python-tut-$(RELEASE).pdb \
383 isilo/python-dist-$(RELEASE).pdb \
384 isilo/python-inst-$(RELEASE).pdb
385
Fred Drake0099d8f2001-10-25 15:12:31 +0000386isilo/python-api-$(RELEASE).pdb: isilo/api/api.html isilo/api/api.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000387 $(MKISILO) "-iPython/C API Reference Manual" \
388 isilo/api/api.html $@
389
Fred Drake0099d8f2001-10-25 15:12:31 +0000390isilo/python-doc-$(RELEASE).pdb: isilo/doc/doc.html isilo/doc/doc.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000391 $(MKISILO) "-iDocumenting Python" \
392 isilo/doc/doc.html $@
393
Fred Drake0099d8f2001-10-25 15:12:31 +0000394isilo/python-ext-$(RELEASE).pdb: isilo/ext/ext.html isilo/ext/ext.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000395 $(MKISILO) "-iExtending & Embedding Python" \
396 isilo/ext/ext.html $@
397
Fred Drake0099d8f2001-10-25 15:12:31 +0000398isilo/python-lib-$(RELEASE).pdb: isilo/lib/lib.html isilo/lib/lib.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000399 $(MKISILO) "-iPython Library Reference" \
400 isilo/lib/lib.html $@
401
Fred Drake0099d8f2001-10-25 15:12:31 +0000402isilo/python-mac-$(RELEASE).pdb: isilo/mac/mac.html isilo/mac/mac.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000403 $(MKISILO) "-iPython/C API Reference Manual" \
404 isilo/mac/mac.html $@
405
Fred Drake0099d8f2001-10-25 15:12:31 +0000406isilo/python-ref-$(RELEASE).pdb: isilo/ref/ref.html isilo/ref/ref.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000407 $(MKISILO) "-iPython Reference Manual" \
408 isilo/ref/ref.html $@
409
Fred Drake0099d8f2001-10-25 15:12:31 +0000410isilo/python-tut-$(RELEASE).pdb: isilo/tut/tut.html isilo/tut/tut.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000411 $(MKISILO) "-iPython Tutorial" \
412 isilo/tut/tut.html $@
413
Fred Drake0099d8f2001-10-25 15:12:31 +0000414isilo/python-dist-$(RELEASE).pdb: isilo/dist/dist.html isilo/dist/dist.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000415 $(MKISILO) "-iDistributing Python Modules" \
416 isilo/dist/dist.html $@
417
Fred Drake0099d8f2001-10-25 15:12:31 +0000418isilo/python-inst-$(RELEASE).pdb: isilo/inst/inst.html isilo/inst/inst.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000419 $(MKISILO) "-iInstalling Python Modules" \
420 isilo/inst/inst.html $@
421
422isilo/api/api.html: $(APIFILES)
423 $(MKISILOHTML) --dir isilo/api api/api.tex
424
425isilo/doc/doc.html: $(DOCFILES)
426 $(MKISILOHTML) --dir isilo/doc doc/doc.tex
427
428isilo/ext/ext.html: $(EXTFILES)
429 $(MKISILOHTML) --dir isilo/ext ext/ext.tex
430
431isilo/lib/lib.html: $(LIBFILES)
432 $(MKISILOHTML) --dir isilo/lib lib/lib.tex
433
434isilo/mac/mac.html: $(MACFILES)
435 $(MKISILOHTML) --dir isilo/mac mac/mac.tex
436
437isilo/ref/ref.html: $(REFFILES)
438 $(MKISILOHTML) --dir isilo/ref ref/ref.tex
439
440isilo/tut/tut.html: $(TUTFILES)
441 $(MKISILOHTML) --dir isilo/tut tut/tut.tex
442
443isilo/inst/inst.html: $(INSTFILES) perl/distutils.perl
444 $(MKISILOHTML) --dir isilo/inst inst/inst.tex
445
446isilo/dist/dist.html: $(DISTFILES) perl/distutils.perl
447 $(MKISILOHTML) --dir isilo/dist dist/dist.tex
448
449# These are useful if you need to transport the iSilo-ready HTML to
450# another machine to perform the conversion:
451
452isilozip: isilo-html-$(RELEASE).zip
453
454isilo-html-$(RELEASE).zip: $(ISILOINDEXFILES)
455 rm -f $@
456 cd isilo && \
457 zip -q -9 ../$@ */*.css */*.html */*.txt
458
459
Fred Drakee4837a11998-03-06 21:29:34 +0000460# webchecker needs an extra flag to process the huge index from the libref
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000461WEBCHECKER=$(PYTHON) ../Tools/webchecker/webchecker.py
462HTMLBASE= file:`pwd`/html
463
Fred Drake5afb5e52001-07-18 21:17:29 +0000464webcheck: $(ALLHTMLFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000465 $(WEBCHECKER) $(HTMLBASE)/api/
466 $(WEBCHECKER) $(HTMLBASE)/doc/
467 $(WEBCHECKER) $(HTMLBASE)/ext/
468 $(WEBCHECKER) -m290000 $(HTMLBASE)/lib/
469 $(WEBCHECKER) $(HTMLBASE)/mac/
470 $(WEBCHECKER) $(HTMLBASE)/ref/
471 $(WEBCHECKER) $(HTMLBASE)/tut/
472 $(WEBCHECKER) $(HTMLBASE)/dist/
473 $(WEBCHECKER) $(HTMLBASE)/inst/
474
Fred Drake5afb5e52001-07-18 21:17:29 +0000475fastwebcheck: $(ALLHTMLFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000476 $(WEBCHECKER) -x $(HTMLBASE)/api/
477 $(WEBCHECKER) -x $(HTMLBASE)/doc/
478 $(WEBCHECKER) -x $(HTMLBASE)/ext/
479 $(WEBCHECKER) -x -m290000 $(HTMLBASE)/lib/
480 $(WEBCHECKER) -x $(HTMLBASE)/mac/
481 $(WEBCHECKER) -x $(HTMLBASE)/ref/
482 $(WEBCHECKER) -x $(HTMLBASE)/tut/
483 $(WEBCHECKER) -x $(HTMLBASE)/dist/
484 $(WEBCHECKER) -x $(HTMLBASE)/inst/
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000485
486
487# Release packaging targets:
Fred Drakee4837a11998-03-06 21:29:34 +0000488
Fred Drake5afb5e52001-07-18 21:17:29 +0000489paper-$(PAPER)/README: $(PSFILES) $(TOOLSDIR)/getpagecounts
Fred Drake1385a572001-07-17 16:53:19 +0000490 cd paper-$(PAPER) && ../$(TOOLSDIR)/getpagecounts >../$@
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000491
Fred Drakeb6584ca1999-01-08 15:49:45 +0000492info-$(RELEASE).tgz: info
Fred Drake1385a572001-07-17 16:53:19 +0000493 cd $(INFODIR) && tar cf - README python.dir python-*.info* \
Fred Drake28e66d11999-01-29 22:23:25 +0000494 | gzip -9 >$@
Fred Drakea7998351998-02-19 16:01:04 +0000495
Fred Drake4ef3ea01999-07-27 16:30:59 +0000496info-$(RELEASE).tar.bz2: info
Fred Drake1385a572001-07-17 16:53:19 +0000497 cd $(INFODIR) && tar cf - README python.dir python-*.info* \
Fred Drake4ef3ea01999-07-27 16:30:59 +0000498 | bzip2 -9 >$@
499
Fred Drakee34ab301998-05-11 21:10:15 +0000500latex-$(RELEASE).tgz:
Fred Drake1385a572001-07-17 16:53:19 +0000501 $(PYTHON) $(TOOLSDIR)/mksourcepkg --gzip $(RELEASE)
Fred Drakee61d7af1998-03-05 16:37:34 +0000502
Fred Drake4ef3ea01999-07-27 16:30:59 +0000503latex-$(RELEASE).tar.bz2:
Fred Drake1385a572001-07-17 16:53:19 +0000504 $(PYTHON) $(TOOLSDIR)/mksourcepkg --bzip2 $(RELEASE)
Fred Drake4ef3ea01999-07-27 16:30:59 +0000505
Fred Drake7dcc69a1999-07-23 16:11:36 +0000506latex-$(RELEASE).zip:
Fred Drake02ba6212000-04-04 20:58:25 +0000507 rm -f $@
Fred Drake1385a572001-07-17 16:53:19 +0000508 $(PYTHON) $(TOOLSDIR)/mksourcepkg --zip $(RELEASE)
Fred Drake7dcc69a1999-07-23 16:11:36 +0000509
Fred Drake5afb5e52001-07-18 21:17:29 +0000510pdf-$(PAPER)-$(RELEASE).tar: $(PDFFILES)
511 cd paper-$(PAPER) && tar cf ../$@ *.pdf
Fred Drake04cf4dc1998-02-12 22:33:50 +0000512
Fred Drake5afb5e52001-07-18 21:17:29 +0000513pdf-$(PAPER)-$(RELEASE).tgz: pdf-$(PAPER)-$(RELEASE).tar
514 gzip -9 <$? >$@
515
516pdf-$(PAPER)-$(RELEASE).tar.bz2: pdf-$(PAPER)-$(RELEASE).tar
517 bzip2 -9 <$? >$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000518
Fred Drake7dcc69a1999-07-23 16:11:36 +0000519pdf-$(PAPER)-$(RELEASE).zip: pdf
Fred Drake02ba6212000-04-04 20:58:25 +0000520 rm -f $@
Fred Drake1385a572001-07-17 16:53:19 +0000521 cd paper-$(PAPER) && zip -q -9 ../$@ *.pdf
Fred Drake7dcc69a1999-07-23 16:11:36 +0000522
Fred Drake5afb5e52001-07-18 21:17:29 +0000523postscript-$(PAPER)-$(RELEASE).tar: $(PSFILES) paper-$(PAPER)/README
524 cd paper-$(PAPER) && tar cf ../$@ *.ps README
Fred Drake04cf4dc1998-02-12 22:33:50 +0000525
Fred Drake5afb5e52001-07-18 21:17:29 +0000526postscript-$(PAPER)-$(RELEASE).tar.bz2: postscript-$(PAPER)-$(RELEASE).tar
527 bzip2 -9 <$< >$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000528
Fred Drake5afb5e52001-07-18 21:17:29 +0000529postscript-$(PAPER)-$(RELEASE).tgz: postscript-$(PAPER)-$(RELEASE).tar
530 gzip -9 <$< >$@
531
532postscript-$(PAPER)-$(RELEASE).zip: $(PSFILES) paper-$(PAPER)/README
Fred Drake02ba6212000-04-04 20:58:25 +0000533 rm -f $@
Fred Drake1385a572001-07-17 16:53:19 +0000534 cd paper-$(PAPER) && zip -q -9 ../$@ *.ps README
Fred Drake7dcc69a1999-07-23 16:11:36 +0000535
Fred Drake0099d8f2001-10-25 15:12:31 +0000536html-$(RELEASE).tar: $(ALLHTMLFILES) $(HTMLCSSFILES)
Fred Drake9ae09942001-10-18 18:46:22 +0000537 cd html && \
Fred Drake8f65aef2001-07-17 23:35:46 +0000538 tar cf ../html-$(RELEASE).tar *.html */*.css */*.html \
539 */*.gif */*.txt
Fred Drake33d05b91998-01-13 16:33:09 +0000540
Fred Drake8f65aef2001-07-17 23:35:46 +0000541html-$(RELEASE).tgz: html-$(RELEASE).tar
Fred Drake5afb5e52001-07-18 21:17:29 +0000542 gzip -9 <$? >$@
Fred Drake8f65aef2001-07-17 23:35:46 +0000543
544html-$(RELEASE).tar.bz2: html-$(RELEASE).tar
Fred Drake5afb5e52001-07-18 21:17:29 +0000545 bzip2 -9 <$? >$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000546
Fred Drake0099d8f2001-10-25 15:12:31 +0000547html-$(RELEASE).zip: $(ALLHTMLFILES) $(HTMLCSSFILES)
Fred Drake02ba6212000-04-04 20:58:25 +0000548 rm -f $@
Fred Drake9ae09942001-10-18 18:46:22 +0000549 cd html && \
Fred Drake1385a572001-07-17 16:53:19 +0000550 zip -q -9 ../$@ *.html */*.css */*.html */*.gif */*.txt
Fred Drake7dcc69a1999-07-23 16:11:36 +0000551
Fred Drake0c77cf12001-10-19 21:12:57 +0000552isilo-$(RELEASE).zip: isilo
553 cd isilo && zip -q -9 ../$@ python-*-$(RELEASE).pdb
554
555
Fred Drakea7998351998-02-19 16:01:04 +0000556# convenience targets:
557
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000558tarhtml: html-$(RELEASE).tgz
Fred Drakeb6584ca1999-01-08 15:49:45 +0000559tarinfo: info-$(RELEASE).tgz
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000560tarps: postscript-$(PAPER)-$(RELEASE).tgz
561tarpdf: pdf-$(PAPER)-$(RELEASE).tgz
562tarlatex: latex-$(RELEASE).tgz
Fred Drakebbe33c51998-05-07 01:39:06 +0000563
Fred Drake83c09831999-08-02 20:20:14 +0000564tarballs: tarpdf tarps tarhtml
Guido van Rossum84cca441997-11-25 20:49:09 +0000565
Fred Drake7dcc69a1999-07-23 16:11:36 +0000566ziphtml: html-$(RELEASE).zip
567zipps: postscript-$(PAPER)-$(RELEASE).zip
568zippdf: pdf-$(PAPER)-$(RELEASE).zip
569ziplatex: latex-$(RELEASE).zip
Fred Drake0c77cf12001-10-19 21:12:57 +0000570zipisilo: isilo-$(RELEASE).zip
Fred Drake7dcc69a1999-07-23 16:11:36 +0000571
Fred Drakeb906d2e2000-07-01 02:37:37 +0000572zips: zippdf zipps ziphtml
Fred Drake7dcc69a1999-07-23 16:11:36 +0000573
Fred Drake4ef3ea01999-07-27 16:30:59 +0000574bziphtml: html-$(RELEASE).tar.bz2
575bzipinfo: info-$(RELEASE).tar.bz2
576bzipps: postscript-$(PAPER)-$(RELEASE).tar.bz2
577bzippdf: pdf-$(PAPER)-$(RELEASE).tar.bz2
578bziplatex: latex-$(RELEASE).tar.bz2
579
Fred Drake83c09831999-08-02 20:20:14 +0000580bzips: bzippdf bzipps bziphtml
Fred Drake4ef3ea01999-07-27 16:30:59 +0000581
Fred Drakefc4ee0a2001-04-13 18:00:23 +0000582disthtml: tarhtml bziphtml ziphtml
583distinfo: tarinfo bzipinfo
584distps: tarps bzipps zipps
585distpdf: tarpdf bzippdf zippdf
586distlatex: tarlatex bziplatex ziplatex
587
Fred Drake5afb5e52001-07-18 21:17:29 +0000588paperdist: distpdf distps
589edist: disthtml
590
591distfiles: paperdist edist
Fred Drake88634602001-01-25 17:32:51 +0000592 $(TOOLSDIR)/mksourcepkg --all $(RELEASE)
Fred Drake4ef3ea01999-07-27 16:30:59 +0000593
Guido van Rossume83e3801995-03-17 16:01:35 +0000594
595# Housekeeping targets
596
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000597# Remove temporary files; all except the following:
Fred Drake6659c301998-03-03 22:02:19 +0000598# - sources: .tex, .bib, .sty, *.cls
Fred Drake04cf4dc1998-02-12 22:33:50 +0000599# - useful results: .dvi, .pdf, .ps, .texi, .info
Fred Drakee4837a11998-03-06 21:29:34 +0000600clean:
Fred Drake8f65aef2001-07-17 23:35:46 +0000601 rm -f html-$(RELEASE).tar
Fred Drake1385a572001-07-17 16:53:19 +0000602 cd $(INFODIR) && $(MAKE) clean
Guido van Rossum5b343731992-07-07 09:06:34 +0000603
Guido van Rossume83e3801995-03-17 16:01:35 +0000604# Remove temporaries as well as final products
Fred Drakeb6584ca1999-01-08 15:49:45 +0000605clobber:
Fred Drake8f65aef2001-07-17 23:35:46 +0000606 rm -f html-$(RELEASE).tar
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000607 rm -f html-$(RELEASE).tgz info-$(RELEASE).tgz
608 rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz
Fred Drake7dcc69a1999-07-23 16:11:36 +0000609 rm -f latex-$(RELEASE).tgz html-$(RELEASE).zip
610 rm -f pdf-$(RELEASE).zip postscript-$(RELEASE).zip
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000611 rm -f $(DVIFILES) $(PSFILES) $(PDFFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000612 cd $(INFODIR) && $(MAKE) clobber
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000613 rm -rf html/index.html html/modindex.html html/acks.html
614 rm -rf html/api/ html/doc/ html/ext/ html/lib/ html/mac/
615 rm -rf html/ref/ html/tut/ html/inst/ html/dist/
Fred Drake0c77cf12001-10-19 21:12:57 +0000616 rm -rf isilo/api/ isilo/doc/ isilo/ext/ isilo/lib/ isilo/mac/
617 rm -rf isilo/ref/ isilo/tut/ isilo/inst/ isilo/dist/
618 rm -f isilo/python-*-$(RELEASE).pdb isilo-$(RELEASE).zip
Fred Drake5ad78f31998-02-22 19:47:13 +0000619
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000620realclean distclean: clobber