blob: eb363663c6170d9acb579f16fd64301a1b52d39e [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 Drake88634602001-01-25 17:32:51 +000070RELEASE=2.1a2
Fred Drake860e2561999-07-12 16:52:50 +000071
Fred Drakef6bfe8e2001-02-19 19:19:26 +000072PYTHON= python
73DVIPS= dvips -N0 -t $(PAPER)
74
75MKHOWTO= $(TOOLSDIR)/mkhowto
76MKHTML= $(MKHOWTO) --html --about html/stdabout.dat \
77 --address $(PYTHONDOCS) --up-link ../index.html \
78 --up-title "Python Documentation Index" \
79 --global-module-index "../modindex.html"
80MKPDF= $(MKHOWTO) --paper=$(PAPER) --pdf
81MKPS= $(MKHOWTO) --paper=$(PAPER) --ps
82
83BUILDINDEX=$(TOOLSDIR)/buildindex.py
84
85PYTHONDOCS='See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.'
86HTMLBASE= 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
121COMMONPERL= perl/manual.perl perl/python.perl perl/l2hinit.perl
122
123include Makefile.deps
Fred Drake33d05b91998-01-13 16:33:09 +0000124
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000125# These must be declared phony since there
126# are directories with matching names:
Greg Ward0862f802000-04-28 16:53:36 +0000127.PHONY: api doc ext lib mac ref tut inst dist
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000128.PHONY: html info
Fred Drake3f8a59f1998-07-24 13:58:27 +0000129
Fred Drakebbe33c51998-05-07 01:39:06 +0000130
Guido van Rossume83e3801995-03-17 16:01:35 +0000131# Main target
Fred Drake3a045e82001-01-22 20:47:26 +0000132all: html
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000133
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000134dvi: $(DVIFILES)
135pdf: $(PDFFILES)
136ps: $(PSFILES)
Fred Drakee4837a11998-03-06 21:29:34 +0000137
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000138world: ps pdf html distfiles
Guido van Rossum20aca5a1991-01-25 13:29:04 +0000139
Fred Drakef2951131998-05-07 19:30:16 +0000140
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000141# Rules to build PostScript and PDF formats
142.SUFFIXES: .dvi .ps
143
144.dvi.ps:
145 $(DVIPS) -o $@ $<
Fred Draked69e2c41998-05-11 18:25:46 +0000146
147
148# Targets for each document:
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000149# Python/C API Reference Manual
150paper-$(PAPER)/api.dvi: paper-$(PAPER)/api.tex $(APIFILES)
151 (cd paper-$(PAPER); $(MKDVI) api.tex)
Fred Draked69e2c41998-05-11 18:25:46 +0000152
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000153paper-$(PAPER)/api.pdf: paper-$(PAPER)/api.tex $(APIFILES)
154 (cd paper-$(PAPER); $(MKPDF) api.tex)
Fred Drake15087431999-03-16 16:11:27 +0000155
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000156paper-$(PAPER)/api.tex: api/api.tex api/refcounts.dat tools/anno-api.py
157 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/api.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000158
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000159# Distributing Python Modules
160paper-$(PAPER)/dist.dvi: $(DISTFILES)
161 (cd paper-$(PAPER); $(MKDVI) ../dist/dist.tex)
Fred Draked69e2c41998-05-11 18:25:46 +0000162
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000163paper-$(PAPER)/dist.pdf: $(DISTFILES)
164 (cd paper-$(PAPER); $(MKPDF) ../dist/dist.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000165
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000166# Documenting Python
167paper-$(PAPER)/doc.dvi: $(DOCFILES)
168 (cd paper-$(PAPER); $(MKDVI) ../doc/doc.tex
Fred Drake3f8a59f1998-07-24 13:58:27 +0000169
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000170paper-$(PAPER)/doc.pdf: $(DOCFILES)
171 (cd paper-$(PAPER); $(MKPDF) ../doc/doc.tex_
Fred Draked69e2c41998-05-11 18:25:46 +0000172
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000173# Extending and Embedding the Python Interpreter
174paper-$(PAPER)/ext.dvi: $(EXTFILES)
175 (cd paper-$(PAPER); $(MKDVI) ../ext/ext.tex)
Greg Ward0862f802000-04-28 16:53:36 +0000176
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000177paper-$(PAPER)/ext.pdf: $(EXTFILES)
178 (cd paper-$(PAPER); $(MKPDF) ../ext/ext.tex)
Greg Ward0862f802000-04-28 16:53:36 +0000179
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000180# Installing Python Modules
181paper-$(PAPER)/inst.dvi: $(INSTFILES)
182 (cd paper-$(PAPER); $(MKDVI) ../inst/inst.tex)
Fred Draked69e2c41998-05-11 18:25:46 +0000183
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000184paper-$(PAPER)/inst.pdf: $(INSTFILES)
185 (cd paper-$(PAPER); $(MKPDF) ../inst/inst.tex)
Fred Drakef2951131998-05-07 19:30:16 +0000186
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000187# Python Library Reference
188paper-$(PAPER)/lib.dvi: $(LIBFILES)
189 (cd paper-$(PAPER); $(MKDVI) ../lib/lib.tex)
Fred Drake15087431999-03-16 16:11:27 +0000190
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000191paper-$(PAPER)/lib.pdf: $(LIBFILES)
192 (cd paper-$(PAPER); $(MKPDF) ../lib/lib.tex)
Fred Drakef2951131998-05-07 19:30:16 +0000193
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000194# Macintosh Library Modules
195paper-$(PAPER)/mac.dvi: $(MACFILES)
196 (cd paper-$(PAPER); $(MKDVI) ../mac/mac.tex)
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000197
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000198paper-$(PAPER)/mac.pdf: $(MACFILES)
199 (cd paper-$(PAPER); $(MKPDF) ../mac/mac.tex)
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000200
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000201# Python Reference Manual
202paper-$(PAPER)/ref.dvi: $(REFFILES)
203 (cd paper-$(PAPER); $(MKDVI) ../ref/ref.tex)
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000204
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000205paper-$(PAPER)/ref.pdf: $(REFFILES)
206 (cd paper-$(PAPER); $(MKPDF) ../ref/ref.tex)
Fred Drakeddae4141998-02-17 15:45:25 +0000207
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000208# Python Tutorial
209paper-$(PAPER)/tut.dvi: $(TUTFILES)
210 (cd paper-$(PAPER); $(MKDVI) ../tut/tut.tex)
Greg Ward0862f802000-04-28 16:53:36 +0000211
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000212paper-$(PAPER)/tut.pdf: $(TUTFILES)
213 (cd paper-$(PAPER); $(MKPDF) ../tut/tut.tex)
Guido van Rossume83e3801995-03-17 16:01:35 +0000214
215# The remaining part of the Makefile is concerned with various
Guido van Rossum73827c61995-03-20 13:00:32 +0000216# conversions, as described above. See also the README file.
Guido van Rossume83e3801995-03-17 16:01:35 +0000217
Fred Drakeb9838d91998-05-08 15:43:08 +0000218info:
219 (cd $(INFODIR); $(MAKE))
Fred Drake5ad78f31998-02-22 19:47:13 +0000220
Guido van Rossum73827c61995-03-20 13:00:32 +0000221# Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to
222# HTML converter. For more info on this program, see
Guido van Rossume83e3801995-03-17 16:01:35 +0000223# <URL:http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html>.
Guido van Rossume83e3801995-03-17 16:01:35 +0000224
Guido van Rossum9cb64801997-12-29 20:01:55 +0000225# Note that LaTeX2HTML inserts references to an icons directory in
226# each page that it generates. I have placed a copy of this directory
227# in the distribution to simplify the process of creating a
228# self-contained HTML distribution; for this purpose I have also added
229# a (trivial) index.html. Change the definition of $ICONSERVER in
Fred Drake9fab3aa1998-04-28 19:20:43 +0000230# perl/l2hinit.perl to use a different location for the icons directory.
Guido van Rossume83e3801995-03-17 16:01:35 +0000231
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000232# If you have the standard LaTeX2HTML icons installed, the versions shipped
233# with this documentation should be stored in a separate directory and used
234# instead. The standard set does *not* include all the icons used in the
235# Python documentation.
Fred Drakebbe33c51998-05-07 01:39:06 +0000236
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000237$(INDEXFILES): $(COMMONPERL) html/about.dat tools/node2label.pl
Guido van Rossum6938f061994-08-01 12:22:53 +0000238
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000239html/acks.html: ACKS $(TOOLSDIR)/support.py $(TOOLSDIR)/mkackshtml
240 $(TOOLSDIR)/mkackshtml --address $(PYTHONDOCS) \
Fred Draked27ed852001-02-22 23:06:21 +0000241 --output html/acks.html <ACKS
Guido van Rossum6938f061994-08-01 12:22:53 +0000242
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000243html/modindex.html: $(TOOLSDIR)/support.py $(TOOLSDIR)/mkmodindex
244html/modindex.html: html/lib/lib.html html/mac/mac.html
Fred Drake2f55b112001-02-22 23:12:37 +0000245 (cd html; \
246 ../$(TOOLSDIR)/mkmodindex --columns 4 --output modindex.html \
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000247 --address $(PYTHONDOCS) \
Fred Drake2f55b112001-02-22 23:12:37 +0000248 lib/modindex.html mac/modindex.html)
Fred Drake7d5f5dd1999-03-18 19:08:47 +0000249
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000250html: $(INDEXFILES) html/index.html html/modindex.html html/acks.html
Guido van Rossum970871f1993-02-21 20:10:26 +0000251
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000252api html/api/api.html: $(APIFILES)
253 $(MKHTML) --dir html/api api/api.tex
Fred Drakea6bb3961998-05-06 19:51:39 +0000254
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000255doc html/doc/doc.html: $(DOCFILES)
256 $(MKHTML) --dir html/doc doc/doc.tex
Fred Drakecdbd3911998-05-15 17:02:10 +0000257
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000258ext html/ext/ext.html: $(EXTFILES)
259 $(MKHTML) --dir html/ext ext/ext.tex
Guido van Rossume83e3801995-03-17 16:01:35 +0000260
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000261lib html/lib/lib.html: $(LIBFILES)
262 $(MKHTML) --dir html/lib lib/lib.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000263
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000264mac html/mac/mac.html: $(MACFILES)
265 $(MKHTML) --dir html/mac mac/mac.tex
Greg Ward0862f802000-04-28 16:53:36 +0000266
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000267ref html/ref/ref.html: $(REFFILES)
268 $(MKHTML) --dir html/ref ref/ref.tex
Greg Ward0862f802000-04-28 16:53:36 +0000269
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000270tut html/tut/tut.html: $(TUTFILES)
271 $(MKHTML) --dir html/tut --numeric --split 3 tut/tut.tex
272
273inst html/inst/inst.html: $(INSTFILES) perl/distutils.perl
274 $(MKHTML) --dir html/inst inst/inst.tex
275
276dist html/dist/dist.html: $(DISTFILES) perl/distutils.perl
277 $(MKHTML) --dir html/dist dist/dist.tex
Fred Drakee7a8c972000-04-07 16:27:15 +0000278
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000279
Fred Drakee4837a11998-03-06 21:29:34 +0000280# webchecker needs an extra flag to process the huge index from the libref
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000281WEBCHECKER=$(PYTHON) ../Tools/webchecker/webchecker.py
282HTMLBASE= file:`pwd`/html
283
284webcheck: html
285 $(WEBCHECKER) $(HTMLBASE)/api/
286 $(WEBCHECKER) $(HTMLBASE)/doc/
287 $(WEBCHECKER) $(HTMLBASE)/ext/
288 $(WEBCHECKER) -m290000 $(HTMLBASE)/lib/
289 $(WEBCHECKER) $(HTMLBASE)/mac/
290 $(WEBCHECKER) $(HTMLBASE)/ref/
291 $(WEBCHECKER) $(HTMLBASE)/tut/
292 $(WEBCHECKER) $(HTMLBASE)/dist/
293 $(WEBCHECKER) $(HTMLBASE)/inst/
294
295fastwebcheck: html
296 $(WEBCHECKER) -x $(HTMLBASE)/api/
297 $(WEBCHECKER) -x $(HTMLBASE)/doc/
298 $(WEBCHECKER) -x $(HTMLBASE)/ext/
299 $(WEBCHECKER) -x -m290000 $(HTMLBASE)/lib/
300 $(WEBCHECKER) -x $(HTMLBASE)/mac/
301 $(WEBCHECKER) -x $(HTMLBASE)/ref/
302 $(WEBCHECKER) -x $(HTMLBASE)/tut/
303 $(WEBCHECKER) -x $(HTMLBASE)/dist/
304 $(WEBCHECKER) -x $(HTMLBASE)/inst/
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000305
306
307# Release packaging targets:
Fred Drakee4837a11998-03-06 21:29:34 +0000308
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000309paper-$(PAPER)/README: ps $(TOOLSDIR)/getpagecounts
310 (cd paper-$(PAPER); ../$(TOOLSDIR)/getpagecounts >$@)
311
Fred Drakeb6584ca1999-01-08 15:49:45 +0000312info-$(RELEASE).tgz: info
Fred Drake28e66d11999-01-29 22:23:25 +0000313 (cd $(INFODIR); tar cf - README python.dir python-???.info*) \
314 | gzip -9 >$@
Fred Drakea7998351998-02-19 16:01:04 +0000315
Fred Drake4ef3ea01999-07-27 16:30:59 +0000316info-$(RELEASE).tar.bz2: info
317 (cd $(INFODIR); tar cf - README python.dir python-???.info*) \
318 | bzip2 -9 >$@
319
Fred Drakee34ab301998-05-11 21:10:15 +0000320latex-$(RELEASE).tgz:
Fred Drake83c09831999-08-02 20:20:14 +0000321 $(TOOLSDIR)/mksourcepkg --gzip $(RELEASE)
Fred Drakee61d7af1998-03-05 16:37:34 +0000322
Fred Drake4ef3ea01999-07-27 16:30:59 +0000323latex-$(RELEASE).tar.bz2:
Fred Drake83c09831999-08-02 20:20:14 +0000324 $(TOOLSDIR)/mksourcepkg --bzip2 $(RELEASE)
Fred Drake4ef3ea01999-07-27 16:30:59 +0000325
Fred Drake7dcc69a1999-07-23 16:11:36 +0000326latex-$(RELEASE).zip:
Fred Drake02ba6212000-04-04 20:58:25 +0000327 rm -f $@
Fred Drake83c09831999-08-02 20:20:14 +0000328 $(TOOLSDIR)/mksourcepkg --zip $(RELEASE)
Fred Drake7dcc69a1999-07-23 16:11:36 +0000329
Fred Draked19b9d61998-07-29 03:49:44 +0000330pdf-$(PAPER)-$(RELEASE).tgz: pdf
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000331 (cd paper-$(PAPER); tar cf - *.pdf) | gzip -9 >$@
Fred Drake04cf4dc1998-02-12 22:33:50 +0000332
Fred Drake4ef3ea01999-07-27 16:30:59 +0000333pdf-$(PAPER)-$(RELEASE).tar.bz2: pdf
334 (cd paper-$(PAPER); tar cf - *.pdf) | bzip2 -9 >$@
335
Fred Drake7dcc69a1999-07-23 16:11:36 +0000336pdf-$(PAPER)-$(RELEASE).zip: pdf
Fred Drake02ba6212000-04-04 20:58:25 +0000337 rm -f $@
338 (cd paper-$(PAPER); zip -q -9 ../$@ *.pdf)
Fred Drake7dcc69a1999-07-23 16:11:36 +0000339
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000340postscript-$(PAPER)-$(RELEASE).tar.bz2: ps paper-$(PAPER)/README
Fred Drake02ba6212000-04-04 20:58:25 +0000341 (cd paper-$(PAPER); tar cf - *.ps README) | bzip2 -9 >$@
Fred Drake04cf4dc1998-02-12 22:33:50 +0000342
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000343postscript-$(PAPER)-$(RELEASE).tgz: ps paper-$(PAPER)/README
Fred Drake02ba6212000-04-04 20:58:25 +0000344 (cd paper-$(PAPER); tar cf - *.ps README) | gzip -9 >$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000345
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000346postscript-$(PAPER)-$(RELEASE).zip: ps paper-$(PAPER)/README
Fred Drake02ba6212000-04-04 20:58:25 +0000347 rm -f $@
348 (cd paper-$(PAPER); zip -q -9 ../$@ *.ps README)
Fred Drake7dcc69a1999-07-23 16:11:36 +0000349
Fred Drakefcb7adb1999-01-12 20:32:39 +0000350html-$(RELEASE).tgz: html
Fred Drake02ba6212000-04-04 20:58:25 +0000351 (cd $(HTMLDIR); \
Fred Drake90f87672000-09-08 21:54:44 +0000352 tar cf - *.html */*.css */*.html */*.gif) \
Fred Drake29cabd41998-05-11 18:53:07 +0000353 | gzip -9 >$@
Fred Drake33d05b91998-01-13 16:33:09 +0000354
Fred Drake4ef3ea01999-07-27 16:30:59 +0000355html-$(RELEASE).tar.bz2: html
Fred Drake02ba6212000-04-04 20:58:25 +0000356 (cd $(HTMLDIR); \
Fred Drake90f87672000-09-08 21:54:44 +0000357 tar cf - *.html */*.css */*.html */*.gif) \
Fred Drake4ef3ea01999-07-27 16:30:59 +0000358 | bzip2 -9 >$@
359
Fred Drake7dcc69a1999-07-23 16:11:36 +0000360html-$(RELEASE).zip: html
Fred Drake02ba6212000-04-04 20:58:25 +0000361 rm -f $@
362 (cd $(HTMLDIR); \
Fred Drake90f87672000-09-08 21:54:44 +0000363 zip -q -9 ../$@ *.html */*.css */*.html */*.gif)
Fred Drake7dcc69a1999-07-23 16:11:36 +0000364
Fred Drakea7998351998-02-19 16:01:04 +0000365# convenience targets:
366
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000367tarhtml: html-$(RELEASE).tgz
Fred Drakeb6584ca1999-01-08 15:49:45 +0000368tarinfo: info-$(RELEASE).tgz
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000369tarps: postscript-$(PAPER)-$(RELEASE).tgz
370tarpdf: pdf-$(PAPER)-$(RELEASE).tgz
371tarlatex: latex-$(RELEASE).tgz
Fred Drakebbe33c51998-05-07 01:39:06 +0000372
Fred Drake83c09831999-08-02 20:20:14 +0000373tarballs: tarpdf tarps tarhtml
Guido van Rossum84cca441997-11-25 20:49:09 +0000374
Fred Drake7dcc69a1999-07-23 16:11:36 +0000375ziphtml: html-$(RELEASE).zip
376zipps: postscript-$(PAPER)-$(RELEASE).zip
377zippdf: pdf-$(PAPER)-$(RELEASE).zip
378ziplatex: latex-$(RELEASE).zip
379
Fred Drakeb906d2e2000-07-01 02:37:37 +0000380zips: zippdf zipps ziphtml
Fred Drake7dcc69a1999-07-23 16:11:36 +0000381
Fred Drake4ef3ea01999-07-27 16:30:59 +0000382bziphtml: html-$(RELEASE).tar.bz2
383bzipinfo: info-$(RELEASE).tar.bz2
384bzipps: postscript-$(PAPER)-$(RELEASE).tar.bz2
385bzippdf: pdf-$(PAPER)-$(RELEASE).tar.bz2
386bziplatex: latex-$(RELEASE).tar.bz2
387
Fred Drake83c09831999-08-02 20:20:14 +0000388bzips: bzippdf bzipps bziphtml
Fred Drake4ef3ea01999-07-27 16:30:59 +0000389
Fred Drake88634602001-01-25 17:32:51 +0000390distfiles: tarballs zips bzips
391 $(TOOLSDIR)/mksourcepkg --all $(RELEASE)
Fred Drake4ef3ea01999-07-27 16:30:59 +0000392
Guido van Rossume83e3801995-03-17 16:01:35 +0000393
394# Housekeeping targets
395
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000396# Remove temporary files; all except the following:
Fred Drake6659c301998-03-03 22:02:19 +0000397# - sources: .tex, .bib, .sty, *.cls
Fred Drake04cf4dc1998-02-12 22:33:50 +0000398# - useful results: .dvi, .pdf, .ps, .texi, .info
Fred Drakee4837a11998-03-06 21:29:34 +0000399clean:
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000400 (cd paper-$(PAPER); $(MAKE) clean)
Fred Drakee34ab301998-05-11 21:10:15 +0000401 (cd $(INFODIR); $(MAKE) clean)
Guido van Rossum5b343731992-07-07 09:06:34 +0000402
Guido van Rossume83e3801995-03-17 16:01:35 +0000403# Remove temporaries as well as final products
Fred Drakeb6584ca1999-01-08 15:49:45 +0000404clobber:
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000405 rm -f html-$(RELEASE).tgz info-$(RELEASE).tgz
406 rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz
Fred Drake7dcc69a1999-07-23 16:11:36 +0000407 rm -f latex-$(RELEASE).tgz html-$(RELEASE).zip
408 rm -f pdf-$(RELEASE).zip postscript-$(RELEASE).zip
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000409 rm -f $(DVIFILES) $(PSFILES) $(PDFFILES)
Fred Drakee34ab301998-05-11 21:10:15 +0000410 (cd $(INFODIR); $(MAKE) clobber)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000411 rm -rf html/index.html html/modindex.html html/acks.html
412 rm -rf html/api/ html/doc/ html/ext/ html/lib/ html/mac/
413 rm -rf html/ref/ html/tut/ html/inst/ html/dist/
Fred Drake5ad78f31998-02-22 19:47:13 +0000414
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000415realclean distclean: clobber
416
417
418# html/index.html is dependent on $(INDEXFILES) since we want the date
419# on the front index to be updated whenever any of the child documents
420# are updated and boilerplate.tex uses \today as the date.
421
422# It's at the end of the file since it wedges font-lock in XEmacs.
423
424BOILERPLATE=texinputs/boilerplate.tex
425html/index.html: html/index.html.in $(BOILERPLATE) $(INDEXFILES)
426 DATE=`grep '\\date{' $(BOILERPLATE) | sed 's/.*\\date{\(.*\)}.*$$/\1/'` ; \
427 if [ "$$DATE" = '\today' ] ; then DATE=`date '+%B %e, %Y'`;fi;\
428 sed -e "s/@DATE@/$$DATE/g" -e "s/@RELEASE@/$(RELEASE)/g" \
429 $< >$@