blob: cd2129a24efc9d19d19a327a45641c1551a37569 [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) \
241 --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
245 $(TOOLSDIR)/mkmodindex --columns 4 --output html/modindex.html \
246 --address $(PYTHONDOCS) \
247 html/lib/modindex.html html/mac/modindex.html
Fred Drake7d5f5dd1999-03-18 19:08:47 +0000248
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000249html: $(INDEXFILES) html/index.html html/modindex.html html/acks.html
Guido van Rossum970871f1993-02-21 20:10:26 +0000250
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000251api html/api/api.html: $(APIFILES)
252 $(MKHTML) --dir html/api api/api.tex
Fred Drakea6bb3961998-05-06 19:51:39 +0000253
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000254doc html/doc/doc.html: $(DOCFILES)
255 $(MKHTML) --dir html/doc doc/doc.tex
Fred Drakecdbd3911998-05-15 17:02:10 +0000256
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000257ext html/ext/ext.html: $(EXTFILES)
258 $(MKHTML) --dir html/ext ext/ext.tex
Guido van Rossume83e3801995-03-17 16:01:35 +0000259
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000260lib html/lib/lib.html: $(LIBFILES)
261 $(MKHTML) --dir html/lib lib/lib.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000262
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000263mac html/mac/mac.html: $(MACFILES)
264 $(MKHTML) --dir html/mac mac/mac.tex
Greg Ward0862f802000-04-28 16:53:36 +0000265
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000266ref html/ref/ref.html: $(REFFILES)
267 $(MKHTML) --dir html/ref ref/ref.tex
Greg Ward0862f802000-04-28 16:53:36 +0000268
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000269tut html/tut/tut.html: $(TUTFILES)
270 $(MKHTML) --dir html/tut --numeric --split 3 tut/tut.tex
271
272inst html/inst/inst.html: $(INSTFILES) perl/distutils.perl
273 $(MKHTML) --dir html/inst inst/inst.tex
274
275dist html/dist/dist.html: $(DISTFILES) perl/distutils.perl
276 $(MKHTML) --dir html/dist dist/dist.tex
Fred Drakee7a8c972000-04-07 16:27:15 +0000277
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000278
Fred Drakee4837a11998-03-06 21:29:34 +0000279# webchecker needs an extra flag to process the huge index from the libref
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000280WEBCHECKER=$(PYTHON) ../Tools/webchecker/webchecker.py
281HTMLBASE= file:`pwd`/html
282
283webcheck: html
284 $(WEBCHECKER) $(HTMLBASE)/api/
285 $(WEBCHECKER) $(HTMLBASE)/doc/
286 $(WEBCHECKER) $(HTMLBASE)/ext/
287 $(WEBCHECKER) -m290000 $(HTMLBASE)/lib/
288 $(WEBCHECKER) $(HTMLBASE)/mac/
289 $(WEBCHECKER) $(HTMLBASE)/ref/
290 $(WEBCHECKER) $(HTMLBASE)/tut/
291 $(WEBCHECKER) $(HTMLBASE)/dist/
292 $(WEBCHECKER) $(HTMLBASE)/inst/
293
294fastwebcheck: html
295 $(WEBCHECKER) -x $(HTMLBASE)/api/
296 $(WEBCHECKER) -x $(HTMLBASE)/doc/
297 $(WEBCHECKER) -x $(HTMLBASE)/ext/
298 $(WEBCHECKER) -x -m290000 $(HTMLBASE)/lib/
299 $(WEBCHECKER) -x $(HTMLBASE)/mac/
300 $(WEBCHECKER) -x $(HTMLBASE)/ref/
301 $(WEBCHECKER) -x $(HTMLBASE)/tut/
302 $(WEBCHECKER) -x $(HTMLBASE)/dist/
303 $(WEBCHECKER) -x $(HTMLBASE)/inst/
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000304
305
306# Release packaging targets:
Fred Drakee4837a11998-03-06 21:29:34 +0000307
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000308paper-$(PAPER)/README: ps $(TOOLSDIR)/getpagecounts
309 (cd paper-$(PAPER); ../$(TOOLSDIR)/getpagecounts >$@)
310
Fred Drakeb6584ca1999-01-08 15:49:45 +0000311info-$(RELEASE).tgz: info
Fred Drake28e66d11999-01-29 22:23:25 +0000312 (cd $(INFODIR); tar cf - README python.dir python-???.info*) \
313 | gzip -9 >$@
Fred Drakea7998351998-02-19 16:01:04 +0000314
Fred Drake4ef3ea01999-07-27 16:30:59 +0000315info-$(RELEASE).tar.bz2: info
316 (cd $(INFODIR); tar cf - README python.dir python-???.info*) \
317 | bzip2 -9 >$@
318
Fred Drakee34ab301998-05-11 21:10:15 +0000319latex-$(RELEASE).tgz:
Fred Drake83c09831999-08-02 20:20:14 +0000320 $(TOOLSDIR)/mksourcepkg --gzip $(RELEASE)
Fred Drakee61d7af1998-03-05 16:37:34 +0000321
Fred Drake4ef3ea01999-07-27 16:30:59 +0000322latex-$(RELEASE).tar.bz2:
Fred Drake83c09831999-08-02 20:20:14 +0000323 $(TOOLSDIR)/mksourcepkg --bzip2 $(RELEASE)
Fred Drake4ef3ea01999-07-27 16:30:59 +0000324
Fred Drake7dcc69a1999-07-23 16:11:36 +0000325latex-$(RELEASE).zip:
Fred Drake02ba6212000-04-04 20:58:25 +0000326 rm -f $@
Fred Drake83c09831999-08-02 20:20:14 +0000327 $(TOOLSDIR)/mksourcepkg --zip $(RELEASE)
Fred Drake7dcc69a1999-07-23 16:11:36 +0000328
Fred Draked19b9d61998-07-29 03:49:44 +0000329pdf-$(PAPER)-$(RELEASE).tgz: pdf
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000330 (cd paper-$(PAPER); tar cf - *.pdf) | gzip -9 >$@
Fred Drake04cf4dc1998-02-12 22:33:50 +0000331
Fred Drake4ef3ea01999-07-27 16:30:59 +0000332pdf-$(PAPER)-$(RELEASE).tar.bz2: pdf
333 (cd paper-$(PAPER); tar cf - *.pdf) | bzip2 -9 >$@
334
Fred Drake7dcc69a1999-07-23 16:11:36 +0000335pdf-$(PAPER)-$(RELEASE).zip: pdf
Fred Drake02ba6212000-04-04 20:58:25 +0000336 rm -f $@
337 (cd paper-$(PAPER); zip -q -9 ../$@ *.pdf)
Fred Drake7dcc69a1999-07-23 16:11:36 +0000338
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000339postscript-$(PAPER)-$(RELEASE).tar.bz2: ps paper-$(PAPER)/README
Fred Drake02ba6212000-04-04 20:58:25 +0000340 (cd paper-$(PAPER); tar cf - *.ps README) | bzip2 -9 >$@
Fred Drake04cf4dc1998-02-12 22:33:50 +0000341
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000342postscript-$(PAPER)-$(RELEASE).tgz: ps paper-$(PAPER)/README
Fred Drake02ba6212000-04-04 20:58:25 +0000343 (cd paper-$(PAPER); tar cf - *.ps README) | gzip -9 >$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000344
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000345postscript-$(PAPER)-$(RELEASE).zip: ps paper-$(PAPER)/README
Fred Drake02ba6212000-04-04 20:58:25 +0000346 rm -f $@
347 (cd paper-$(PAPER); zip -q -9 ../$@ *.ps README)
Fred Drake7dcc69a1999-07-23 16:11:36 +0000348
Fred Drakefcb7adb1999-01-12 20:32:39 +0000349html-$(RELEASE).tgz: html
Fred Drake02ba6212000-04-04 20:58:25 +0000350 (cd $(HTMLDIR); \
Fred Drake90f87672000-09-08 21:54:44 +0000351 tar cf - *.html */*.css */*.html */*.gif) \
Fred Drake29cabd41998-05-11 18:53:07 +0000352 | gzip -9 >$@
Fred Drake33d05b91998-01-13 16:33:09 +0000353
Fred Drake4ef3ea01999-07-27 16:30:59 +0000354html-$(RELEASE).tar.bz2: html
Fred Drake02ba6212000-04-04 20:58:25 +0000355 (cd $(HTMLDIR); \
Fred Drake90f87672000-09-08 21:54:44 +0000356 tar cf - *.html */*.css */*.html */*.gif) \
Fred Drake4ef3ea01999-07-27 16:30:59 +0000357 | bzip2 -9 >$@
358
Fred Drake7dcc69a1999-07-23 16:11:36 +0000359html-$(RELEASE).zip: html
Fred Drake02ba6212000-04-04 20:58:25 +0000360 rm -f $@
361 (cd $(HTMLDIR); \
Fred Drake90f87672000-09-08 21:54:44 +0000362 zip -q -9 ../$@ *.html */*.css */*.html */*.gif)
Fred Drake7dcc69a1999-07-23 16:11:36 +0000363
Fred Drakea7998351998-02-19 16:01:04 +0000364# convenience targets:
365
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000366tarhtml: html-$(RELEASE).tgz
Fred Drakeb6584ca1999-01-08 15:49:45 +0000367tarinfo: info-$(RELEASE).tgz
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000368tarps: postscript-$(PAPER)-$(RELEASE).tgz
369tarpdf: pdf-$(PAPER)-$(RELEASE).tgz
370tarlatex: latex-$(RELEASE).tgz
Fred Drakebbe33c51998-05-07 01:39:06 +0000371
Fred Drake83c09831999-08-02 20:20:14 +0000372tarballs: tarpdf tarps tarhtml
Guido van Rossum84cca441997-11-25 20:49:09 +0000373
Fred Drake7dcc69a1999-07-23 16:11:36 +0000374ziphtml: html-$(RELEASE).zip
375zipps: postscript-$(PAPER)-$(RELEASE).zip
376zippdf: pdf-$(PAPER)-$(RELEASE).zip
377ziplatex: latex-$(RELEASE).zip
378
Fred Drakeb906d2e2000-07-01 02:37:37 +0000379zips: zippdf zipps ziphtml
Fred Drake7dcc69a1999-07-23 16:11:36 +0000380
Fred Drake4ef3ea01999-07-27 16:30:59 +0000381bziphtml: html-$(RELEASE).tar.bz2
382bzipinfo: info-$(RELEASE).tar.bz2
383bzipps: postscript-$(PAPER)-$(RELEASE).tar.bz2
384bzippdf: pdf-$(PAPER)-$(RELEASE).tar.bz2
385bziplatex: latex-$(RELEASE).tar.bz2
386
Fred Drake83c09831999-08-02 20:20:14 +0000387bzips: bzippdf bzipps bziphtml
Fred Drake4ef3ea01999-07-27 16:30:59 +0000388
Fred Drake88634602001-01-25 17:32:51 +0000389distfiles: tarballs zips bzips
390 $(TOOLSDIR)/mksourcepkg --all $(RELEASE)
Fred Drake4ef3ea01999-07-27 16:30:59 +0000391
Guido van Rossume83e3801995-03-17 16:01:35 +0000392
393# Housekeeping targets
394
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000395# Remove temporary files; all except the following:
Fred Drake6659c301998-03-03 22:02:19 +0000396# - sources: .tex, .bib, .sty, *.cls
Fred Drake04cf4dc1998-02-12 22:33:50 +0000397# - useful results: .dvi, .pdf, .ps, .texi, .info
Fred Drakee4837a11998-03-06 21:29:34 +0000398clean:
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000399 (cd paper-$(PAPER); $(MAKE) clean)
Fred Drakee34ab301998-05-11 21:10:15 +0000400 (cd $(INFODIR); $(MAKE) clean)
Guido van Rossum5b343731992-07-07 09:06:34 +0000401
Guido van Rossume83e3801995-03-17 16:01:35 +0000402# Remove temporaries as well as final products
Fred Drakeb6584ca1999-01-08 15:49:45 +0000403clobber:
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000404 rm -f html-$(RELEASE).tgz info-$(RELEASE).tgz
405 rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz
Fred Drake7dcc69a1999-07-23 16:11:36 +0000406 rm -f latex-$(RELEASE).tgz html-$(RELEASE).zip
407 rm -f pdf-$(RELEASE).zip postscript-$(RELEASE).zip
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000408 rm -f $(DVIFILES) $(PSFILES) $(PDFFILES)
Fred Drakee34ab301998-05-11 21:10:15 +0000409 (cd $(INFODIR); $(MAKE) clobber)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000410 rm -rf html/index.html html/modindex.html html/acks.html
411 rm -rf html/api/ html/doc/ html/ext/ html/lib/ html/mac/
412 rm -rf html/ref/ html/tut/ html/inst/ html/dist/
Fred Drake5ad78f31998-02-22 19:47:13 +0000413
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000414realclean distclean: clobber
415
416
417# html/index.html is dependent on $(INDEXFILES) since we want the date
418# on the front index to be updated whenever any of the child documents
419# are updated and boilerplate.tex uses \today as the date.
420
421# It's at the end of the file since it wedges font-lock in XEmacs.
422
423BOILERPLATE=texinputs/boilerplate.tex
424html/index.html: html/index.html.in $(BOILERPLATE) $(INDEXFILES)
425 DATE=`grep '\\date{' $(BOILERPLATE) | sed 's/.*\\date{\(.*\)}.*$$/\1/'` ; \
426 if [ "$$DATE" = '\today' ] ; then DATE=`date '+%B %e, %Y'`;fi;\
427 sed -e "s/@DATE@/$$DATE/g" -e "s/@RELEASE@/$(RELEASE)/g" \
428 $< >$@