blob: e38b8926a0353bd743172a8fcb934e492088c638 [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 +000064HTMLDIR= html
65INFODIR= info
66TOOLSDIR= tools
67
Fred Drake860e2561999-07-12 16:52:50 +000068# This is the *documentation* release, and is used to construct the file
69# names of the downloadable tarballs.
Fred Drake5afb5e52001-07-18 21:17:29 +000070RELEASE=2.2a2
Fred Drake860e2561999-07-12 16:52:50 +000071
Fred Drakef6bfe8e2001-02-19 19:19:26 +000072PYTHON= python
73DVIPS= dvips -N0 -t $(PAPER)
74
Fred Drake1385a572001-07-17 16:53:19 +000075MKDVI= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --dvi
76MKHTML= $(PYTHON) tools/mkhowto --html --about html/stdabout.dat \
Fred Drakef6bfe8e2001-02-19 19:19:26 +000077 --address $(PYTHONDOCS) --up-link ../index.html \
78 --up-title "Python Documentation Index" \
79 --global-module-index "../modindex.html"
Fred Drake1385a572001-07-17 16:53:19 +000080MKPDF= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --pdf
81MKPS= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --ps
Fred Drakef6bfe8e2001-02-19 19:19:26 +000082
83BUILDINDEX=$(TOOLSDIR)/buildindex.py
84
Fred Drake1385a572001-07-17 16:53:19 +000085PYTHONDOCS="See <i><a href=\"about.html\">About this document...</a></i> for information on suggesting changes."
Fred Drakef6bfe8e2001-02-19 19:19:26 +000086HTMLBASE= file:`pwd`
87
88# what's what
89MANDVIFILES= paper-$(PAPER)/api.dvi paper-$(PAPER)/ext.dvi \
90 paper-$(PAPER)/lib.dvi paper-$(PAPER)/mac.dvi \
91 paper-$(PAPER)/ref.dvi paper-$(PAPER)/tut.dvi
92HOWTODVIFILES= paper-$(PAPER)/doc.dvi paper-$(PAPER)/inst.dvi \
93 paper-$(PAPER)/dist.dvi
94
95MANPDFFILES= paper-$(PAPER)/api.pdf paper-$(PAPER)/ext.pdf \
96 paper-$(PAPER)/lib.pdf paper-$(PAPER)/mac.pdf \
97 paper-$(PAPER)/ref.pdf paper-$(PAPER)/tut.pdf
98HOWTOPDFFILES= paper-$(PAPER)/doc.pdf paper-$(PAPER)/inst.pdf \
99 paper-$(PAPER)/dist.pdf
100
101MANPSFILES= paper-$(PAPER)/api.ps paper-$(PAPER)/ext.ps \
102 paper-$(PAPER)/lib.ps paper-$(PAPER)/mac.ps \
103 paper-$(PAPER)/ref.ps paper-$(PAPER)/tut.ps
104HOWTOPSFILES= paper-$(PAPER)/doc.ps paper-$(PAPER)/inst.ps \
105 paper-$(PAPER)/dist.ps
106
107DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES)
108PDFFILES= $(MANPDFFILES) $(HOWTOPDFFILES)
109PSFILES= $(MANPSFILES) $(HOWTOPSFILES)
110
111INDEXFILES=html/api/api.html \
112 html/doc/doc.html \
113 html/ext/ext.html \
114 html/lib/lib.html \
115 html/mac/mac.html \
116 html/ref/ref.html \
117 html/tut/tut.html \
118 html/inst/inst.html \
119 html/dist/dist.html
120
Fred Drake5afb5e52001-07-18 21:17:29 +0000121ALLHTMLFILES=$(INDEXFILES) html/index.html html/modindex.html html/acks.html
122
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000123COMMONPERL= perl/manual.perl perl/python.perl perl/l2hinit.perl
124
125include Makefile.deps
Fred Drake33d05b91998-01-13 16:33:09 +0000126
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000127# These must be declared phony since there
128# are directories with matching names:
Greg Ward0862f802000-04-28 16:53:36 +0000129.PHONY: api doc ext lib mac ref tut inst dist
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000130.PHONY: html info
Fred Drake3f8a59f1998-07-24 13:58:27 +0000131
Fred Drakebbe33c51998-05-07 01:39:06 +0000132
Guido van Rossume83e3801995-03-17 16:01:35 +0000133# Main target
Fred Drake3a045e82001-01-22 20:47:26 +0000134all: html
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000135
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000136dvi: $(DVIFILES)
137pdf: $(PDFFILES)
138ps: $(PSFILES)
Fred Drakee4837a11998-03-06 21:29:34 +0000139
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000140world: ps pdf html distfiles
Guido van Rossum20aca5a1991-01-25 13:29:04 +0000141
Fred Drakef2951131998-05-07 19:30:16 +0000142
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000143# Rules to build PostScript and PDF formats
144.SUFFIXES: .dvi .ps
145
146.dvi.ps:
147 $(DVIPS) -o $@ $<
Fred Draked69e2c41998-05-11 18:25:46 +0000148
149
150# Targets for each document:
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000151# Python/C API Reference Manual
152paper-$(PAPER)/api.dvi: paper-$(PAPER)/api.tex $(APIFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000153 cd paper-$(PAPER) && $(MKDVI) api.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000154
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000155paper-$(PAPER)/api.pdf: paper-$(PAPER)/api.tex $(APIFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000156 cd paper-$(PAPER) && $(MKPDF) api.tex
Fred Drake15087431999-03-16 16:11:27 +0000157
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000158paper-$(PAPER)/api.tex: api/api.tex api/refcounts.dat tools/anno-api.py
159 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/api.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000160
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000161# Distributing Python Modules
162paper-$(PAPER)/dist.dvi: $(DISTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000163 cd paper-$(PAPER) && $(MKDVI) ../dist/dist.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000164
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000165paper-$(PAPER)/dist.pdf: $(DISTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000166 cd paper-$(PAPER) && $(MKPDF) ../dist/dist.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000167
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000168# Documenting Python
169paper-$(PAPER)/doc.dvi: $(DOCFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000170 cd paper-$(PAPER) && $(MKDVI) ../doc/doc.tex
Fred Drake3f8a59f1998-07-24 13:58:27 +0000171
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000172paper-$(PAPER)/doc.pdf: $(DOCFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000173 cd paper-$(PAPER) && $(MKPDF) ../doc/doc.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000174
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000175# Extending and Embedding the Python Interpreter
176paper-$(PAPER)/ext.dvi: $(EXTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000177 cd paper-$(PAPER) && $(MKDVI) ../ext/ext.tex
Greg Ward0862f802000-04-28 16:53:36 +0000178
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000179paper-$(PAPER)/ext.pdf: $(EXTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000180 cd paper-$(PAPER) && $(MKPDF) ../ext/ext.tex
Greg Ward0862f802000-04-28 16:53:36 +0000181
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000182# Installing Python Modules
183paper-$(PAPER)/inst.dvi: $(INSTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000184 cd paper-$(PAPER) && $(MKDVI) ../inst/inst.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000185
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000186paper-$(PAPER)/inst.pdf: $(INSTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000187 cd paper-$(PAPER) && $(MKPDF) ../inst/inst.tex
Fred Drakef2951131998-05-07 19:30:16 +0000188
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000189# Python Library Reference
190paper-$(PAPER)/lib.dvi: $(LIBFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000191 cd paper-$(PAPER) && $(MKDVI) ../lib/lib.tex
Fred Drake15087431999-03-16 16:11:27 +0000192
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000193paper-$(PAPER)/lib.pdf: $(LIBFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000194 cd paper-$(PAPER) && $(MKPDF) ../lib/lib.tex
Fred Drakef2951131998-05-07 19:30:16 +0000195
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000196# Macintosh Library Modules
197paper-$(PAPER)/mac.dvi: $(MACFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000198 cd paper-$(PAPER) && $(MKDVI) ../mac/mac.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000199
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000200paper-$(PAPER)/mac.pdf: $(MACFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000201 cd paper-$(PAPER) && $(MKPDF) ../mac/mac.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000202
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000203# Python Reference Manual
204paper-$(PAPER)/ref.dvi: $(REFFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000205 cd paper-$(PAPER) && $(MKDVI) ../ref/ref.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000206
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000207paper-$(PAPER)/ref.pdf: $(REFFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000208 cd paper-$(PAPER) && $(MKPDF) ../ref/ref.tex
Fred Drakeddae4141998-02-17 15:45:25 +0000209
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000210# Python Tutorial
211paper-$(PAPER)/tut.dvi: $(TUTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000212 cd paper-$(PAPER) && $(MKDVI) ../tut/tut.tex
Greg Ward0862f802000-04-28 16:53:36 +0000213
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000214paper-$(PAPER)/tut.pdf: $(TUTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000215 cd paper-$(PAPER) && $(MKPDF) ../tut/tut.tex
Guido van Rossume83e3801995-03-17 16:01:35 +0000216
217# The remaining part of the Makefile is concerned with various
Guido van Rossum73827c61995-03-20 13:00:32 +0000218# conversions, as described above. See also the README file.
Guido van Rossume83e3801995-03-17 16:01:35 +0000219
Fred Drakeb9838d91998-05-08 15:43:08 +0000220info:
Fred Drake1385a572001-07-17 16:53:19 +0000221 cd $(INFODIR) && $(MAKE)
Fred Drake5ad78f31998-02-22 19:47:13 +0000222
Guido van Rossum73827c61995-03-20 13:00:32 +0000223# Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to
224# HTML converter. For more info on this program, see
Guido van Rossume83e3801995-03-17 16:01:35 +0000225# <URL:http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html>.
Guido van Rossume83e3801995-03-17 16:01:35 +0000226
Guido van Rossum9cb64801997-12-29 20:01:55 +0000227# Note that LaTeX2HTML inserts references to an icons directory in
228# each page that it generates. I have placed a copy of this directory
229# in the distribution to simplify the process of creating a
230# self-contained HTML distribution; for this purpose I have also added
231# a (trivial) index.html. Change the definition of $ICONSERVER in
Fred Drake9fab3aa1998-04-28 19:20:43 +0000232# perl/l2hinit.perl to use a different location for the icons directory.
Guido van Rossume83e3801995-03-17 16:01:35 +0000233
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000234# If you have the standard LaTeX2HTML icons installed, the versions shipped
235# with this documentation should be stored in a separate directory and used
236# instead. The standard set does *not* include all the icons used in the
237# Python documentation.
Fred Drakebbe33c51998-05-07 01:39:06 +0000238
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000239$(INDEXFILES): $(COMMONPERL) html/about.dat tools/node2label.pl
Guido van Rossum6938f061994-08-01 12:22:53 +0000240
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000241html/acks.html: ACKS $(TOOLSDIR)/support.py $(TOOLSDIR)/mkackshtml
Fred Drake1385a572001-07-17 16:53:19 +0000242 $(PYTHON) $(TOOLSDIR)/mkackshtml --address $(PYTHONDOCS) \
Fred Draked27ed852001-02-22 23:06:21 +0000243 --output html/acks.html <ACKS
Guido van Rossum6938f061994-08-01 12:22:53 +0000244
Fred Drake1385a572001-07-17 16:53:19 +0000245
246# html/index.html is dependent on $(INDEXFILES) since we want the date
247# on the front index to be updated whenever any of the child documents
248# are updated and boilerplate.tex uses \today as the date. The index
249# files are not used to actually generate content.
250
251BOILERPLATE=texinputs/boilerplate.tex
252html/index.html: $(INDEXFILES)
253html/index.html: html/index.html.in $(BOILERPLATE) tools/rewrite.py
254 $(PYTHON) tools/rewrite.py $(BOILERPLATE) RELEASE=$(RELEASE) \
255 <$< >$@
256
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000257html/modindex.html: $(TOOLSDIR)/support.py $(TOOLSDIR)/mkmodindex
258html/modindex.html: html/lib/lib.html html/mac/mac.html
Fred Drake1385a572001-07-17 16:53:19 +0000259 cd html && \
260 $(PYTHON) ../$(TOOLSDIR)/mkmodindex --columns 4 \
261 --output modindex.html --address $(PYTHONDOCS) \
262 lib/modindex.html mac/modindex.html
Fred Drake7d5f5dd1999-03-18 19:08:47 +0000263
Fred Drake5afb5e52001-07-18 21:17:29 +0000264html: $(ALLHTMLFILES)
Guido van Rossum970871f1993-02-21 20:10:26 +0000265
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000266api html/api/api.html: $(APIFILES)
267 $(MKHTML) --dir html/api api/api.tex
Fred Drakea6bb3961998-05-06 19:51:39 +0000268
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000269doc html/doc/doc.html: $(DOCFILES)
270 $(MKHTML) --dir html/doc doc/doc.tex
Fred Drakecdbd3911998-05-15 17:02:10 +0000271
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000272ext html/ext/ext.html: $(EXTFILES)
273 $(MKHTML) --dir html/ext ext/ext.tex
Guido van Rossume83e3801995-03-17 16:01:35 +0000274
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000275lib html/lib/lib.html: $(LIBFILES)
276 $(MKHTML) --dir html/lib lib/lib.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000277
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000278mac html/mac/mac.html: $(MACFILES)
279 $(MKHTML) --dir html/mac mac/mac.tex
Greg Ward0862f802000-04-28 16:53:36 +0000280
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000281ref html/ref/ref.html: $(REFFILES)
282 $(MKHTML) --dir html/ref ref/ref.tex
Greg Ward0862f802000-04-28 16:53:36 +0000283
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000284tut html/tut/tut.html: $(TUTFILES)
285 $(MKHTML) --dir html/tut --numeric --split 3 tut/tut.tex
286
287inst html/inst/inst.html: $(INSTFILES) perl/distutils.perl
Fred Drake8c011582001-03-01 18:38:56 +0000288 $(MKHTML) --dir html/inst --split 4 inst/inst.tex
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000289
290dist html/dist/dist.html: $(DISTFILES) perl/distutils.perl
Fred Drake8c011582001-03-01 18:38:56 +0000291 $(MKHTML) --dir html/dist --split 4 dist/dist.tex
Fred Drakee7a8c972000-04-07 16:27:15 +0000292
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000293
Fred Drakee4837a11998-03-06 21:29:34 +0000294# webchecker needs an extra flag to process the huge index from the libref
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000295WEBCHECKER=$(PYTHON) ../Tools/webchecker/webchecker.py
296HTMLBASE= file:`pwd`/html
297
Fred Drake5afb5e52001-07-18 21:17:29 +0000298webcheck: $(ALLHTMLFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000299 $(WEBCHECKER) $(HTMLBASE)/api/
300 $(WEBCHECKER) $(HTMLBASE)/doc/
301 $(WEBCHECKER) $(HTMLBASE)/ext/
302 $(WEBCHECKER) -m290000 $(HTMLBASE)/lib/
303 $(WEBCHECKER) $(HTMLBASE)/mac/
304 $(WEBCHECKER) $(HTMLBASE)/ref/
305 $(WEBCHECKER) $(HTMLBASE)/tut/
306 $(WEBCHECKER) $(HTMLBASE)/dist/
307 $(WEBCHECKER) $(HTMLBASE)/inst/
308
Fred Drake5afb5e52001-07-18 21:17:29 +0000309fastwebcheck: $(ALLHTMLFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000310 $(WEBCHECKER) -x $(HTMLBASE)/api/
311 $(WEBCHECKER) -x $(HTMLBASE)/doc/
312 $(WEBCHECKER) -x $(HTMLBASE)/ext/
313 $(WEBCHECKER) -x -m290000 $(HTMLBASE)/lib/
314 $(WEBCHECKER) -x $(HTMLBASE)/mac/
315 $(WEBCHECKER) -x $(HTMLBASE)/ref/
316 $(WEBCHECKER) -x $(HTMLBASE)/tut/
317 $(WEBCHECKER) -x $(HTMLBASE)/dist/
318 $(WEBCHECKER) -x $(HTMLBASE)/inst/
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000319
320
321# Release packaging targets:
Fred Drakee4837a11998-03-06 21:29:34 +0000322
Fred Drake5afb5e52001-07-18 21:17:29 +0000323paper-$(PAPER)/README: $(PSFILES) $(TOOLSDIR)/getpagecounts
Fred Drake1385a572001-07-17 16:53:19 +0000324 cd paper-$(PAPER) && ../$(TOOLSDIR)/getpagecounts >../$@
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000325
Fred Drakeb6584ca1999-01-08 15:49:45 +0000326info-$(RELEASE).tgz: info
Fred Drake1385a572001-07-17 16:53:19 +0000327 cd $(INFODIR) && tar cf - README python.dir python-*.info* \
Fred Drake28e66d11999-01-29 22:23:25 +0000328 | gzip -9 >$@
Fred Drakea7998351998-02-19 16:01:04 +0000329
Fred Drake4ef3ea01999-07-27 16:30:59 +0000330info-$(RELEASE).tar.bz2: info
Fred Drake1385a572001-07-17 16:53:19 +0000331 cd $(INFODIR) && tar cf - README python.dir python-*.info* \
Fred Drake4ef3ea01999-07-27 16:30:59 +0000332 | bzip2 -9 >$@
333
Fred Drakee34ab301998-05-11 21:10:15 +0000334latex-$(RELEASE).tgz:
Fred Drake1385a572001-07-17 16:53:19 +0000335 $(PYTHON) $(TOOLSDIR)/mksourcepkg --gzip $(RELEASE)
Fred Drakee61d7af1998-03-05 16:37:34 +0000336
Fred Drake4ef3ea01999-07-27 16:30:59 +0000337latex-$(RELEASE).tar.bz2:
Fred Drake1385a572001-07-17 16:53:19 +0000338 $(PYTHON) $(TOOLSDIR)/mksourcepkg --bzip2 $(RELEASE)
Fred Drake4ef3ea01999-07-27 16:30:59 +0000339
Fred Drake7dcc69a1999-07-23 16:11:36 +0000340latex-$(RELEASE).zip:
Fred Drake02ba6212000-04-04 20:58:25 +0000341 rm -f $@
Fred Drake1385a572001-07-17 16:53:19 +0000342 $(PYTHON) $(TOOLSDIR)/mksourcepkg --zip $(RELEASE)
Fred Drake7dcc69a1999-07-23 16:11:36 +0000343
Fred Drake5afb5e52001-07-18 21:17:29 +0000344pdf-$(PAPER)-$(RELEASE).tar: $(PDFFILES)
345 cd paper-$(PAPER) && tar cf ../$@ *.pdf
Fred Drake04cf4dc1998-02-12 22:33:50 +0000346
Fred Drake5afb5e52001-07-18 21:17:29 +0000347pdf-$(PAPER)-$(RELEASE).tgz: pdf-$(PAPER)-$(RELEASE).tar
348 gzip -9 <$? >$@
349
350pdf-$(PAPER)-$(RELEASE).tar.bz2: pdf-$(PAPER)-$(RELEASE).tar
351 bzip2 -9 <$? >$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000352
Fred Drake7dcc69a1999-07-23 16:11:36 +0000353pdf-$(PAPER)-$(RELEASE).zip: pdf
Fred Drake02ba6212000-04-04 20:58:25 +0000354 rm -f $@
Fred Drake1385a572001-07-17 16:53:19 +0000355 cd paper-$(PAPER) && zip -q -9 ../$@ *.pdf
Fred Drake7dcc69a1999-07-23 16:11:36 +0000356
Fred Drake5afb5e52001-07-18 21:17:29 +0000357postscript-$(PAPER)-$(RELEASE).tar: $(PSFILES) paper-$(PAPER)/README
358 cd paper-$(PAPER) && tar cf ../$@ *.ps README
Fred Drake04cf4dc1998-02-12 22:33:50 +0000359
Fred Drake5afb5e52001-07-18 21:17:29 +0000360postscript-$(PAPER)-$(RELEASE).tar.bz2: postscript-$(PAPER)-$(RELEASE).tar
361 bzip2 -9 <$< >$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000362
Fred Drake5afb5e52001-07-18 21:17:29 +0000363postscript-$(PAPER)-$(RELEASE).tgz: postscript-$(PAPER)-$(RELEASE).tar
364 gzip -9 <$< >$@
365
366postscript-$(PAPER)-$(RELEASE).zip: $(PSFILES) paper-$(PAPER)/README
Fred Drake02ba6212000-04-04 20:58:25 +0000367 rm -f $@
Fred Drake1385a572001-07-17 16:53:19 +0000368 cd paper-$(PAPER) && zip -q -9 ../$@ *.ps README
Fred Drake7dcc69a1999-07-23 16:11:36 +0000369
Fred Drake8f65aef2001-07-17 23:35:46 +0000370html-$(RELEASE).tar: html
Fred Drake1385a572001-07-17 16:53:19 +0000371 cd $(HTMLDIR) && \
Fred Drake8f65aef2001-07-17 23:35:46 +0000372 tar cf ../html-$(RELEASE).tar *.html */*.css */*.html \
373 */*.gif */*.txt
Fred Drake33d05b91998-01-13 16:33:09 +0000374
Fred Drake8f65aef2001-07-17 23:35:46 +0000375html-$(RELEASE).tgz: html-$(RELEASE).tar
Fred Drake5afb5e52001-07-18 21:17:29 +0000376 gzip -9 <$? >$@
Fred Drake8f65aef2001-07-17 23:35:46 +0000377
378html-$(RELEASE).tar.bz2: html-$(RELEASE).tar
Fred Drake5afb5e52001-07-18 21:17:29 +0000379 bzip2 -9 <$? >$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000380
Fred Drake5afb5e52001-07-18 21:17:29 +0000381html-$(RELEASE).zip: $(ALLHTMLFILES)
Fred Drake02ba6212000-04-04 20:58:25 +0000382 rm -f $@
Fred Drake1385a572001-07-17 16:53:19 +0000383 cd $(HTMLDIR) && \
384 zip -q -9 ../$@ *.html */*.css */*.html */*.gif */*.txt
Fred Drake7dcc69a1999-07-23 16:11:36 +0000385
Fred Drakea7998351998-02-19 16:01:04 +0000386# convenience targets:
387
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000388tarhtml: html-$(RELEASE).tgz
Fred Drakeb6584ca1999-01-08 15:49:45 +0000389tarinfo: info-$(RELEASE).tgz
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000390tarps: postscript-$(PAPER)-$(RELEASE).tgz
391tarpdf: pdf-$(PAPER)-$(RELEASE).tgz
392tarlatex: latex-$(RELEASE).tgz
Fred Drakebbe33c51998-05-07 01:39:06 +0000393
Fred Drake83c09831999-08-02 20:20:14 +0000394tarballs: tarpdf tarps tarhtml
Guido van Rossum84cca441997-11-25 20:49:09 +0000395
Fred Drake7dcc69a1999-07-23 16:11:36 +0000396ziphtml: html-$(RELEASE).zip
397zipps: postscript-$(PAPER)-$(RELEASE).zip
398zippdf: pdf-$(PAPER)-$(RELEASE).zip
399ziplatex: latex-$(RELEASE).zip
400
Fred Drakeb906d2e2000-07-01 02:37:37 +0000401zips: zippdf zipps ziphtml
Fred Drake7dcc69a1999-07-23 16:11:36 +0000402
Fred Drake4ef3ea01999-07-27 16:30:59 +0000403bziphtml: html-$(RELEASE).tar.bz2
404bzipinfo: info-$(RELEASE).tar.bz2
405bzipps: postscript-$(PAPER)-$(RELEASE).tar.bz2
406bzippdf: pdf-$(PAPER)-$(RELEASE).tar.bz2
407bziplatex: latex-$(RELEASE).tar.bz2
408
Fred Drake83c09831999-08-02 20:20:14 +0000409bzips: bzippdf bzipps bziphtml
Fred Drake4ef3ea01999-07-27 16:30:59 +0000410
Fred Drakefc4ee0a2001-04-13 18:00:23 +0000411disthtml: tarhtml bziphtml ziphtml
412distinfo: tarinfo bzipinfo
413distps: tarps bzipps zipps
414distpdf: tarpdf bzippdf zippdf
415distlatex: tarlatex bziplatex ziplatex
416
Fred Drake5afb5e52001-07-18 21:17:29 +0000417paperdist: distpdf distps
418edist: disthtml
419
420distfiles: paperdist edist
Fred Drake88634602001-01-25 17:32:51 +0000421 $(TOOLSDIR)/mksourcepkg --all $(RELEASE)
Fred Drake4ef3ea01999-07-27 16:30:59 +0000422
Guido van Rossume83e3801995-03-17 16:01:35 +0000423
424# Housekeeping targets
425
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000426# Remove temporary files; all except the following:
Fred Drake6659c301998-03-03 22:02:19 +0000427# - sources: .tex, .bib, .sty, *.cls
Fred Drake04cf4dc1998-02-12 22:33:50 +0000428# - useful results: .dvi, .pdf, .ps, .texi, .info
Fred Drakee4837a11998-03-06 21:29:34 +0000429clean:
Fred Drake8f65aef2001-07-17 23:35:46 +0000430 rm -f html-$(RELEASE).tar
Fred Drake1385a572001-07-17 16:53:19 +0000431 cd $(INFODIR) && $(MAKE) clean
Guido van Rossum5b343731992-07-07 09:06:34 +0000432
Guido van Rossume83e3801995-03-17 16:01:35 +0000433# Remove temporaries as well as final products
Fred Drakeb6584ca1999-01-08 15:49:45 +0000434clobber:
Fred Drake8f65aef2001-07-17 23:35:46 +0000435 rm -f html-$(RELEASE).tar
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000436 rm -f html-$(RELEASE).tgz info-$(RELEASE).tgz
437 rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz
Fred Drake7dcc69a1999-07-23 16:11:36 +0000438 rm -f latex-$(RELEASE).tgz html-$(RELEASE).zip
439 rm -f pdf-$(RELEASE).zip postscript-$(RELEASE).zip
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000440 rm -f $(DVIFILES) $(PSFILES) $(PDFFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000441 cd $(INFODIR) && $(MAKE) clobber
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000442 rm -rf html/index.html html/modindex.html html/acks.html
443 rm -rf html/api/ html/doc/ html/ext/ html/lib/ html/mac/
444 rm -rf html/ref/ html/tut/ html/inst/ html/dist/
Fred Drake5ad78f31998-02-22 19:47:13 +0000445
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000446realclean distclean: clobber