blob: a435f11d5675cdd25fe4f0ed63fbd4568270cfe4 [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 Drake9d843082003-07-30 02:55:28 +000052# in the info/ directory; please send patches to 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 Drakec8083cf2003-09-27 22:07:05 +000067# This is the *documentation* release, and is used to construct the
68# file names of the downloadable tarballs. It is initialized by the
69# getversioninfo script to ensure that the right version number is
70# used; the script will also write commontex/patchlevel.tex if that
71# doesn't exist or needs to be changed. Documents which depend on the
72# version number should use \input{patchlevel} and include
73# commontex/patchlevel.tex in their dependencies.
74RELEASE=$(shell $(PYTHON) tools/getversioninfo)
Fred Drake860e2561999-07-12 16:52:50 +000075
Fred Drakef6bfe8e2001-02-19 19:19:26 +000076PYTHON= python
77DVIPS= dvips -N0 -t $(PAPER)
78
Fred Drakee395e222003-09-27 05:52:16 +000079# This is ugly! The issue here is that there are two different levels
80# in the directory tree at which we execute mkhowto, so we can't
81# define it just once using a relative path (at least not with the
82# current implementation and Makefile structure). We use the GNUish
83# $(shell) function here to work around that restriction by
Fred Drake0d86ea72003-09-27 07:37:09 +000084# identifying mkhowto and the commontex/ directory using absolute paths.
Fred Drakee395e222003-09-27 05:52:16 +000085#
Kurt B. Kaiserad5206f2004-07-11 04:10:14 +000086# If your doc build fails immediately, you may need to switch to GNU make.
87# (e.g. OpenBSD needs package gmake installed; use gmake instead of make)
Fred Drake0d86ea72003-09-27 07:37:09 +000088PWD=$(shell pwd)
89
Georg Brandl7eb4b7d2005-07-22 21:49:32 +000090# (The trailing colon in the value is needed; TeX places its default
Fred Drake0d86ea72003-09-27 07:37:09 +000091# set of paths at the location of the empty string in the path list.)
92TEXINPUTS=$(PWD)/commontex:
93
94# The mkhowto script can be run from the checkout using the first
95# version of this variable definition, or from a preferred version
96# using the second version. The standard documentation is typically
97# built using the second flavor, where the preferred version is from
98# the Python CVS trunk.
Fred Drakea6008d02003-10-01 18:49:55 +000099MKHOWTO= TEXINPUTS=$(TEXINPUTS) $(PYTHON) $(PWD)/tools/mkhowto
Fred Drakedf493242003-09-25 15:25:37 +0000100
101MKDVI= $(MKHOWTO) --paper=$(PAPER) --dvi
102MKHTML= $(MKHOWTO) --html --about html/stdabout.dat \
Fred Drake6e2e90d2004-11-05 04:51:05 +0000103 --iconserver ../icons --favicon ../icons/pyfav.png \
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000104 --address $(PYTHONDOCS) --up-link ../index.html \
105 --up-title "Python Documentation Index" \
Fred Drake345b8df2001-10-30 16:28:46 +0000106 --global-module-index "../modindex.html" --dvips-safe
Fred Drakedf493242003-09-25 15:25:37 +0000107MKISILOHTML=$(MKHOWTO) --html --about html/stdabout.dat \
Fred Drake15a159c2002-10-01 15:20:20 +0000108 --iconserver ../icons \
Fred Drake345b8df2001-10-30 16:28:46 +0000109 --l2h-init perl/isilo.perl --numeric --split 1 \
110 --dvips-safe
Fred Drake80381632006-04-06 00:18:28 +0000111MKISILO= iSilo386 -U -y -rCR -d0
Fred Drakedf493242003-09-25 15:25:37 +0000112MKPDF= $(MKHOWTO) --paper=$(PAPER) --pdf
113MKPS= $(MKHOWTO) --paper=$(PAPER) --ps
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000114
115BUILDINDEX=$(TOOLSDIR)/buildindex.py
116
Fred Drake1385a572001-07-17 16:53:19 +0000117PYTHONDOCS="See <i><a href=\"about.html\">About this document...</a></i> for information on suggesting changes."
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000118HTMLBASE= file:`pwd`
119
Fred Drakebfc18bd2002-05-03 04:50:51 +0000120# The emacs binary used to build the info docs. GNU Emacs 21 is required.
121EMACS= emacs
122
Fred Drake30140862002-03-26 19:53:56 +0000123# The end of this should reflect the major/minor version numbers of
124# the release:
Fred Drakecf05f472004-12-01 05:55:47 +0000125WHATSNEW=whatsnew25
Fred Drake9ac14de2002-03-26 19:18:18 +0000126
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000127# what's what
128MANDVIFILES= paper-$(PAPER)/api.dvi paper-$(PAPER)/ext.dvi \
129 paper-$(PAPER)/lib.dvi paper-$(PAPER)/mac.dvi \
130 paper-$(PAPER)/ref.dvi paper-$(PAPER)/tut.dvi
131HOWTODVIFILES= paper-$(PAPER)/doc.dvi paper-$(PAPER)/inst.dvi \
Fred Drake9ac14de2002-03-26 19:18:18 +0000132 paper-$(PAPER)/dist.dvi paper-$(PAPER)/$(WHATSNEW).dvi
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000133
134MANPDFFILES= paper-$(PAPER)/api.pdf paper-$(PAPER)/ext.pdf \
135 paper-$(PAPER)/lib.pdf paper-$(PAPER)/mac.pdf \
136 paper-$(PAPER)/ref.pdf paper-$(PAPER)/tut.pdf
137HOWTOPDFFILES= paper-$(PAPER)/doc.pdf paper-$(PAPER)/inst.pdf \
Fred Drake9ac14de2002-03-26 19:18:18 +0000138 paper-$(PAPER)/dist.pdf paper-$(PAPER)/$(WHATSNEW).pdf
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000139
140MANPSFILES= paper-$(PAPER)/api.ps paper-$(PAPER)/ext.ps \
141 paper-$(PAPER)/lib.ps paper-$(PAPER)/mac.ps \
142 paper-$(PAPER)/ref.ps paper-$(PAPER)/tut.ps
143HOWTOPSFILES= paper-$(PAPER)/doc.ps paper-$(PAPER)/inst.ps \
Fred Drake9ac14de2002-03-26 19:18:18 +0000144 paper-$(PAPER)/dist.ps paper-$(PAPER)/$(WHATSNEW).ps
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000145
146DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES)
147PDFFILES= $(MANPDFFILES) $(HOWTOPDFFILES)
148PSFILES= $(MANPSFILES) $(HOWTOPSFILES)
149
Fred Drake0099d8f2001-10-25 15:12:31 +0000150HTMLCSSFILES=html/api/api.css \
151 html/doc/doc.css \
152 html/ext/ext.css \
153 html/lib/lib.css \
154 html/mac/mac.css \
155 html/ref/ref.css \
156 html/tut/tut.css \
157 html/inst/inst.css \
158 html/dist/dist.css
159
160ISILOCSSFILES=isilo/api/api.css \
161 isilo/doc/doc.css \
162 isilo/ext/ext.css \
163 isilo/lib/lib.css \
164 isilo/mac/mac.css \
165 isilo/ref/ref.css \
166 isilo/tut/tut.css \
167 isilo/inst/inst.css \
168 isilo/dist/dist.css
169
170ALLCSSFILES=$(HTMLCSSFILES) $(ISILOCSSFILES)
171
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000172INDEXFILES=html/api/api.html \
173 html/doc/doc.html \
174 html/ext/ext.html \
175 html/lib/lib.html \
176 html/mac/mac.html \
177 html/ref/ref.html \
178 html/tut/tut.html \
179 html/inst/inst.html \
Fred Drake9ac14de2002-03-26 19:18:18 +0000180 html/dist/dist.html \
181 html/whatsnew/$(WHATSNEW).html
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000182
Fred Drake5afb5e52001-07-18 21:17:29 +0000183ALLHTMLFILES=$(INDEXFILES) html/index.html html/modindex.html html/acks.html
184
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000185COMMONPERL= perl/manual.perl perl/python.perl perl/l2hinit.perl
186
Fred Drake520b0092001-10-29 17:40:40 +0000187ANNOAPI=api/refcounts.dat tools/anno-api.py
188
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000189include Makefile.deps
Fred Drake33d05b91998-01-13 16:33:09 +0000190
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000191# These must be declared phony since there
192# are directories with matching names:
Greg Ward0862f802000-04-28 16:53:36 +0000193.PHONY: api doc ext lib mac ref tut inst dist
Fred Drake0c77cf12001-10-19 21:12:57 +0000194.PHONY: html info isilo
Fred Drake3f8a59f1998-07-24 13:58:27 +0000195
Fred Drakebbe33c51998-05-07 01:39:06 +0000196
Guido van Rossume83e3801995-03-17 16:01:35 +0000197# Main target
Fred Drake38d53452002-05-25 20:28:46 +0000198default: html
199all: html dvi ps pdf isilo
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000200
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000201dvi: $(DVIFILES)
202pdf: $(PDFFILES)
203ps: $(PSFILES)
Fred Drakee4837a11998-03-06 21:29:34 +0000204
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000205world: ps pdf html distfiles
Guido van Rossum20aca5a1991-01-25 13:29:04 +0000206
Fred Drakef2951131998-05-07 19:30:16 +0000207
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000208# Rules to build PostScript and PDF formats
209.SUFFIXES: .dvi .ps
210
211.dvi.ps:
212 $(DVIPS) -o $@ $<
Fred Draked69e2c41998-05-11 18:25:46 +0000213
214
215# Targets for each document:
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000216# Python/C API Reference Manual
Fred Drake520b0092001-10-29 17:40:40 +0000217paper-$(PAPER)/api.dvi: $(ANNOAPIFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000218 cd paper-$(PAPER) && $(MKDVI) api.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000219
Fred Drake520b0092001-10-29 17:40:40 +0000220paper-$(PAPER)/api.pdf: $(ANNOAPIFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000221 cd paper-$(PAPER) && $(MKPDF) api.tex
Fred Drake15087431999-03-16 16:11:27 +0000222
Fred Drake57b38ed2002-10-04 19:23:06 +0000223paper-$(PAPER)/api.tex: api/api.tex
224 cp api/api.tex $@
Fred Draked69e2c41998-05-11 18:25:46 +0000225
Fred Drake520b0092001-10-29 17:40:40 +0000226paper-$(PAPER)/abstract.tex: api/abstract.tex $(ANNOAPI)
227 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/abstract.tex
228
229paper-$(PAPER)/concrete.tex: api/concrete.tex $(ANNOAPI)
230 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/concrete.tex
231
232paper-$(PAPER)/exceptions.tex: api/exceptions.tex $(ANNOAPI)
233 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/exceptions.tex
234
235paper-$(PAPER)/init.tex: api/init.tex $(ANNOAPI)
236 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/init.tex
237
Fred Drake57b38ed2002-10-04 19:23:06 +0000238paper-$(PAPER)/intro.tex: api/intro.tex
239 cp api/intro.tex $@
Fred Drake520b0092001-10-29 17:40:40 +0000240
241paper-$(PAPER)/memory.tex: api/memory.tex $(ANNOAPI)
242 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/memory.tex
243
244paper-$(PAPER)/newtypes.tex: api/newtypes.tex $(ANNOAPI)
245 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/newtypes.tex
246
247paper-$(PAPER)/refcounting.tex: api/refcounting.tex $(ANNOAPI)
248 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/refcounting.tex
249
250paper-$(PAPER)/utilities.tex: api/utilities.tex $(ANNOAPI)
251 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/utilities.tex
252
253paper-$(PAPER)/veryhigh.tex: api/veryhigh.tex $(ANNOAPI)
254 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/veryhigh.tex
255
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000256# Distributing Python Modules
257paper-$(PAPER)/dist.dvi: $(DISTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000258 cd paper-$(PAPER) && $(MKDVI) ../dist/dist.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000259
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000260paper-$(PAPER)/dist.pdf: $(DISTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000261 cd paper-$(PAPER) && $(MKPDF) ../dist/dist.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000262
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000263# Documenting Python
264paper-$(PAPER)/doc.dvi: $(DOCFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000265 cd paper-$(PAPER) && $(MKDVI) ../doc/doc.tex
Fred Drake3f8a59f1998-07-24 13:58:27 +0000266
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000267paper-$(PAPER)/doc.pdf: $(DOCFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000268 cd paper-$(PAPER) && $(MKPDF) ../doc/doc.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000269
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000270# Extending and Embedding the Python Interpreter
271paper-$(PAPER)/ext.dvi: $(EXTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000272 cd paper-$(PAPER) && $(MKDVI) ../ext/ext.tex
Greg Ward0862f802000-04-28 16:53:36 +0000273
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000274paper-$(PAPER)/ext.pdf: $(EXTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000275 cd paper-$(PAPER) && $(MKPDF) ../ext/ext.tex
Greg Ward0862f802000-04-28 16:53:36 +0000276
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000277# Installing Python Modules
278paper-$(PAPER)/inst.dvi: $(INSTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000279 cd paper-$(PAPER) && $(MKDVI) ../inst/inst.tex
Fred Draked69e2c41998-05-11 18:25:46 +0000280
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000281paper-$(PAPER)/inst.pdf: $(INSTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000282 cd paper-$(PAPER) && $(MKPDF) ../inst/inst.tex
Fred Drakef2951131998-05-07 19:30:16 +0000283
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000284# Python Library Reference
285paper-$(PAPER)/lib.dvi: $(LIBFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000286 cd paper-$(PAPER) && $(MKDVI) ../lib/lib.tex
Fred Drake15087431999-03-16 16:11:27 +0000287
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000288paper-$(PAPER)/lib.pdf: $(LIBFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000289 cd paper-$(PAPER) && $(MKPDF) ../lib/lib.tex
Fred Drakef2951131998-05-07 19:30:16 +0000290
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000291# Macintosh Library Modules
292paper-$(PAPER)/mac.dvi: $(MACFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000293 cd paper-$(PAPER) && $(MKDVI) ../mac/mac.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000294
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000295paper-$(PAPER)/mac.pdf: $(MACFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000296 cd paper-$(PAPER) && $(MKPDF) ../mac/mac.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000297
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000298# Python Reference Manual
299paper-$(PAPER)/ref.dvi: $(REFFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000300 cd paper-$(PAPER) && $(MKDVI) ../ref/ref.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000301
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000302paper-$(PAPER)/ref.pdf: $(REFFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000303 cd paper-$(PAPER) && $(MKPDF) ../ref/ref.tex
Fred Drakeddae4141998-02-17 15:45:25 +0000304
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000305# Python Tutorial
306paper-$(PAPER)/tut.dvi: $(TUTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000307 cd paper-$(PAPER) && $(MKDVI) ../tut/tut.tex
Greg Ward0862f802000-04-28 16:53:36 +0000308
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000309paper-$(PAPER)/tut.pdf: $(TUTFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000310 cd paper-$(PAPER) && $(MKPDF) ../tut/tut.tex
Guido van Rossume83e3801995-03-17 16:01:35 +0000311
Fred Drake9ac14de2002-03-26 19:18:18 +0000312# What's New in Python X.Y
Fred Drake4add68b2002-11-26 22:13:41 +0000313paper-$(PAPER)/$(WHATSNEW).dvi: whatsnew/$(WHATSNEW).tex
Fred Drake9ac14de2002-03-26 19:18:18 +0000314 cd paper-$(PAPER) && $(MKDVI) ../whatsnew/$(WHATSNEW).tex
315
Fred Drake4add68b2002-11-26 22:13:41 +0000316paper-$(PAPER)/$(WHATSNEW).pdf: whatsnew/$(WHATSNEW).tex
Fred Drake9ac14de2002-03-26 19:18:18 +0000317 cd paper-$(PAPER) && $(MKPDF) ../whatsnew/$(WHATSNEW).tex
318
Guido van Rossume83e3801995-03-17 16:01:35 +0000319# The remaining part of the Makefile is concerned with various
Guido van Rossum73827c61995-03-20 13:00:32 +0000320# conversions, as described above. See also the README file.
Guido van Rossume83e3801995-03-17 16:01:35 +0000321
Fred Drakeb9838d91998-05-08 15:43:08 +0000322info:
Fred Drakefa00f912003-07-16 04:01:04 +0000323 cd $(INFODIR) && $(MAKE) EMACS=$(EMACS) WHATSNEW=$(WHATSNEW)
Fred Drake5ad78f31998-02-22 19:47:13 +0000324
Guido van Rossum73827c61995-03-20 13:00:32 +0000325# Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to
326# HTML converter. For more info on this program, see
Guido van Rossume83e3801995-03-17 16:01:35 +0000327# <URL:http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html>.
Guido van Rossume83e3801995-03-17 16:01:35 +0000328
Guido van Rossum9cb64801997-12-29 20:01:55 +0000329# Note that LaTeX2HTML inserts references to an icons directory in
330# each page that it generates. I have placed a copy of this directory
331# in the distribution to simplify the process of creating a
332# self-contained HTML distribution; for this purpose I have also added
333# a (trivial) index.html. Change the definition of $ICONSERVER in
Fred Drake9fab3aa1998-04-28 19:20:43 +0000334# perl/l2hinit.perl to use a different location for the icons directory.
Guido van Rossume83e3801995-03-17 16:01:35 +0000335
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000336# If you have the standard LaTeX2HTML icons installed, the versions shipped
337# with this documentation should be stored in a separate directory and used
338# instead. The standard set does *not* include all the icons used in the
339# Python documentation.
Fred Drakebbe33c51998-05-07 01:39:06 +0000340
Fred Drake0099d8f2001-10-25 15:12:31 +0000341$(ALLCSSFILES): html/style.css
342 cp $< $@
343
Fred Drake5af41c52003-05-22 15:28:55 +0000344$(INDEXFILES): $(COMMONPERL) html/stdabout.dat tools/node2label.pl
Guido van Rossum6938f061994-08-01 12:22:53 +0000345
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000346html/acks.html: ACKS $(TOOLSDIR)/support.py $(TOOLSDIR)/mkackshtml
Fred Drake1385a572001-07-17 16:53:19 +0000347 $(PYTHON) $(TOOLSDIR)/mkackshtml --address $(PYTHONDOCS) \
Fred Drake6e2e90d2004-11-05 04:51:05 +0000348 --favicon icons/pyfav.png \
Fred Draked27ed852001-02-22 23:06:21 +0000349 --output html/acks.html <ACKS
Guido van Rossum6938f061994-08-01 12:22:53 +0000350
Fred Drake1385a572001-07-17 16:53:19 +0000351
352# html/index.html is dependent on $(INDEXFILES) since we want the date
353# on the front index to be updated whenever any of the child documents
354# are updated and boilerplate.tex uses \today as the date. The index
355# files are not used to actually generate content.
356
Fred Drakee1b38c42003-09-27 07:48:25 +0000357BOILERPLATE=commontex/boilerplate.tex
Fred Drake1385a572001-07-17 16:53:19 +0000358html/index.html: $(INDEXFILES)
359html/index.html: html/index.html.in $(BOILERPLATE) tools/rewrite.py
Fred Drake4e526fe2002-03-26 20:29:11 +0000360 $(PYTHON) tools/rewrite.py $(BOILERPLATE) \
361 RELEASE=$(RELEASE) WHATSNEW=$(WHATSNEW) \
Fred Drake1385a572001-07-17 16:53:19 +0000362 <$< >$@
363
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000364html/modindex.html: $(TOOLSDIR)/support.py $(TOOLSDIR)/mkmodindex
Fred Drake4ac6c6a2004-03-23 19:26:54 +0000365html/modindex.html: html/dist/dist.html
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000366html/modindex.html: html/lib/lib.html html/mac/mac.html
Fred Drake1385a572001-07-17 16:53:19 +0000367 cd html && \
Fred Drake4ac6c6a2004-03-23 19:26:54 +0000368 $(PYTHON) ../$(TOOLSDIR)/mkmodindex --columns 3 \
Fred Drake1385a572001-07-17 16:53:19 +0000369 --output modindex.html --address $(PYTHONDOCS) \
Fred Drake6e2e90d2004-11-05 04:51:05 +0000370 --favicon icons/pyfav.png \
Fred Drake4ac6c6a2004-03-23 19:26:54 +0000371 dist/modindex.html \
Fred Drake1385a572001-07-17 16:53:19 +0000372 lib/modindex.html mac/modindex.html
Fred Drake7d5f5dd1999-03-18 19:08:47 +0000373
Fred Drake0099d8f2001-10-25 15:12:31 +0000374html: $(ALLHTMLFILES) $(HTMLCSSFILES)
Guido van Rossum970871f1993-02-21 20:10:26 +0000375
Fred Drake0099d8f2001-10-25 15:12:31 +0000376api: html/api/api.html html/api/api.css
Fred Drakedb2e3e32002-05-23 19:41:25 +0000377html/api/api.html: $(APIFILES) api/refcounts.dat
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000378 $(MKHTML) --dir html/api api/api.tex
Fred Drakea6bb3961998-05-06 19:51:39 +0000379
Fred Drake0099d8f2001-10-25 15:12:31 +0000380doc: html/doc/doc.html html/doc/doc.css
381html/doc/doc.html: $(DOCFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000382 $(MKHTML) --dir html/doc doc/doc.tex
Fred Drakecdbd3911998-05-15 17:02:10 +0000383
Fred Drake0099d8f2001-10-25 15:12:31 +0000384ext: html/ext/ext.html html/ext/ext.css
385html/ext/ext.html: $(EXTFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000386 $(MKHTML) --dir html/ext ext/ext.tex
Guido van Rossume83e3801995-03-17 16:01:35 +0000387
Fred Drake0099d8f2001-10-25 15:12:31 +0000388lib: html/lib/lib.html html/lib/lib.css
389html/lib/lib.html: $(LIBFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000390 $(MKHTML) --dir html/lib lib/lib.tex
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000391
Fred Drake0099d8f2001-10-25 15:12:31 +0000392mac: html/mac/mac.html html/mac/mac.css
393html/mac/mac.html: $(MACFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000394 $(MKHTML) --dir html/mac mac/mac.tex
Greg Ward0862f802000-04-28 16:53:36 +0000395
Fred Drake0099d8f2001-10-25 15:12:31 +0000396ref: html/ref/ref.html html/ref/ref.css
397html/ref/ref.html: $(REFFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000398 $(MKHTML) --dir html/ref ref/ref.tex
Greg Ward0862f802000-04-28 16:53:36 +0000399
Fred Drake0099d8f2001-10-25 15:12:31 +0000400tut: html/tut/tut.html html/tut/tut.css
401html/tut/tut.html: $(TUTFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000402 $(MKHTML) --dir html/tut --numeric --split 3 tut/tut.tex
403
Fred Drake0099d8f2001-10-25 15:12:31 +0000404inst: html/inst/inst.html html/inst/inst.css
405html/inst/inst.html: $(INSTFILES) perl/distutils.perl
Fred Drake8c011582001-03-01 18:38:56 +0000406 $(MKHTML) --dir html/inst --split 4 inst/inst.tex
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000407
Fred Drake0099d8f2001-10-25 15:12:31 +0000408dist: html/dist/dist.html html/dist/dist.css
409html/dist/dist.html: $(DISTFILES) perl/distutils.perl
Fred Drake8c011582001-03-01 18:38:56 +0000410 $(MKHTML) --dir html/dist --split 4 dist/dist.tex
Fred Drakee7a8c972000-04-07 16:27:15 +0000411
Fred Drake9ac14de2002-03-26 19:18:18 +0000412whatsnew: html/whatsnew/$(WHATSNEW).html
413html/whatsnew/$(WHATSNEW).html: whatsnew/$(WHATSNEW).tex
414 $(MKHTML) --dir html/whatsnew --split 4 whatsnew/$(WHATSNEW).tex
415
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000416
Fred Drake0c77cf12001-10-19 21:12:57 +0000417# The iSilo format is used by the iSilo document reader for PalmOS devices.
418
419ISILOINDEXFILES=isilo/api/api.html \
420 isilo/doc/doc.html \
421 isilo/ext/ext.html \
422 isilo/lib/lib.html \
423 isilo/mac/mac.html \
424 isilo/ref/ref.html \
425 isilo/tut/tut.html \
426 isilo/inst/inst.html \
Fred Drake30140862002-03-26 19:53:56 +0000427 isilo/dist/dist.html \
428 isilo/whatsnew/$(WHATSNEW).html
Fred Drake0c77cf12001-10-19 21:12:57 +0000429
Fred Drake5af41c52003-05-22 15:28:55 +0000430$(ISILOINDEXFILES): $(COMMONPERL) html/stdabout.dat perl/isilo.perl
Fred Drake0c77cf12001-10-19 21:12:57 +0000431
Fred Drake1a0199a2002-08-09 20:20:50 +0000432isilo: isilo/python-api.pdb \
433 isilo/python-doc.pdb \
434 isilo/python-ext.pdb \
435 isilo/python-lib.pdb \
436 isilo/python-mac.pdb \
437 isilo/python-ref.pdb \
438 isilo/python-tut.pdb \
439 isilo/python-dist.pdb \
440 isilo/python-inst.pdb \
441 isilo/python-whatsnew.pdb
Fred Drake0c77cf12001-10-19 21:12:57 +0000442
Fred Drake1a0199a2002-08-09 20:20:50 +0000443isilo/python-api.pdb: isilo/api/api.html isilo/api/api.css
Fred Drake80381632006-04-06 00:18:28 +0000444 $(MKISILO) "-iPython/C API Reference Manual" \
445 isilo/api/api.html $@
Fred Drake0c77cf12001-10-19 21:12:57 +0000446
Fred Drake1a0199a2002-08-09 20:20:50 +0000447isilo/python-doc.pdb: isilo/doc/doc.html isilo/doc/doc.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000448 $(MKISILO) "-iDocumenting Python" \
449 isilo/doc/doc.html $@
450
Fred Drake1a0199a2002-08-09 20:20:50 +0000451isilo/python-ext.pdb: isilo/ext/ext.html isilo/ext/ext.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000452 $(MKISILO) "-iExtending & Embedding Python" \
453 isilo/ext/ext.html $@
454
Fred Drake1a0199a2002-08-09 20:20:50 +0000455isilo/python-lib.pdb: isilo/lib/lib.html isilo/lib/lib.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000456 $(MKISILO) "-iPython Library Reference" \
457 isilo/lib/lib.html $@
458
Fred Drake1a0199a2002-08-09 20:20:50 +0000459isilo/python-mac.pdb: isilo/mac/mac.html isilo/mac/mac.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000460 $(MKISILO) "-iPython/C API Reference Manual" \
461 isilo/mac/mac.html $@
462
Fred Drake1a0199a2002-08-09 20:20:50 +0000463isilo/python-ref.pdb: isilo/ref/ref.html isilo/ref/ref.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000464 $(MKISILO) "-iPython Reference Manual" \
465 isilo/ref/ref.html $@
466
Fred Drake1a0199a2002-08-09 20:20:50 +0000467isilo/python-tut.pdb: isilo/tut/tut.html isilo/tut/tut.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000468 $(MKISILO) "-iPython Tutorial" \
469 isilo/tut/tut.html $@
470
Fred Drake1a0199a2002-08-09 20:20:50 +0000471isilo/python-dist.pdb: isilo/dist/dist.html isilo/dist/dist.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000472 $(MKISILO) "-iDistributing Python Modules" \
473 isilo/dist/dist.html $@
474
Fred Drake1a0199a2002-08-09 20:20:50 +0000475isilo/python-inst.pdb: isilo/inst/inst.html isilo/inst/inst.css
Fred Drake0c77cf12001-10-19 21:12:57 +0000476 $(MKISILO) "-iInstalling Python Modules" \
477 isilo/inst/inst.html $@
478
Fred Drake1a0199a2002-08-09 20:20:50 +0000479isilo/python-whatsnew.pdb: isilo/whatsnew/$(WHATSNEW).html isilo/whatsnew/$(WHATSNEW).css
Fred Drake30140862002-03-26 19:53:56 +0000480 $(MKISILO) "-iWhat's New in Python X.Y" \
481 isilo/whatsnew/$(WHATSNEW).html $@
482
Fred Drakedb2e3e32002-05-23 19:41:25 +0000483isilo/api/api.html: $(APIFILES) api/refcounts.dat
Fred Drake0c77cf12001-10-19 21:12:57 +0000484 $(MKISILOHTML) --dir isilo/api api/api.tex
485
486isilo/doc/doc.html: $(DOCFILES)
487 $(MKISILOHTML) --dir isilo/doc doc/doc.tex
488
489isilo/ext/ext.html: $(EXTFILES)
490 $(MKISILOHTML) --dir isilo/ext ext/ext.tex
491
492isilo/lib/lib.html: $(LIBFILES)
493 $(MKISILOHTML) --dir isilo/lib lib/lib.tex
494
495isilo/mac/mac.html: $(MACFILES)
496 $(MKISILOHTML) --dir isilo/mac mac/mac.tex
497
498isilo/ref/ref.html: $(REFFILES)
499 $(MKISILOHTML) --dir isilo/ref ref/ref.tex
500
501isilo/tut/tut.html: $(TUTFILES)
502 $(MKISILOHTML) --dir isilo/tut tut/tut.tex
503
504isilo/inst/inst.html: $(INSTFILES) perl/distutils.perl
505 $(MKISILOHTML) --dir isilo/inst inst/inst.tex
506
507isilo/dist/dist.html: $(DISTFILES) perl/distutils.perl
508 $(MKISILOHTML) --dir isilo/dist dist/dist.tex
509
Fred Drake9ac14de2002-03-26 19:18:18 +0000510isilo/whatsnew/$(WHATSNEW).html: whatsnew/$(WHATSNEW).tex
511 $(MKISILOHTML) --dir isilo/whatsnew whatsnew/$(WHATSNEW).tex
512
Fred Drake0c77cf12001-10-19 21:12:57 +0000513# These are useful if you need to transport the iSilo-ready HTML to
514# another machine to perform the conversion:
515
516isilozip: isilo-html-$(RELEASE).zip
517
518isilo-html-$(RELEASE).zip: $(ISILOINDEXFILES)
519 rm -f $@
520 cd isilo && \
521 zip -q -9 ../$@ */*.css */*.html */*.txt
522
523
Fred Drakee4837a11998-03-06 21:29:34 +0000524# webchecker needs an extra flag to process the huge index from the libref
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000525WEBCHECKER=$(PYTHON) ../Tools/webchecker/webchecker.py
526HTMLBASE= file:`pwd`/html
527
Fred Drake5afb5e52001-07-18 21:17:29 +0000528webcheck: $(ALLHTMLFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000529 $(WEBCHECKER) $(HTMLBASE)/api/
530 $(WEBCHECKER) $(HTMLBASE)/doc/
531 $(WEBCHECKER) $(HTMLBASE)/ext/
532 $(WEBCHECKER) -m290000 $(HTMLBASE)/lib/
533 $(WEBCHECKER) $(HTMLBASE)/mac/
534 $(WEBCHECKER) $(HTMLBASE)/ref/
535 $(WEBCHECKER) $(HTMLBASE)/tut/
536 $(WEBCHECKER) $(HTMLBASE)/dist/
537 $(WEBCHECKER) $(HTMLBASE)/inst/
Fred Drake30140862002-03-26 19:53:56 +0000538 $(WEBCHECKER) $(HTMLBASE)/whatsnew/
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000539
Fred Drake5afb5e52001-07-18 21:17:29 +0000540fastwebcheck: $(ALLHTMLFILES)
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000541 $(WEBCHECKER) -x $(HTMLBASE)/api/
542 $(WEBCHECKER) -x $(HTMLBASE)/doc/
543 $(WEBCHECKER) -x $(HTMLBASE)/ext/
544 $(WEBCHECKER) -x -m290000 $(HTMLBASE)/lib/
545 $(WEBCHECKER) -x $(HTMLBASE)/mac/
546 $(WEBCHECKER) -x $(HTMLBASE)/ref/
547 $(WEBCHECKER) -x $(HTMLBASE)/tut/
548 $(WEBCHECKER) -x $(HTMLBASE)/dist/
549 $(WEBCHECKER) -x $(HTMLBASE)/inst/
Fred Drake30140862002-03-26 19:53:56 +0000550 $(WEBCHECKER) -x $(HTMLBASE)/whatsnew/
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000551
552
553# Release packaging targets:
Fred Drakee4837a11998-03-06 21:29:34 +0000554
Fred Drake5afb5e52001-07-18 21:17:29 +0000555paper-$(PAPER)/README: $(PSFILES) $(TOOLSDIR)/getpagecounts
Fred Drake3d0b6972002-04-17 03:31:08 +0000556 cd paper-$(PAPER) && ../$(TOOLSDIR)/getpagecounts -r $(RELEASE) >../$@
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000557
Fred Drakeb6584ca1999-01-08 15:49:45 +0000558info-$(RELEASE).tgz: info
Fred Drake1385a572001-07-17 16:53:19 +0000559 cd $(INFODIR) && tar cf - README python.dir python-*.info* \
Fred Drakede7cdb22003-07-17 11:55:18 +0000560 | gzip -9 >../$@
Fred Drakea7998351998-02-19 16:01:04 +0000561
Fred Drake4ef3ea01999-07-27 16:30:59 +0000562info-$(RELEASE).tar.bz2: info
Fred Drake1385a572001-07-17 16:53:19 +0000563 cd $(INFODIR) && tar cf - README python.dir python-*.info* \
Fred Drakede7cdb22003-07-17 11:55:18 +0000564 | bzip2 -9 >../$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000565
Fred Drakee34ab301998-05-11 21:10:15 +0000566latex-$(RELEASE).tgz:
Fred Drake1385a572001-07-17 16:53:19 +0000567 $(PYTHON) $(TOOLSDIR)/mksourcepkg --gzip $(RELEASE)
Fred Drakee61d7af1998-03-05 16:37:34 +0000568
Fred Drake4ef3ea01999-07-27 16:30:59 +0000569latex-$(RELEASE).tar.bz2:
Fred Drake1385a572001-07-17 16:53:19 +0000570 $(PYTHON) $(TOOLSDIR)/mksourcepkg --bzip2 $(RELEASE)
Fred Drake4ef3ea01999-07-27 16:30:59 +0000571
Fred Drake7dcc69a1999-07-23 16:11:36 +0000572latex-$(RELEASE).zip:
Fred Drake02ba6212000-04-04 20:58:25 +0000573 rm -f $@
Fred Drake1385a572001-07-17 16:53:19 +0000574 $(PYTHON) $(TOOLSDIR)/mksourcepkg --zip $(RELEASE)
Fred Drake7dcc69a1999-07-23 16:11:36 +0000575
Fred Drake5afb5e52001-07-18 21:17:29 +0000576pdf-$(PAPER)-$(RELEASE).tar: $(PDFFILES)
Fred Drake1a0199a2002-08-09 20:20:50 +0000577 rm -f $@
578 mkdir Python-Docs-$(RELEASE)
579 cp paper-$(PAPER)/*.pdf Python-Docs-$(RELEASE)
580 tar cf $@ Python-Docs-$(RELEASE)
581 rm -r Python-Docs-$(RELEASE)
Fred Drake04cf4dc1998-02-12 22:33:50 +0000582
Fred Drake5afb5e52001-07-18 21:17:29 +0000583pdf-$(PAPER)-$(RELEASE).tgz: pdf-$(PAPER)-$(RELEASE).tar
584 gzip -9 <$? >$@
585
586pdf-$(PAPER)-$(RELEASE).tar.bz2: pdf-$(PAPER)-$(RELEASE).tar
587 bzip2 -9 <$? >$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000588
Fred Drake7dcc69a1999-07-23 16:11:36 +0000589pdf-$(PAPER)-$(RELEASE).zip: pdf
Fred Drake02ba6212000-04-04 20:58:25 +0000590 rm -f $@
Fred Drake1a0199a2002-08-09 20:20:50 +0000591 mkdir Python-Docs-$(RELEASE)
592 cp paper-$(PAPER)/*.pdf Python-Docs-$(RELEASE)
593 zip -q -r -9 $@ Python-Docs-$(RELEASE)
594 rm -r Python-Docs-$(RELEASE)
Fred Drake7dcc69a1999-07-23 16:11:36 +0000595
Fred Drake5afb5e52001-07-18 21:17:29 +0000596postscript-$(PAPER)-$(RELEASE).tar: $(PSFILES) paper-$(PAPER)/README
Fred Drake1a0199a2002-08-09 20:20:50 +0000597 rm -f $@
598 mkdir Python-Docs-$(RELEASE)
599 cp paper-$(PAPER)/*.ps Python-Docs-$(RELEASE)
600 cp paper-$(PAPER)/README Python-Docs-$(RELEASE)
601 tar cf $@ Python-Docs-$(RELEASE)
602 rm -r Python-Docs-$(RELEASE)
Fred Drake04cf4dc1998-02-12 22:33:50 +0000603
Fred Drake5afb5e52001-07-18 21:17:29 +0000604postscript-$(PAPER)-$(RELEASE).tar.bz2: postscript-$(PAPER)-$(RELEASE).tar
605 bzip2 -9 <$< >$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000606
Fred Drake5afb5e52001-07-18 21:17:29 +0000607postscript-$(PAPER)-$(RELEASE).tgz: postscript-$(PAPER)-$(RELEASE).tar
608 gzip -9 <$< >$@
609
610postscript-$(PAPER)-$(RELEASE).zip: $(PSFILES) paper-$(PAPER)/README
Fred Drake02ba6212000-04-04 20:58:25 +0000611 rm -f $@
Fred Drake1a0199a2002-08-09 20:20:50 +0000612 mkdir Python-Docs-$(RELEASE)
613 cp paper-$(PAPER)/*.ps Python-Docs-$(RELEASE)
614 cp paper-$(PAPER)/README Python-Docs-$(RELEASE)
615 zip -q -r -9 $@ Python-Docs-$(RELEASE)
616 rm -r Python-Docs-$(RELEASE)
617
Fred Drake4f580e82004-04-08 18:50:51 +0000618HTMLPKGFILES=*.html */*.css */*.html */*.gif */*.png */*.txt
Fred Drake7dcc69a1999-07-23 16:11:36 +0000619
Fred Drake0099d8f2001-10-25 15:12:31 +0000620html-$(RELEASE).tar: $(ALLHTMLFILES) $(HTMLCSSFILES)
Fred Drake1a0199a2002-08-09 20:20:50 +0000621 mkdir Python-Docs-$(RELEASE)
Matthias Klose5b75f7d2004-08-18 22:17:44 +0000622 -find html -name '*.gif' -size 0 | xargs rm -f
Fred Drake1a0199a2002-08-09 20:20:50 +0000623 cd html && tar cf ../temp.tar $(HTMLPKGFILES)
624 cd Python-Docs-$(RELEASE) && tar xf ../temp.tar
625 rm temp.tar
626 tar cf html-$(RELEASE).tar Python-Docs-$(RELEASE)
627 rm -r Python-Docs-$(RELEASE)
Fred Drake33d05b91998-01-13 16:33:09 +0000628
Fred Drake8f65aef2001-07-17 23:35:46 +0000629html-$(RELEASE).tgz: html-$(RELEASE).tar
Fred Drake5afb5e52001-07-18 21:17:29 +0000630 gzip -9 <$? >$@
Fred Drake8f65aef2001-07-17 23:35:46 +0000631
632html-$(RELEASE).tar.bz2: html-$(RELEASE).tar
Fred Drake5afb5e52001-07-18 21:17:29 +0000633 bzip2 -9 <$? >$@
Fred Drake4ef3ea01999-07-27 16:30:59 +0000634
Fred Drake0099d8f2001-10-25 15:12:31 +0000635html-$(RELEASE).zip: $(ALLHTMLFILES) $(HTMLCSSFILES)
Fred Drake02ba6212000-04-04 20:58:25 +0000636 rm -f $@
Fred Drake1a0199a2002-08-09 20:20:50 +0000637 mkdir Python-Docs-$(RELEASE)
638 cd html && tar cf ../temp.tar $(HTMLPKGFILES)
639 cd Python-Docs-$(RELEASE) && tar xf ../temp.tar
640 rm temp.tar
641 zip -q -r -9 $@ Python-Docs-$(RELEASE)
642 rm -r Python-Docs-$(RELEASE)
Fred Drake7dcc69a1999-07-23 16:11:36 +0000643
Fred Drake0c77cf12001-10-19 21:12:57 +0000644isilo-$(RELEASE).zip: isilo
Fred Drake1a0199a2002-08-09 20:20:50 +0000645 rm -f $@
646 mkdir Python-Docs-$(RELEASE)
647 cp isilo/python-*.pdb Python-Docs-$(RELEASE)
648 zip -q -r -9 $@ Python-Docs-$(RELEASE)
649 rm -r Python-Docs-$(RELEASE)
Fred Drake0c77cf12001-10-19 21:12:57 +0000650
651
Fred Drakea7998351998-02-19 16:01:04 +0000652# convenience targets:
653
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000654tarhtml: html-$(RELEASE).tgz
Fred Drakeb6584ca1999-01-08 15:49:45 +0000655tarinfo: info-$(RELEASE).tgz
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000656tarps: postscript-$(PAPER)-$(RELEASE).tgz
657tarpdf: pdf-$(PAPER)-$(RELEASE).tgz
658tarlatex: latex-$(RELEASE).tgz
Fred Drakebbe33c51998-05-07 01:39:06 +0000659
Fred Drake83c09831999-08-02 20:20:14 +0000660tarballs: tarpdf tarps tarhtml
Guido van Rossum84cca441997-11-25 20:49:09 +0000661
Fred Drake7dcc69a1999-07-23 16:11:36 +0000662ziphtml: html-$(RELEASE).zip
663zipps: postscript-$(PAPER)-$(RELEASE).zip
664zippdf: pdf-$(PAPER)-$(RELEASE).zip
665ziplatex: latex-$(RELEASE).zip
Fred Drake0c77cf12001-10-19 21:12:57 +0000666zipisilo: isilo-$(RELEASE).zip
Fred Drake7dcc69a1999-07-23 16:11:36 +0000667
Fred Drakeb906d2e2000-07-01 02:37:37 +0000668zips: zippdf zipps ziphtml
Fred Drake7dcc69a1999-07-23 16:11:36 +0000669
Fred Drake4ef3ea01999-07-27 16:30:59 +0000670bziphtml: html-$(RELEASE).tar.bz2
671bzipinfo: info-$(RELEASE).tar.bz2
672bzipps: postscript-$(PAPER)-$(RELEASE).tar.bz2
673bzippdf: pdf-$(PAPER)-$(RELEASE).tar.bz2
674bziplatex: latex-$(RELEASE).tar.bz2
675
Fred Drake83c09831999-08-02 20:20:14 +0000676bzips: bzippdf bzipps bziphtml
Fred Drake4ef3ea01999-07-27 16:30:59 +0000677
Fred Drake2e6fb462004-09-17 20:23:47 +0000678disthtml: bziphtml ziphtml
679distinfo: bzipinfo
680distps: bzipps zipps
681distpdf: bzippdf zippdf
682distlatex: bziplatex ziplatex
Fred Drakefc4ee0a2001-04-13 18:00:23 +0000683
Fred Drakeb36615d2003-09-28 16:25:43 +0000684# We use the "pkglist" target at the end of these to ensure the
685# package list is updated after building either of these; this seems a
686# reasonable compromise between only building it for distfiles or
687# having to build it manually. Doing it here allows the packages for
688# distribution to be built using either of
689# make distfiles && make PAPER=a4 paperdist
690# make paperdist && make PAPER=a4 distfiles
691# The small amount of additional work is a small price to pay for not
692# having to remember which order to do it in. ;)
693paperdist: distpdf distps pkglist
Fred Drake7cea65c2006-06-19 17:31:16 +0000694edist: disthtml pkglist
Fred Drake5afb5e52001-07-18 21:17:29 +0000695
Fred Drakeb36615d2003-09-28 16:25:43 +0000696# The pkglist.html file is used as part of the download.html page on
697# python.org; it is not used as intermediate input here or as part of
698# the packages created.
Fred Drakede7cdb22003-07-17 11:55:18 +0000699pkglist:
700 $(TOOLSDIR)/mkpkglist >pkglist.html
701
Fred Drake5afb5e52001-07-18 21:17:29 +0000702distfiles: paperdist edist
Fred Drakecf05f472004-12-01 05:55:47 +0000703 $(TOOLSDIR)/mksourcepkg --bzip2 --zip $(RELEASE)
Fred Drake444e4342003-04-23 15:04:52 +0000704 $(TOOLSDIR)/mkpkglist >pkglist.html
Fred Drake4ef3ea01999-07-27 16:30:59 +0000705
Guido van Rossume83e3801995-03-17 16:01:35 +0000706
707# Housekeeping targets
708
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000709# Remove temporary files; all except the following:
Fred Drake6659c301998-03-03 22:02:19 +0000710# - sources: .tex, .bib, .sty, *.cls
Fred Drake04cf4dc1998-02-12 22:33:50 +0000711# - useful results: .dvi, .pdf, .ps, .texi, .info
Fred Drakee4837a11998-03-06 21:29:34 +0000712clean:
Fred Drake8f65aef2001-07-17 23:35:46 +0000713 rm -f html-$(RELEASE).tar
Fred Drake1385a572001-07-17 16:53:19 +0000714 cd $(INFODIR) && $(MAKE) clean
Guido van Rossum5b343731992-07-07 09:06:34 +0000715
Guido van Rossume83e3801995-03-17 16:01:35 +0000716# Remove temporaries as well as final products
Fred Drakeb6584ca1999-01-08 15:49:45 +0000717clobber:
Fred Drake8f65aef2001-07-17 23:35:46 +0000718 rm -f html-$(RELEASE).tar
Fred Drakeeb7fe4f1998-08-12 17:08:37 +0000719 rm -f html-$(RELEASE).tgz info-$(RELEASE).tgz
720 rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz
Fred Drake7dcc69a1999-07-23 16:11:36 +0000721 rm -f latex-$(RELEASE).tgz html-$(RELEASE).zip
722 rm -f pdf-$(RELEASE).zip postscript-$(RELEASE).zip
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000723 rm -f $(DVIFILES) $(PSFILES) $(PDFFILES)
Fred Drake1385a572001-07-17 16:53:19 +0000724 cd $(INFODIR) && $(MAKE) clobber
Fred Drake210d3cc2002-02-04 19:49:29 +0000725 rm -f paper-$(PAPER)/*.tex paper-$(PAPER)/*.ind paper-$(PAPER)/*.idx
726 rm -f paper-$(PAPER)/*.l2h paper-$(PAPER)/*.how paper-$(PAPER)/README
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000727 rm -rf html/index.html html/modindex.html html/acks.html
728 rm -rf html/api/ html/doc/ html/ext/ html/lib/ html/mac/
729 rm -rf html/ref/ html/tut/ html/inst/ html/dist/
Fred Drake30140862002-03-26 19:53:56 +0000730 rm -rf html/whatsnew/
Fred Drake0c77cf12001-10-19 21:12:57 +0000731 rm -rf isilo/api/ isilo/doc/ isilo/ext/ isilo/lib/ isilo/mac/
732 rm -rf isilo/ref/ isilo/tut/ isilo/inst/ isilo/dist/
Fred Drake30140862002-03-26 19:53:56 +0000733 rm -rf isilo/whatsnew/
Fred Drake1a0199a2002-08-09 20:20:50 +0000734 rm -f isilo/python-*.pdb isilo-$(RELEASE).zip
Fred Drake5ad78f31998-02-22 19:47:13 +0000735
Fred Drakef6bfe8e2001-02-19 19:19:26 +0000736realclean distclean: clobber