Fix sf bug 666219: assertion error in httplib.
[python/dscho.git] / Doc / Makefile
blob647d33f65d3d30ea5f2dade4bff18c218db683f0
1 # Makefile for Python documentation
2 # ---------------------------------
4 # See also the README file.
6 # This is a bit of a mess. The documents are identified by short names:
7 # api -- Python/C API Reference Manual
8 # doc -- Documenting Python
9 # ext -- Extending and Embedding the Python Interpreter
10 # lib -- Library Reference Manual
11 # mac -- Macintosh Library Modules
12 # ref -- Python Reference Manual
13 # tut -- Python Tutorial
14 # inst -- Installing Python Modules
15 # dist -- Distributing Python Modules
17 # The LaTeX sources for each of these documents are in subdirectories
18 # with the three-letter designations above as the directory names.
20 # 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.
24 # 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
27 # number of environments for formatting function and data definitions.
28 # 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.
32 # Everything is processed by LaTeX. See the file `README' for more
33 # information on the tools needed for processing.
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).
39 # 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:
43 # ps -- convert all documents from LaTeX to PostScript
44 # pdf -- convert all documents from LaTeX to the
45 # Portable Document Format
47 # See the README file for more information on these targets.
49 # The formatted output is located in subdirectories. For PDF and
50 # PostScript, look in the paper-$(PAPER)/ directory. For HTML, look in
51 # the html/ directory. If you want to fix the GNU info process, look
52 # in the info/ directory; please send patches to python-docs@python.org.
54 # This Makefile only includes information on how to perform builds; for
55 # dependency information, see Makefile.deps.
57 # Customization -- you *may* have to edit this
59 # You could set this to a4:
60 PAPER=letter
62 # Ideally, you shouldn't need to edit beyond this point
64 INFODIR= info
65 TOOLSDIR= tools
67 # This is the *documentation* release, and is used to construct the file
68 # names of the downloadable tarballs.
69 RELEASE=2.3b2
71 PYTHON= python
72 DVIPS= dvips -N0 -t $(PAPER)
74 MKDVI= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --dvi
75 MKHTML= $(PYTHON) tools/mkhowto --html --about html/stdabout.dat \
76 --iconserver ../icons --favicon ../icons/pyfav.gif \
77 --address $(PYTHONDOCS) --up-link ../index.html \
78 --up-title "Python Documentation Index" \
79 --global-module-index "../modindex.html" --dvips-safe
80 MKISILOHTML=$(PYTHON) tools/mkhowto --html --about html/stdabout.dat \
81 --iconserver ../icons \
82 --l2h-init perl/isilo.perl --numeric --split 1 \
83 --dvips-safe
84 MKISILO= iSilo386 -U -y -rCR -d0
85 MKPDF= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --pdf
86 MKPS= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --ps
88 BUILDINDEX=$(TOOLSDIR)/buildindex.py
90 PYTHONDOCS="See <i><a href=\"about.html\">About this document...</a></i> for information on suggesting changes."
91 HTMLBASE= file:`pwd`
93 # The emacs binary used to build the info docs. GNU Emacs 21 is required.
94 EMACS= emacs
96 # The end of this should reflect the major/minor version numbers of
97 # the release:
98 WHATSNEW=whatsnew23
100 # what's what
101 MANDVIFILES= paper-$(PAPER)/api.dvi paper-$(PAPER)/ext.dvi \
102 paper-$(PAPER)/lib.dvi paper-$(PAPER)/mac.dvi \
103 paper-$(PAPER)/ref.dvi paper-$(PAPER)/tut.dvi
104 HOWTODVIFILES= paper-$(PAPER)/doc.dvi paper-$(PAPER)/inst.dvi \
105 paper-$(PAPER)/dist.dvi paper-$(PAPER)/$(WHATSNEW).dvi
107 MANPDFFILES= paper-$(PAPER)/api.pdf paper-$(PAPER)/ext.pdf \
108 paper-$(PAPER)/lib.pdf paper-$(PAPER)/mac.pdf \
109 paper-$(PAPER)/ref.pdf paper-$(PAPER)/tut.pdf
110 HOWTOPDFFILES= paper-$(PAPER)/doc.pdf paper-$(PAPER)/inst.pdf \
111 paper-$(PAPER)/dist.pdf paper-$(PAPER)/$(WHATSNEW).pdf
113 MANPSFILES= paper-$(PAPER)/api.ps paper-$(PAPER)/ext.ps \
114 paper-$(PAPER)/lib.ps paper-$(PAPER)/mac.ps \
115 paper-$(PAPER)/ref.ps paper-$(PAPER)/tut.ps
116 HOWTOPSFILES= paper-$(PAPER)/doc.ps paper-$(PAPER)/inst.ps \
117 paper-$(PAPER)/dist.ps paper-$(PAPER)/$(WHATSNEW).ps
119 DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES)
120 PDFFILES= $(MANPDFFILES) $(HOWTOPDFFILES)
121 PSFILES= $(MANPSFILES) $(HOWTOPSFILES)
123 HTMLCSSFILES=html/api/api.css \
124 html/doc/doc.css \
125 html/ext/ext.css \
126 html/lib/lib.css \
127 html/mac/mac.css \
128 html/ref/ref.css \
129 html/tut/tut.css \
130 html/inst/inst.css \
131 html/dist/dist.css
133 ISILOCSSFILES=isilo/api/api.css \
134 isilo/doc/doc.css \
135 isilo/ext/ext.css \
136 isilo/lib/lib.css \
137 isilo/mac/mac.css \
138 isilo/ref/ref.css \
139 isilo/tut/tut.css \
140 isilo/inst/inst.css \
141 isilo/dist/dist.css
143 ALLCSSFILES=$(HTMLCSSFILES) $(ISILOCSSFILES)
145 INDEXFILES=html/api/api.html \
146 html/doc/doc.html \
147 html/ext/ext.html \
148 html/lib/lib.html \
149 html/mac/mac.html \
150 html/ref/ref.html \
151 html/tut/tut.html \
152 html/inst/inst.html \
153 html/dist/dist.html \
154 html/whatsnew/$(WHATSNEW).html
156 ALLHTMLFILES=$(INDEXFILES) html/index.html html/modindex.html html/acks.html
158 COMMONPERL= perl/manual.perl perl/python.perl perl/l2hinit.perl
160 ANNOAPI=api/refcounts.dat tools/anno-api.py
162 include Makefile.deps
164 # These must be declared phony since there
165 # are directories with matching names:
166 .PHONY: api doc ext lib mac ref tut inst dist
167 .PHONY: html info isilo
170 # Main target
171 default: html
172 all: html dvi ps pdf isilo
174 dvi: $(DVIFILES)
175 pdf: $(PDFFILES)
176 ps: $(PSFILES)
178 world: ps pdf html distfiles
181 # Rules to build PostScript and PDF formats
182 .SUFFIXES: .dvi .ps
184 .dvi.ps:
185 $(DVIPS) -o $@ $<
188 # Targets for each document:
189 # Python/C API Reference Manual
190 paper-$(PAPER)/api.dvi: $(ANNOAPIFILES)
191 cd paper-$(PAPER) && $(MKDVI) api.tex
193 paper-$(PAPER)/api.pdf: $(ANNOAPIFILES)
194 cd paper-$(PAPER) && $(MKPDF) api.tex
196 paper-$(PAPER)/api.tex: api/api.tex
197 cp api/api.tex $@
199 paper-$(PAPER)/abstract.tex: api/abstract.tex $(ANNOAPI)
200 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/abstract.tex
202 paper-$(PAPER)/concrete.tex: api/concrete.tex $(ANNOAPI)
203 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/concrete.tex
205 paper-$(PAPER)/exceptions.tex: api/exceptions.tex $(ANNOAPI)
206 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/exceptions.tex
208 paper-$(PAPER)/init.tex: api/init.tex $(ANNOAPI)
209 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/init.tex
211 paper-$(PAPER)/intro.tex: api/intro.tex
212 cp api/intro.tex $@
214 paper-$(PAPER)/memory.tex: api/memory.tex $(ANNOAPI)
215 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/memory.tex
217 paper-$(PAPER)/newtypes.tex: api/newtypes.tex $(ANNOAPI)
218 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/newtypes.tex
220 paper-$(PAPER)/refcounting.tex: api/refcounting.tex $(ANNOAPI)
221 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/refcounting.tex
223 paper-$(PAPER)/utilities.tex: api/utilities.tex $(ANNOAPI)
224 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/utilities.tex
226 paper-$(PAPER)/veryhigh.tex: api/veryhigh.tex $(ANNOAPI)
227 $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/veryhigh.tex
229 # Distributing Python Modules
230 paper-$(PAPER)/dist.dvi: $(DISTFILES)
231 cd paper-$(PAPER) && $(MKDVI) ../dist/dist.tex
233 paper-$(PAPER)/dist.pdf: $(DISTFILES)
234 cd paper-$(PAPER) && $(MKPDF) ../dist/dist.tex
236 # Documenting Python
237 paper-$(PAPER)/doc.dvi: $(DOCFILES)
238 cd paper-$(PAPER) && $(MKDVI) ../doc/doc.tex
240 paper-$(PAPER)/doc.pdf: $(DOCFILES)
241 cd paper-$(PAPER) && $(MKPDF) ../doc/doc.tex
243 # Extending and Embedding the Python Interpreter
244 paper-$(PAPER)/ext.dvi: $(EXTFILES)
245 cd paper-$(PAPER) && $(MKDVI) ../ext/ext.tex
247 paper-$(PAPER)/ext.pdf: $(EXTFILES)
248 cd paper-$(PAPER) && $(MKPDF) ../ext/ext.tex
250 # Installing Python Modules
251 paper-$(PAPER)/inst.dvi: $(INSTFILES)
252 cd paper-$(PAPER) && $(MKDVI) ../inst/inst.tex
254 paper-$(PAPER)/inst.pdf: $(INSTFILES)
255 cd paper-$(PAPER) && $(MKPDF) ../inst/inst.tex
257 # Python Library Reference
258 paper-$(PAPER)/lib.dvi: $(LIBFILES)
259 cd paper-$(PAPER) && $(MKDVI) ../lib/lib.tex
261 paper-$(PAPER)/lib.pdf: $(LIBFILES)
262 cd paper-$(PAPER) && $(MKPDF) ../lib/lib.tex
264 # Macintosh Library Modules
265 paper-$(PAPER)/mac.dvi: $(MACFILES)
266 cd paper-$(PAPER) && $(MKDVI) ../mac/mac.tex
268 paper-$(PAPER)/mac.pdf: $(MACFILES)
269 cd paper-$(PAPER) && $(MKPDF) ../mac/mac.tex
271 # Python Reference Manual
272 paper-$(PAPER)/ref.dvi: $(REFFILES)
273 cd paper-$(PAPER) && $(MKDVI) ../ref/ref.tex
275 paper-$(PAPER)/ref.pdf: $(REFFILES)
276 cd paper-$(PAPER) && $(MKPDF) ../ref/ref.tex
278 # Python Tutorial
279 paper-$(PAPER)/tut.dvi: $(TUTFILES)
280 cd paper-$(PAPER) && $(MKDVI) ../tut/tut.tex
282 paper-$(PAPER)/tut.pdf: $(TUTFILES)
283 cd paper-$(PAPER) && $(MKPDF) ../tut/tut.tex
285 # What's New in Python X.Y
286 paper-$(PAPER)/$(WHATSNEW).dvi: whatsnew/$(WHATSNEW).tex
287 cd paper-$(PAPER) && $(MKDVI) ../whatsnew/$(WHATSNEW).tex
289 paper-$(PAPER)/$(WHATSNEW).pdf: whatsnew/$(WHATSNEW).tex
290 cd paper-$(PAPER) && $(MKPDF) ../whatsnew/$(WHATSNEW).tex
292 # The remaining part of the Makefile is concerned with various
293 # conversions, as described above. See also the README file.
295 info:
296 cd $(INFODIR) && $(MAKE) EMACS=$(EMACS)
298 # Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to
299 # HTML converter. For more info on this program, see
300 # <URL:http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html>.
302 # Note that LaTeX2HTML inserts references to an icons directory in
303 # each page that it generates. I have placed a copy of this directory
304 # in the distribution to simplify the process of creating a
305 # self-contained HTML distribution; for this purpose I have also added
306 # a (trivial) index.html. Change the definition of $ICONSERVER in
307 # perl/l2hinit.perl to use a different location for the icons directory.
309 # If you have the standard LaTeX2HTML icons installed, the versions shipped
310 # with this documentation should be stored in a separate directory and used
311 # instead. The standard set does *not* include all the icons used in the
312 # Python documentation.
314 $(ALLCSSFILES): html/style.css
315 cp $< $@
317 $(INDEXFILES): $(COMMONPERL) html/stdabout.dat tools/node2label.pl
319 html/acks.html: ACKS $(TOOLSDIR)/support.py $(TOOLSDIR)/mkackshtml
320 $(PYTHON) $(TOOLSDIR)/mkackshtml --address $(PYTHONDOCS) \
321 --favicon icons/pyfav.gif \
322 --output html/acks.html <ACKS
325 # html/index.html is dependent on $(INDEXFILES) since we want the date
326 # on the front index to be updated whenever any of the child documents
327 # are updated and boilerplate.tex uses \today as the date. The index
328 # files are not used to actually generate content.
330 BOILERPLATE=texinputs/boilerplate.tex
331 html/index.html: $(INDEXFILES)
332 html/index.html: html/index.html.in $(BOILERPLATE) tools/rewrite.py
333 $(PYTHON) tools/rewrite.py $(BOILERPLATE) \
334 RELEASE=$(RELEASE) WHATSNEW=$(WHATSNEW) \
335 <$< >$@
337 html/modindex.html: $(TOOLSDIR)/support.py $(TOOLSDIR)/mkmodindex
338 html/modindex.html: html/lib/lib.html html/mac/mac.html
339 cd html && \
340 $(PYTHON) ../$(TOOLSDIR)/mkmodindex --columns 4 \
341 --output modindex.html --address $(PYTHONDOCS) \
342 --favicon icons/pyfav.gif \
343 lib/modindex.html mac/modindex.html
345 html: $(ALLHTMLFILES) $(HTMLCSSFILES)
347 api: html/api/api.html html/api/api.css
348 html/api/api.html: $(APIFILES) api/refcounts.dat
349 $(MKHTML) --dir html/api api/api.tex
351 doc: html/doc/doc.html html/doc/doc.css
352 html/doc/doc.html: $(DOCFILES)
353 $(MKHTML) --dir html/doc doc/doc.tex
355 ext: html/ext/ext.html html/ext/ext.css
356 html/ext/ext.html: $(EXTFILES)
357 $(MKHTML) --dir html/ext ext/ext.tex
359 lib: html/lib/lib.html html/lib/lib.css
360 html/lib/lib.html: $(LIBFILES)
361 $(MKHTML) --dir html/lib lib/lib.tex
363 mac: html/mac/mac.html html/mac/mac.css
364 html/mac/mac.html: $(MACFILES)
365 $(MKHTML) --dir html/mac mac/mac.tex
367 ref: html/ref/ref.html html/ref/ref.css
368 html/ref/ref.html: $(REFFILES)
369 $(MKHTML) --dir html/ref ref/ref.tex
371 tut: html/tut/tut.html html/tut/tut.css
372 html/tut/tut.html: $(TUTFILES)
373 $(MKHTML) --dir html/tut --numeric --split 3 tut/tut.tex
375 inst: html/inst/inst.html html/inst/inst.css
376 html/inst/inst.html: $(INSTFILES) perl/distutils.perl
377 $(MKHTML) --dir html/inst --split 4 inst/inst.tex
379 dist: html/dist/dist.html html/dist/dist.css
380 html/dist/dist.html: $(DISTFILES) perl/distutils.perl
381 $(MKHTML) --dir html/dist --split 4 dist/dist.tex
383 whatsnew: html/whatsnew/$(WHATSNEW).html
384 html/whatsnew/$(WHATSNEW).html: whatsnew/$(WHATSNEW).tex
385 $(MKHTML) --dir html/whatsnew --split 4 whatsnew/$(WHATSNEW).tex
388 # The iSilo format is used by the iSilo document reader for PalmOS devices.
390 ISILOINDEXFILES=isilo/api/api.html \
391 isilo/doc/doc.html \
392 isilo/ext/ext.html \
393 isilo/lib/lib.html \
394 isilo/mac/mac.html \
395 isilo/ref/ref.html \
396 isilo/tut/tut.html \
397 isilo/inst/inst.html \
398 isilo/dist/dist.html \
399 isilo/whatsnew/$(WHATSNEW).html
401 $(ISILOINDEXFILES): $(COMMONPERL) html/stdabout.dat perl/isilo.perl
403 isilo: isilo/python-api.pdb \
404 isilo/python-doc.pdb \
405 isilo/python-ext.pdb \
406 isilo/python-lib.pdb \
407 isilo/python-mac.pdb \
408 isilo/python-ref.pdb \
409 isilo/python-tut.pdb \
410 isilo/python-dist.pdb \
411 isilo/python-inst.pdb \
412 isilo/python-whatsnew.pdb
414 isilo/python-api.pdb: isilo/api/api.html isilo/api/api.css
415 $(MKISILO) "-iPython/C API Reference Manual" \
416 isilo/api/api.html $@
418 isilo/python-doc.pdb: isilo/doc/doc.html isilo/doc/doc.css
419 $(MKISILO) "-iDocumenting Python" \
420 isilo/doc/doc.html $@
422 isilo/python-ext.pdb: isilo/ext/ext.html isilo/ext/ext.css
423 $(MKISILO) "-iExtending & Embedding Python" \
424 isilo/ext/ext.html $@
426 isilo/python-lib.pdb: isilo/lib/lib.html isilo/lib/lib.css
427 $(MKISILO) "-iPython Library Reference" \
428 isilo/lib/lib.html $@
430 isilo/python-mac.pdb: isilo/mac/mac.html isilo/mac/mac.css
431 $(MKISILO) "-iPython/C API Reference Manual" \
432 isilo/mac/mac.html $@
434 isilo/python-ref.pdb: isilo/ref/ref.html isilo/ref/ref.css
435 $(MKISILO) "-iPython Reference Manual" \
436 isilo/ref/ref.html $@
438 isilo/python-tut.pdb: isilo/tut/tut.html isilo/tut/tut.css
439 $(MKISILO) "-iPython Tutorial" \
440 isilo/tut/tut.html $@
442 isilo/python-dist.pdb: isilo/dist/dist.html isilo/dist/dist.css
443 $(MKISILO) "-iDistributing Python Modules" \
444 isilo/dist/dist.html $@
446 isilo/python-inst.pdb: isilo/inst/inst.html isilo/inst/inst.css
447 $(MKISILO) "-iInstalling Python Modules" \
448 isilo/inst/inst.html $@
450 isilo/python-whatsnew.pdb: isilo/whatsnew/$(WHATSNEW).html isilo/whatsnew/$(WHATSNEW).css
451 $(MKISILO) "-iWhat's New in Python X.Y" \
452 isilo/whatsnew/$(WHATSNEW).html $@
454 isilo/api/api.html: $(APIFILES) api/refcounts.dat
455 $(MKISILOHTML) --dir isilo/api api/api.tex
457 isilo/doc/doc.html: $(DOCFILES)
458 $(MKISILOHTML) --dir isilo/doc doc/doc.tex
460 isilo/ext/ext.html: $(EXTFILES)
461 $(MKISILOHTML) --dir isilo/ext ext/ext.tex
463 isilo/lib/lib.html: $(LIBFILES)
464 $(MKISILOHTML) --dir isilo/lib lib/lib.tex
466 isilo/mac/mac.html: $(MACFILES)
467 $(MKISILOHTML) --dir isilo/mac mac/mac.tex
469 isilo/ref/ref.html: $(REFFILES)
470 $(MKISILOHTML) --dir isilo/ref ref/ref.tex
472 isilo/tut/tut.html: $(TUTFILES)
473 $(MKISILOHTML) --dir isilo/tut tut/tut.tex
475 isilo/inst/inst.html: $(INSTFILES) perl/distutils.perl
476 $(MKISILOHTML) --dir isilo/inst inst/inst.tex
478 isilo/dist/dist.html: $(DISTFILES) perl/distutils.perl
479 $(MKISILOHTML) --dir isilo/dist dist/dist.tex
481 isilo/whatsnew/$(WHATSNEW).html: whatsnew/$(WHATSNEW).tex
482 $(MKISILOHTML) --dir isilo/whatsnew whatsnew/$(WHATSNEW).tex
484 # These are useful if you need to transport the iSilo-ready HTML to
485 # another machine to perform the conversion:
487 isilozip: isilo-html-$(RELEASE).zip
489 isilo-html-$(RELEASE).zip: $(ISILOINDEXFILES)
490 rm -f $@
491 cd isilo && \
492 zip -q -9 ../$@ */*.css */*.html */*.txt
495 # webchecker needs an extra flag to process the huge index from the libref
496 WEBCHECKER=$(PYTHON) ../Tools/webchecker/webchecker.py
497 HTMLBASE= file:`pwd`/html
499 webcheck: $(ALLHTMLFILES)
500 $(WEBCHECKER) $(HTMLBASE)/api/
501 $(WEBCHECKER) $(HTMLBASE)/doc/
502 $(WEBCHECKER) $(HTMLBASE)/ext/
503 $(WEBCHECKER) -m290000 $(HTMLBASE)/lib/
504 $(WEBCHECKER) $(HTMLBASE)/mac/
505 $(WEBCHECKER) $(HTMLBASE)/ref/
506 $(WEBCHECKER) $(HTMLBASE)/tut/
507 $(WEBCHECKER) $(HTMLBASE)/dist/
508 $(WEBCHECKER) $(HTMLBASE)/inst/
509 $(WEBCHECKER) $(HTMLBASE)/whatsnew/
511 fastwebcheck: $(ALLHTMLFILES)
512 $(WEBCHECKER) -x $(HTMLBASE)/api/
513 $(WEBCHECKER) -x $(HTMLBASE)/doc/
514 $(WEBCHECKER) -x $(HTMLBASE)/ext/
515 $(WEBCHECKER) -x -m290000 $(HTMLBASE)/lib/
516 $(WEBCHECKER) -x $(HTMLBASE)/mac/
517 $(WEBCHECKER) -x $(HTMLBASE)/ref/
518 $(WEBCHECKER) -x $(HTMLBASE)/tut/
519 $(WEBCHECKER) -x $(HTMLBASE)/dist/
520 $(WEBCHECKER) -x $(HTMLBASE)/inst/
521 $(WEBCHECKER) -x $(HTMLBASE)/whatsnew/
524 # Release packaging targets:
526 paper-$(PAPER)/README: $(PSFILES) $(TOOLSDIR)/getpagecounts
527 cd paper-$(PAPER) && ../$(TOOLSDIR)/getpagecounts -r $(RELEASE) >../$@
529 info-$(RELEASE).tgz: info
530 cd $(INFODIR) && tar cf - README python.dir python-*.info* \
531 | gzip -9 >$@
533 info-$(RELEASE).tar.bz2: info
534 cd $(INFODIR) && tar cf - README python.dir python-*.info* \
535 | bzip2 -9 >$@
537 latex-$(RELEASE).tgz:
538 $(PYTHON) $(TOOLSDIR)/mksourcepkg --gzip $(RELEASE)
540 latex-$(RELEASE).tar.bz2:
541 $(PYTHON) $(TOOLSDIR)/mksourcepkg --bzip2 $(RELEASE)
543 latex-$(RELEASE).zip:
544 rm -f $@
545 $(PYTHON) $(TOOLSDIR)/mksourcepkg --zip $(RELEASE)
547 pdf-$(PAPER)-$(RELEASE).tar: $(PDFFILES)
548 rm -f $@
549 mkdir Python-Docs-$(RELEASE)
550 cp paper-$(PAPER)/*.pdf Python-Docs-$(RELEASE)
551 tar cf $@ Python-Docs-$(RELEASE)
552 rm -r Python-Docs-$(RELEASE)
554 pdf-$(PAPER)-$(RELEASE).tgz: pdf-$(PAPER)-$(RELEASE).tar
555 gzip -9 <$? >$@
557 pdf-$(PAPER)-$(RELEASE).tar.bz2: pdf-$(PAPER)-$(RELEASE).tar
558 bzip2 -9 <$? >$@
560 pdf-$(PAPER)-$(RELEASE).zip: pdf
561 rm -f $@
562 mkdir Python-Docs-$(RELEASE)
563 cp paper-$(PAPER)/*.pdf Python-Docs-$(RELEASE)
564 zip -q -r -9 $@ Python-Docs-$(RELEASE)
565 rm -r Python-Docs-$(RELEASE)
567 postscript-$(PAPER)-$(RELEASE).tar: $(PSFILES) paper-$(PAPER)/README
568 rm -f $@
569 mkdir Python-Docs-$(RELEASE)
570 cp paper-$(PAPER)/*.ps Python-Docs-$(RELEASE)
571 cp paper-$(PAPER)/README Python-Docs-$(RELEASE)
572 tar cf $@ Python-Docs-$(RELEASE)
573 rm -r Python-Docs-$(RELEASE)
575 postscript-$(PAPER)-$(RELEASE).tar.bz2: postscript-$(PAPER)-$(RELEASE).tar
576 bzip2 -9 <$< >$@
578 postscript-$(PAPER)-$(RELEASE).tgz: postscript-$(PAPER)-$(RELEASE).tar
579 gzip -9 <$< >$@
581 postscript-$(PAPER)-$(RELEASE).zip: $(PSFILES) paper-$(PAPER)/README
582 rm -f $@
583 mkdir Python-Docs-$(RELEASE)
584 cp paper-$(PAPER)/*.ps Python-Docs-$(RELEASE)
585 cp paper-$(PAPER)/README Python-Docs-$(RELEASE)
586 zip -q -r -9 $@ Python-Docs-$(RELEASE)
587 rm -r Python-Docs-$(RELEASE)
589 HTMLPKGFILES=*.html */*.css */*.html */*.gif */*.txt
591 html-$(RELEASE).tar: $(ALLHTMLFILES) $(HTMLCSSFILES)
592 mkdir Python-Docs-$(RELEASE)
593 cd html && tar cf ../temp.tar $(HTMLPKGFILES)
594 cd Python-Docs-$(RELEASE) && tar xf ../temp.tar
595 rm temp.tar
596 tar cf html-$(RELEASE).tar Python-Docs-$(RELEASE)
597 rm -r Python-Docs-$(RELEASE)
599 html-$(RELEASE).tgz: html-$(RELEASE).tar
600 gzip -9 <$? >$@
602 html-$(RELEASE).tar.bz2: html-$(RELEASE).tar
603 bzip2 -9 <$? >$@
605 html-$(RELEASE).zip: $(ALLHTMLFILES) $(HTMLCSSFILES)
606 rm -f $@
607 mkdir Python-Docs-$(RELEASE)
608 cd html && tar cf ../temp.tar $(HTMLPKGFILES)
609 cd Python-Docs-$(RELEASE) && tar xf ../temp.tar
610 rm temp.tar
611 zip -q -r -9 $@ Python-Docs-$(RELEASE)
612 rm -r Python-Docs-$(RELEASE)
614 isilo-$(RELEASE).zip: isilo
615 rm -f $@
616 mkdir Python-Docs-$(RELEASE)
617 cp isilo/python-*.pdb Python-Docs-$(RELEASE)
618 zip -q -r -9 $@ Python-Docs-$(RELEASE)
619 rm -r Python-Docs-$(RELEASE)
622 # convenience targets:
624 tarhtml: html-$(RELEASE).tgz
625 tarinfo: info-$(RELEASE).tgz
626 tarps: postscript-$(PAPER)-$(RELEASE).tgz
627 tarpdf: pdf-$(PAPER)-$(RELEASE).tgz
628 tarlatex: latex-$(RELEASE).tgz
630 tarballs: tarpdf tarps tarhtml
632 ziphtml: html-$(RELEASE).zip
633 zipps: postscript-$(PAPER)-$(RELEASE).zip
634 zippdf: pdf-$(PAPER)-$(RELEASE).zip
635 ziplatex: latex-$(RELEASE).zip
636 zipisilo: isilo-$(RELEASE).zip
638 zips: zippdf zipps ziphtml
640 bziphtml: html-$(RELEASE).tar.bz2
641 bzipinfo: info-$(RELEASE).tar.bz2
642 bzipps: postscript-$(PAPER)-$(RELEASE).tar.bz2
643 bzippdf: pdf-$(PAPER)-$(RELEASE).tar.bz2
644 bziplatex: latex-$(RELEASE).tar.bz2
646 bzips: bzippdf bzipps bziphtml
648 disthtml: tarhtml bziphtml ziphtml
649 distinfo: tarinfo bzipinfo
650 distps: tarps bzipps zipps
651 distpdf: tarpdf bzippdf zippdf
652 distlatex: tarlatex bziplatex ziplatex
654 paperdist: distpdf distps
655 edist: disthtml zipisilo
657 distfiles: paperdist edist
658 $(TOOLSDIR)/mksourcepkg --all $(RELEASE)
659 $(TOOLSDIR)/mkpkglist >pkglist.html
662 # Housekeeping targets
664 # Remove temporary files; all except the following:
665 # - sources: .tex, .bib, .sty, *.cls
666 # - useful results: .dvi, .pdf, .ps, .texi, .info
667 clean:
668 rm -f html-$(RELEASE).tar
669 cd $(INFODIR) && $(MAKE) clean
671 # Remove temporaries as well as final products
672 clobber:
673 rm -f html-$(RELEASE).tar
674 rm -f html-$(RELEASE).tgz info-$(RELEASE).tgz
675 rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz
676 rm -f latex-$(RELEASE).tgz html-$(RELEASE).zip
677 rm -f pdf-$(RELEASE).zip postscript-$(RELEASE).zip
678 rm -f $(DVIFILES) $(PSFILES) $(PDFFILES)
679 cd $(INFODIR) && $(MAKE) clobber
680 rm -f paper-$(PAPER)/*.tex paper-$(PAPER)/*.ind paper-$(PAPER)/*.idx
681 rm -f paper-$(PAPER)/*.l2h paper-$(PAPER)/*.how paper-$(PAPER)/README
682 rm -rf html/index.html html/modindex.html html/acks.html
683 rm -rf html/api/ html/doc/ html/ext/ html/lib/ html/mac/
684 rm -rf html/ref/ html/tut/ html/inst/ html/dist/
685 rm -rf html/whatsnew/
686 rm -rf isilo/api/ isilo/doc/ isilo/ext/ isilo/lib/ isilo/mac/
687 rm -rf isilo/ref/ isilo/tut/ isilo/inst/ isilo/dist/
688 rm -rf isilo/whatsnew/
689 rm -f isilo/python-*.pdb isilo-$(RELEASE).zip
691 realclean distclean: clobber