blob: e11449dc6e8327d9c68839734b57c963da53c6dd [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 Drake1385a572001-07-17 16:53:19 +000079MKPDF= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --pdf
80MKPS= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --ps
Fred Drakef6bfe8e2001-02-19 19:19:26 +000081
82BUILDINDEX=$(TOOLSDIR)/buildindex.py
83
Fred Drake1385a572001-07-17 16:53:19 +000084PYTHONDOCS="See <i><a href=\"about.html\">About this document...</a></i> for information on suggesting changes."
Fred Drakef6bfe8e2001-02-19 19:19:26 +000085HTMLBASE= file:`pwd`
86
87# what's what
88MANDVIFILES= paper-$(PAPER)/api.dvi paper-$(PAPER)/ext.dvi \
89 paper-$(PAPER)/lib.dvi paper-$(PAPER)/mac.dvi \
90 paper-$(PAPER)/ref.dvi paper-$(PAPER)/tut.dvi
91HOWTODVIFILES= paper-$(PAPER)/doc.dvi paper-$(PAPER)/inst.dvi \
92 paper-$(PAPER)/dist.dvi
93
94MANPDFFILES= paper-$(PAPER)/api.pdf paper-$(PAPER)/ext.pdf \
95 paper-$(PAPER)/lib.pdf paper-$(PAPER)/mac.pdf \
96 paper-$(PAPER)/ref.pdf paper-$(PAPER)/tut.pdf
97HOWTOPDFFILES= paper-$(PAPER)/doc.pdf paper-$(PAPER)/inst.pdf \
98 paper-$(PAPER)/dist.pdf
99
100MANPSFILES= paper-$(PAPER)/api.ps paper-$(PAPER)/ext.ps \
101 paper-$(PAPER)/lib.ps paper-$(PAPER)/mac.ps \
102 paper-$(PAPER)/ref.ps paper-$(PAPER)/tut.ps
103HOWTOPSFILES= paper-$(PAPER)/doc.ps paper-$(PAPER)/inst.ps \
104 paper-$(PAPER)/dist.ps
105
106DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES)
107PDFFILES= $(MANPDFFILES) $(HOWTOPDFFILES)
108PSFILES= $(MANPSFILES) $(HOWTOPSFILES)
109
110INDEXFILES=html/api/api.html \
111 html/doc/doc.html \
112 html/ext/ext.html \
113 html/lib/lib.html \
114 html/mac/mac.html \
115 html/ref/ref.html \
116 html/tut/tut.html \
117 html/inst/inst.html \
118 html/dist/dist.html
119
Fred Drake5afb5e52001-07-18 21:17:29 +0000120ALLHTMLFILES=$(INDEXFILES) html/index.html html/modindex.html html/acks.html
121
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000122COMMONPERL= perl/manual.perl perl/python.perl perl/l2hinit.perl
123
124include Makefile.deps
Fred Drake33d05b91998-01-13 16:33:09 +0000125
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000126# These must be declared phony since there
127# are directories with matching names:
Greg Ward0862f802000-04-28 16:53:36 +0000128.PHONY: api doc ext lib mac ref tut inst dist
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000129.PHONY: html info
Fred Drake3f8a59f1998-07-24 13:58:27 +0000130
Fred Drakebbe33c51998-05-07 01:39:06 +0000131
Guido van Rossume83e3801995-03-17 16:01:35 +0000132# Main target
Fred Drake3a045e82001-01-22 20:47:26 +0000133all: html
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000134
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000135dvi: $(DVIFILES)
136pdf: $(PDFFILES)
137ps: $(PSFILES)
Fred Drakee4837a11998-03-06 21:29:34 +0000138
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000139world: ps pdf html distfiles
Guido van Rossum20aca5a1991-01-25 13:29:04 +0000140
Fred Drakef2951131998-05-07 19:30:16 +0000141
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000142# Rules to build PostScript and PDF formats
143.SUFFIXES: .dvi .ps
144
145.dvi.ps:
146 $(DVIPS) -o $@ $<
Fred Draked69e2c41998-05-11 18:25:46 +0000147
148
149# Targets for each document:
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000150# Python/C API Reference Manual
151paper-$(PAPER)/api.dvi: paper-$(PAPER)/api.tex $(APIFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000152 cd paper-$(PAPER) && $(MKDVI) api.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000153
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000154paper-$(PAPER)/api.pdf: paper-$(PAPER)/api.tex $(APIFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000155 cd paper-$(PAPER) && $(MKPDF) api.tex
Fred Drake15087431999-03-16 16:11:27 +0000156
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000157paper-$(PAPER)/api.tex: api/api.tex api/refcounts.dat tools/anno-api.py
158 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/api.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000159
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000160# Distributing Python Modules
161paper-$(PAPER)/dist.dvi: $(DISTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000162 cd paper-$(PAPER) && $(MKDVI) ../dist/dist.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000163
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000164paper-$(PAPER)/dist.pdf: $(DISTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000165 cd paper-$(PAPER) && $(MKPDF) ../dist/dist.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000166
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000167# Documenting Python
168paper-$(PAPER)/doc.dvi: $(DOCFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000169 cd paper-$(PAPER) && $(MKDVI) ../doc/doc.tex
Fred Drake3f8a59f1998-07-24 13:58:27 +0000170
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000171paper-$(PAPER)/doc.pdf: $(DOCFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000172 cd paper-$(PAPER) && $(MKPDF) ../doc/doc.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000173
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000174# Extending and Embedding the Python Interpreter
175paper-$(PAPER)/ext.dvi: $(EXTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000176 cd paper-$(PAPER) && $(MKDVI) ../ext/ext.tex
Greg Ward0862f802000-04-28 16:53:36 +0000177
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000178paper-$(PAPER)/ext.pdf: $(EXTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000179 cd paper-$(PAPER) && $(MKPDF) ../ext/ext.tex
Greg Ward0862f802000-04-28 16:53:36 +0000180
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000181# Installing Python Modules
182paper-$(PAPER)/inst.dvi: $(INSTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000183 cd paper-$(PAPER) && $(MKDVI) ../inst/inst.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000184
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000185paper-$(PAPER)/inst.pdf: $(INSTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000186 cd paper-$(PAPER) && $(MKPDF) ../inst/inst.tex
Fred Drakef2951131998-05-07 19:30:16 +0000187
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000188# Python Library Reference
189paper-$(PAPER)/lib.dvi: $(LIBFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000190 cd paper-$(PAPER) && $(MKDVI) ../lib/lib.tex
Fred Drake15087431999-03-16 16:11:27 +0000191
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000192paper-$(PAPER)/lib.pdf: $(LIBFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000193 cd paper-$(PAPER) && $(MKPDF) ../lib/lib.tex
Fred Drakef2951131998-05-07 19:30:16 +0000194
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000195# Macintosh Library Modules
196paper-$(PAPER)/mac.dvi: $(MACFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000197 cd paper-$(PAPER) && $(MKDVI) ../mac/mac.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000198
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000199paper-$(PAPER)/mac.pdf: $(MACFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000200 cd paper-$(PAPER) && $(MKPDF) ../mac/mac.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000201
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000202# Python Reference Manual
203paper-$(PAPER)/ref.dvi: $(REFFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000204 cd paper-$(PAPER) && $(MKDVI) ../ref/ref.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000205
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000206paper-$(PAPER)/ref.pdf: $(REFFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000207 cd paper-$(PAPER) && $(MKPDF) ../ref/ref.tex
Fred Drakeddae4141998-02-17 15:45:25 +0000208
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000209# Python Tutorial
210paper-$(PAPER)/tut.dvi: $(TUTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000211 cd paper-$(PAPER) && $(MKDVI) ../tut/tut.tex
Greg Ward0862f802000-04-28 16:53:36 +0000212
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000213paper-$(PAPER)/tut.pdf: $(TUTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000214 cd paper-$(PAPER) && $(MKPDF) ../tut/tut.tex
Guido van Rossume83e3801995-03-17 16:01:35 +0000215
216# The remaining part of the Makefile is concerned with various
Guido van Rossum73827c61995-03-20 13:00:32 +0000217# conversions, as described above. See also the README file.
Guido van Rossume83e3801995-03-17 16:01:35 +0000218
Fred Drakeb9838d91998-05-08 15:43:08 +0000219info:
Fred Drake1385a572001-07-17 16:53:19 +0000220 cd $(INFODIR) && $(MAKE)
Fred Drake5ad78f31998-02-22 19:47:13 +0000221
Guido van Rossum73827c61995-03-20 13:00:32 +0000222# Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to
223# HTML converter. For more info on this program, see
Guido van Rossume83e3801995-03-17 16:01:35 +0000224# <URL:http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html>.
Guido van Rossume83e3801995-03-17 16:01:35 +0000225
Guido van Rossum9cb64801997-12-29 20:01:55 +0000226# Note that LaTeX2HTML inserts references to an icons directory in
227# each page that it generates. I have placed a copy of this directory
228# in the distribution to simplify the process of creating a
229# self-contained HTML distribution; for this purpose I have also added
230# a (trivial) index.html. Change the definition of $ICONSERVER in
Fred Drake9fab3aa1998-04-28 19:20:43 +0000231# perl/l2hinit.perl to use a different location for the icons directory.
Guido van Rossume83e3801995-03-17 16:01:35 +0000232
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000233# If you have the standard LaTeX2HTML icons installed, the versions shipped
234# with this documentation should be stored in a separate directory and used
235# instead. The standard set does *not* include all the icons used in the
236# Python documentation.
Fred Drakebbe33c51998-05-07 01:39:06 +0000237
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000238$(INDEXFILES): $(COMMONPERL) html/about.dat tools/node2label.pl
Guido van Rossum6938f061994-08-01 12:22:53 +0000239
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000240html/acks.html: ACKS $(TOOLSDIR)/support.py $(TOOLSDIR)/mkackshtml
Fred Drake1385a572001-07-17 16:53:19 +0000241 $(PYTHON) $(TOOLSDIR)/mkackshtml --address $(PYTHONDOCS) \
Fred Draked27ed852001-02-22 23:06:21 +0000242 --output html/acks.html <ACKS
Guido van Rossum6938f061994-08-01 12:22:53 +0000243
Fred Drake1385a572001-07-17 16:53:19 +0000244
245# html/index.html is dependent on $(INDEXFILES) since we want the date
246# on the front index to be updated whenever any of the child documents
247# are updated and boilerplate.tex uses \today as the date. The index
248# files are not used to actually generate content.
249
250BOILERPLATE=texinputs/boilerplate.tex
251html/index.html: $(INDEXFILES)
252html/index.html: html/index.html.in $(BOILERPLATE) tools/rewrite.py
253 $(PYTHON) tools/rewrite.py $(BOILERPLATE) RELEASE=$(RELEASE) \
254 <$< >$@
255
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000256html/modindex.html: $(TOOLSDIR)/support.py $(TOOLSDIR)/mkmodindex
257html/modindex.html: html/lib/lib.html html/mac/mac.html
Fred Drake1385a572001-07-17 16:53:19 +0000258 cd html && \
259 $(PYTHON) ../$(TOOLSDIR)/mkmodindex --columns 4 \
260 --output modindex.html --address $(PYTHONDOCS) \
261 lib/modindex.html mac/modindex.html
Fred Drake7d5f5dd1999-03-18 19:08:47 +0000262
Fred Drake5afb5e52001-07-18 21:17:29 +0000263html: $(ALLHTMLFILES)
Guido van Rossum970871f1993-02-21 20:10:26 +0000264
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000265api html/api/api.html: $(APIFILES)
266 $(MKHTML) --dir html/api api/api.tex
Fred Drakea6bb3961998-05-06 19:51:39 +0000267
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000268doc html/doc/doc.html: $(DOCFILES)
269 $(MKHTML) --dir html/doc doc/doc.tex
Fred Drakecdbd3911998-05-15 17:02:10 +0000270
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000271ext html/ext/ext.html: $(EXTFILES)
272 $(MKHTML) --dir html/ext ext/ext.tex
Guido van Rossume83e3801995-03-17 16:01:35 +0000273
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000274lib html/lib/lib.html: $(LIBFILES)
275 $(MKHTML) --dir html/lib lib/lib.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000276
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000277mac html/mac/mac.html: $(MACFILES)
278 $(MKHTML) --dir html/mac mac/mac.tex
Greg Ward0862f802000-04-28 16:53:36 +0000279
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000280ref html/ref/ref.html: $(REFFILES)
281 $(MKHTML) --dir html/ref ref/ref.tex
Greg Ward0862f802000-04-28 16:53:36 +0000282
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000283tut html/tut/tut.html: $(TUTFILES)
284 $(MKHTML) --dir html/tut --numeric --split 3 tut/tut.tex
285
286inst html/inst/inst.html: $(INSTFILES) perl/distutils.perl
Fred Drake8c011582001-03-01 18:38:56 +0000287 $(MKHTML) --dir html/inst --split 4 inst/inst.tex
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000288
289dist html/dist/dist.html: $(DISTFILES) perl/distutils.perl
Fred Drake8c011582001-03-01 18:38:56 +0000290 $(MKHTML) --dir html/dist --split 4 dist/dist.tex
Fred Drakee7a8c972000-04-07 16:27:15 +0000291
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000292
Fred Drakee4837a11998-03-06 21:29:34 +0000293# webchecker needs an extra flag to process the huge index from the libref
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000294WEBCHECKER=$(PYTHON) ../Tools/webchecker/webchecker.py
295HTMLBASE= file:`pwd`/html
296
Fred Drake5afb5e52001-07-18 21:17:29 +0000297webcheck: $(ALLHTMLFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000298 $(WEBCHECKER) $(HTMLBASE)/api/
299 $(WEBCHECKER) $(HTMLBASE)/doc/
300 $(WEBCHECKER) $(HTMLBASE)/ext/
301 $(WEBCHECKER) -m290000 $(HTMLBASE)/lib/
302 $(WEBCHECKER) $(HTMLBASE)/mac/
303 $(WEBCHECKER) $(HTMLBASE)/ref/
304 $(WEBCHECKER) $(HTMLBASE)/tut/
305 $(WEBCHECKER) $(HTMLBASE)/dist/
306 $(WEBCHECKER) $(HTMLBASE)/inst/
307
Fred Drake5afb5e52001-07-18 21:17:29 +0000308fastwebcheck: $(ALLHTMLFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000309 $(WEBCHECKER) -x $(HTMLBASE)/api/
310 $(WEBCHECKER) -x $(HTMLBASE)/doc/
311 $(WEBCHECKER) -x $(HTMLBASE)/ext/
312 $(WEBCHECKER) -x -m290000 $(HTMLBASE)/lib/
313 $(WEBCHECKER) -x $(HTMLBASE)/mac/
314 $(WEBCHECKER) -x $(HTMLBASE)/ref/
315 $(WEBCHECKER) -x $(HTMLBASE)/tut/
316 $(WEBCHECKER) -x $(HTMLBASE)/dist/
317 $(WEBCHECKER) -x $(HTMLBASE)/inst/
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000318
319
320# Release packaging targets:
Fred Drakee4837a11998-03-06 21:29:34 +0000321
Fred Drake5afb5e52001-07-18 21:17:29 +0000322paper-$(PAPER)/README: $(PSFILES) $(TOOLSDIR)/getpagecounts
Fred Drake1385a572001-07-17 16:53:19 +0000323 cd paper-$(PAPER) && ../$(TOOLSDIR)/getpagecounts >../$@
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000324
Fred Drakeb6584ca1999-01-08 15:49:45 +0000325info-$(RELEASE).tgz: info
Fred Drake1385a572001-07-17 16:53:19 +0000326 cd $(INFODIR) && tar cf - README python.dir python-*.info* \
Fred Drake28e66d11999-01-29 22:23:25 +0000327 | gzip -9 >$@
Fred Drakea7998351998-02-19 16:01:04 +0000328
Fred Drake4ef3ea01999-07-27 16:30:59 +0000329info-$(RELEASE).tar.bz2: info
Fred Drake1385a572001-07-17 16:53:19 +0000330 cd $(INFODIR) && tar cf - README python.dir python-*.info* \
Fred Drake4ef3ea01999-07-27 16:30:59 +0000331 | bzip2 -9 >$@
332
Fred Drakee34ab301998-05-11 21:10:15 +0000333latex-$(RELEASE).tgz:
Fred Drake1385a572001-07-17 16:53:19 +0000334 $(PYTHON) $(TOOLSDIR)/mksourcepkg --gzip $(RELEASE)
Fred Drakee61d7af1998-03-05 16:37:34 +0000335
Fred Drake4ef3ea01999-07-27 16:30:59 +0000336latex-$(RELEASE).tar.bz2:
Fred Drake1385a572001-07-17 16:53:19 +0000337 $(PYTHON) $(TOOLSDIR)/mksourcepkg --bzip2 $(RELEASE)
Fred Drake4ef3ea01999-07-27 16:30:59 +0000338
Fred Drake7dcc69a1999-07-23 16:11:36 +0000339latex-$(RELEASE).zip:
Fred Drake02ba6212000-04-04 20:58:25 +0000340 rm -f $@
Fred Drake1385a572001-07-17 16:53:19 +0000341 $(PYTHON) $(TOOLSDIR)/mksourcepkg --zip $(RELEASE)
Fred Drake7dcc69a1999-07-23 16:11:36 +0000342
Fred Drake5afb5e52001-07-18 21:17:29 +0000343pdf-$(PAPER)-$(RELEASE).tar: $(PDFFILES)
344 cd paper-$(PAPER) && tar cf ../$@ *.pdf
Fred Drake04cf4dc1998-02-12 22:33:50 +0000345
Fred Drake5afb5e52001-07-18 21:17:29 +0000346pdf-$(PAPER)-$(RELEASE).tgz: pdf-$(PAPER)-$(RELEASE).tar
347 gzip -9 <$? >$@
348
349pdf-$(PAPER)-$(RELEASE).tar.bz2: pdf-$(PAPER)-$(RELEASE).tar
350 bzip2 -9 <$? >$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000351
Fred Drake7dcc69a1999-07-23 16:11:36 +0000352pdf-$(PAPER)-$(RELEASE).zip: pdf
Fred Drake02ba6212000-04-04 20:58:25 +0000353 rm -f $@
Fred Drake1385a572001-07-17 16:53:19 +0000354 cd paper-$(PAPER) && zip -q -9 ../$@ *.pdf
Fred Drake7dcc69a1999-07-23 16:11:36 +0000355
Fred Drake5afb5e52001-07-18 21:17:29 +0000356postscript-$(PAPER)-$(RELEASE).tar: $(PSFILES) paper-$(PAPER)/README
357 cd paper-$(PAPER) && tar cf ../$@ *.ps README
Fred Drake04cf4dc1998-02-12 22:33:50 +0000358
Fred Drake5afb5e52001-07-18 21:17:29 +0000359postscript-$(PAPER)-$(RELEASE).tar.bz2: postscript-$(PAPER)-$(RELEASE).tar
360 bzip2 -9 <$< >$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000361
Fred Drake5afb5e52001-07-18 21:17:29 +0000362postscript-$(PAPER)-$(RELEASE).tgz: postscript-$(PAPER)-$(RELEASE).tar
363 gzip -9 <$< >$@
364
365postscript-$(PAPER)-$(RELEASE).zip: $(PSFILES) paper-$(PAPER)/README
Fred Drake02ba6212000-04-04 20:58:25 +0000366 rm -f $@
Fred Drake1385a572001-07-17 16:53:19 +0000367 cd paper-$(PAPER) && zip -q -9 ../$@ *.ps README
Fred Drake7dcc69a1999-07-23 16:11:36 +0000368
Fred Drake2872e8a2001-09-06 19:35:02 +0000369html-$(RELEASE).tar: $(ALLHTMLFILES)
Fred Drake9ae09942001-10-18 18:46:22 +0000370 cd html && \
Fred Drake8f65aef2001-07-17 23:35:46 +0000371 tar cf ../html-$(RELEASE).tar *.html */*.css */*.html \
372 */*.gif */*.txt
Fred Drake33d05b91998-01-13 16:33:09 +0000373
Fred Drake8f65aef2001-07-17 23:35:46 +0000374html-$(RELEASE).tgz: html-$(RELEASE).tar
Fred Drake5afb5e52001-07-18 21:17:29 +0000375 gzip -9 <$? >$@
Fred Drake8f65aef2001-07-17 23:35:46 +0000376
377html-$(RELEASE).tar.bz2: html-$(RELEASE).tar
Fred Drake5afb5e52001-07-18 21:17:29 +0000378 bzip2 -9 <$? >$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000379
Fred Drake5afb5e52001-07-18 21:17:29 +0000380html-$(RELEASE).zip: $(ALLHTMLFILES)
Fred Drake02ba6212000-04-04 20:58:25 +0000381 rm -f $@
Fred Drake9ae09942001-10-18 18:46:22 +0000382 cd html && \
Fred Drake1385a572001-07-17 16:53:19 +0000383 zip -q -9 ../$@ *.html */*.css */*.html */*.gif */*.txt
Fred Drake7dcc69a1999-07-23 16:11:36 +0000384
Fred Drakea7998351998-02-19 16:01:04 +0000385# convenience targets:
386
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000387tarhtml: html-$(RELEASE).tgz
Fred Drakeb6584ca1999-01-08 15:49:45 +0000388tarinfo: info-$(RELEASE).tgz
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000389tarps: postscript-$(PAPER)-$(RELEASE).tgz
390tarpdf: pdf-$(PAPER)-$(RELEASE).tgz
391tarlatex: latex-$(RELEASE).tgz
Fred Drakebbe33c51998-05-07 01:39:06 +0000392
Fred Drake83c09831999-08-02 20:20:14 +0000393tarballs: tarpdf tarps tarhtml
Guido van Rossum84cca441997-11-25 20:49:09 +0000394
Fred Drake7dcc69a1999-07-23 16:11:36 +0000395ziphtml: html-$(RELEASE).zip
396zipps: postscript-$(PAPER)-$(RELEASE).zip
397zippdf: pdf-$(PAPER)-$(RELEASE).zip
398ziplatex: latex-$(RELEASE).zip
399
Fred Drakeb906d2e2000-07-01 02:37:37 +0000400zips: zippdf zipps ziphtml
Fred Drake7dcc69a1999-07-23 16:11:36 +0000401
Fred Drake4ef3ea01999-07-27 16:30:59 +0000402bziphtml: html-$(RELEASE).tar.bz2
403bzipinfo: info-$(RELEASE).tar.bz2
404bzipps: postscript-$(PAPER)-$(RELEASE).tar.bz2
405bzippdf: pdf-$(PAPER)-$(RELEASE).tar.bz2
406bziplatex: latex-$(RELEASE).tar.bz2
407
Fred Drake83c09831999-08-02 20:20:14 +0000408bzips: bzippdf bzipps bziphtml
Fred Drake4ef3ea01999-07-27 16:30:59 +0000409
Fred Drakefc4ee0a2001-04-13 18:00:23 +0000410disthtml: tarhtml bziphtml ziphtml
411distinfo: tarinfo bzipinfo
412distps: tarps bzipps zipps
413distpdf: tarpdf bzippdf zippdf
414distlatex: tarlatex bziplatex ziplatex
415
Fred Drake5afb5e52001-07-18 21:17:29 +0000416paperdist: distpdf distps
417edist: disthtml
418
419distfiles: paperdist edist
Fred Drake88634602001-01-25 17:32:51 +0000420 $(TOOLSDIR)/mksourcepkg --all $(RELEASE)
Fred Drake4ef3ea01999-07-27 16:30:59 +0000421
Guido van Rossume83e3801995-03-17 16:01:35 +0000422
423# Housekeeping targets
424
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000425# Remove temporary files; all except the following:
Fred Drake6659c301998-03-03 22:02:19 +0000426# - sources: .tex, .bib, .sty, *.cls
Fred Drake04cf4dc1998-02-12 22:33:50 +0000427# - useful results: .dvi, .pdf, .ps, .texi, .info
Fred Drakee4837a11998-03-06 21:29:34 +0000428clean:
Fred Drake8f65aef2001-07-17 23:35:46 +0000429 rm -f html-$(RELEASE).tar
Fred Drake1385a572001-07-17 16:53:19 +0000430 cd $(INFODIR) && $(MAKE) clean
Guido van Rossum5b343731992-07-07 09:06:34 +0000431
Guido van Rossume83e3801995-03-17 16:01:35 +0000432# Remove temporaries as well as final products
Fred Drakeb6584ca1999-01-08 15:49:45 +0000433clobber:
Fred Drake8f65aef2001-07-17 23:35:46 +0000434 rm -f html-$(RELEASE).tar
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000435 rm -f html-$(RELEASE).tgz info-$(RELEASE).tgz
436 rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz
Fred Drake7dcc69a1999-07-23 16:11:36 +0000437 rm -f latex-$(RELEASE).tgz html-$(RELEASE).zip
438 rm -f pdf-$(RELEASE).zip postscript-$(RELEASE).zip
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000439 rm -f $(DVIFILES) $(PSFILES) $(PDFFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000440 cd $(INFODIR) && $(MAKE) clobber
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000441 rm -rf html/index.html html/modindex.html html/acks.html
442 rm -rf html/api/ html/doc/ html/ext/ html/lib/ html/mac/
443 rm -rf html/ref/ html/tut/ html/inst/ html/dist/
Fred Drake5ad78f31998-02-22 19:47:13 +0000444
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000445realclean distclean: clobber