blob: 378e4b4a421cd2b5598329edbe7a2a6ff991b1f3 [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#
Guido van Rossume83e3801995-03-17 16:01:35 +00006# This is a bit of a mess. The main documents are:
Fred Draked69e2c41998-05-11 18:25:46 +00007# api -- Python/C API Reference Manual
8# ext -- Extending and Embedding the Python Interpreter
9# lib -- Library Reference Manual
Fred Drakef2951131998-05-07 19:30:16 +000010# ref -- Python Reference Manual
Fred Draked69e2c41998-05-11 18:25:46 +000011# tut -- Python Tutorial
Guido van Rossume83e3801995-03-17 16:01:35 +000012#
Fred Drakef2951131998-05-07 19:30:16 +000013# The latex sources for each of these documents are in subdirectories
14# with the three-letter designations above as the directory names.
Guido van Rossum1f175431996-10-22 20:00:02 +000015#
Fred Draked69e2c41998-05-11 18:25:46 +000016# The main target creates DVI and PostScript for the main each of the
17# documents. You can also do "make lib" (etc.) to process individual
Guido van Rossume83e3801995-03-17 16:01:35 +000018# documents.
19#
Fred Drakef2951131998-05-07 19:30:16 +000020# The document classes and styles are in the texinputs/ directory.
21# These define a number of macros that are similar in name and intent
22# as macros in Texinfo (e.g. \code{...} and \emph{...}), as well as a
23# number of environments for formatting function and data definitions,
24# also in the style of Texinfo.
Guido van Rossume83e3801995-03-17 16:01:35 +000025#
Fred Draked69e2c41998-05-11 18:25:46 +000026# Everything is processed by LaTeX. See the file `README' for more
27# information on the tools needed for processing.
Guido van Rossume83e3801995-03-17 16:01:35 +000028#
29# There's a problem with generating the index which has been solved by
30# a sed command applied to the index file. The shell script fix_hack
31# does this (the Makefile takes care of calling it).
32#
Guido van Rossume83e3801995-03-17 16:01:35 +000033# Additional targets attempt to convert selected LaTeX sources to
34# various other formats. These are generally site specific because
35# the tools used are all but universal. These targets are:
Fred Drakef2951131998-05-07 19:30:16 +000036# l2h -- convert tut, ref, lib, ext, api from LaTeX to HTML
Guido van Rossum73827c61995-03-20 13:00:32 +000037# See the README file for more info on these targets.
Fred Draked69e2c41998-05-11 18:25:46 +000038#
39# The formatted output is located in subdirectories. For PDF and
40# PostScript, look in the paper-$(PAPER)/ directory. For HTML, look in
41# the html/ directory. If you fix the GNU info process, look in the
42# info/ directory.
Guido van Rossume83e3801995-03-17 16:01:35 +000043
Guido van Rossum73827c61995-03-20 13:00:32 +000044# Customizations -- you *may* have to edit these
Guido van Rossume83e3801995-03-17 16:01:35 +000045
Fred Drakef2951131998-05-07 19:30:16 +000046# you could set this to a4
47PAPER=letter
48
Guido van Rossum73827c61995-03-20 13:00:32 +000049# Where are the various programs?
Fred Drake9cdf0871998-05-07 15:03:25 +000050LATEX= latex
51PDFLATEX= pdflatex
Fred Drake9fab3aa1998-04-28 19:20:43 +000052DVIPS= dvips -N0
Fred Drakedf68e3d1998-05-08 03:46:38 +000053KPSEWHICH= TEXINPUTS=$(TEXINPUTS) kpsewhich tex
Fred Drake3af9f251998-04-24 21:07:22 +000054MAKEINDEX= makeindex -s $(srcdir)/texinputs/myindex.ist
Fred Drakef2951131998-05-07 19:30:16 +000055ACROREAD= acroread
Fred Drake0d27d081998-04-23 20:07:55 +000056L2HARGS=
Fred Drakeb9838d91998-05-08 15:43:08 +000057# HTMLDIR should not be '.'!
58HTMLDIR= html
Fred Drakef2951131998-05-07 19:30:16 +000059PYTHON= python
Fred Drake3af9f251998-04-24 21:07:22 +000060WEBCHECKER= $(PYTHON) $(srcdir)/../Tools/webchecker/webchecker.py
Guido van Rossum73827c61995-03-20 13:00:32 +000061
62# Install destination -- not used now but might be useful some time...
63DESTDIR= /usr/local
64LIBDESTDIR= $DESTDIR/lib
Fred Drakee4837a11998-03-06 21:29:34 +000065LIBDEST= $LIBDESTDIR/python$(VERSION)
Guido van Rossum73827c61995-03-20 13:00:32 +000066DOCDESTDIR= $LIBDEST/doc
67
Fred Drakeb9838d91998-05-08 15:43:08 +000068INFODIR= info
Fred Drake3af9f251998-04-24 21:07:22 +000069
70srcdir=.
71VPATH=.
Fred Drake05dd3c01997-12-29 17:17:54 +000072
Guido van Rossum73827c61995-03-20 13:00:32 +000073# Ideally, you shouldn't need to edit beyond this point
Guido van Rossum5b343731992-07-07 09:06:34 +000074
Fred Drakef5013f11998-04-13 21:02:49 +000075RELEASE=1.5.1
Fred Drake33d05b91998-01-13 16:33:09 +000076VERSION=1.5
77
Fred Drake3f8a59f1998-07-24 13:58:27 +000078MANDVIFILES= api.dvi ext.dvi lib.dvi ref.dvi tut.dvi
79HOWTODVIFILES= mac.dvi
80
81MANPDFFILES= api.pdf ext.pdf lib.pdf ref.pdf tut.pdf
82HOWTOPDFFILES= mac.pdf
83
84MANPSFILES= api.ps ext.ps lib.ps ref.ps tut.ps
85HOWTOPSFILES= mac.ps
86
87DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES)
88PDFFILES= $(MANPDFFILES) $(HOWTOPDFFILES)
89PSFILES= $(MANPSFILES) $(HOWTOPSFILES)
Fred Drake04cf4dc1998-02-12 22:33:50 +000090
Fred Drakebbe33c51998-05-07 01:39:06 +000091# Be careful when messing with this one!
Fred Drakeb9838d91998-05-08 15:43:08 +000092TEXINPUTS= .:../texinputs:
Fred Drakebbe33c51998-05-07 01:39:06 +000093
94MKDVI= TEXINPUTS=$(TEXINPUTS) $(srcdir)/tools/mkdvi.sh
Fred Drakecdbd3911998-05-15 17:02:10 +000095MKHOWTO= $(srcdir)/tools/mkhowto.sh --keep
96MKHTML= PAPER=$(PAPER) $(srcdir)/tools/mkhtml.sh
Fred Drakef2951131998-05-07 19:30:16 +000097MKPDF= TEXINPUTS=$(TEXINPUTS) $(srcdir)/tools/mkdvi.sh --pdf
Fred Drakebbe33c51998-05-07 01:39:06 +000098
Guido van Rossume83e3801995-03-17 16:01:35 +000099# Main target
Fred Drake566d2091998-05-08 02:00:48 +0000100all: all-ps
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000101
Fred Drake465a42a1998-07-23 18:10:51 +0000102all-dvi dvi:
Fred Drakeb9838d91998-05-08 15:43:08 +0000103 (cd paper-$(PAPER); \
104 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
105 -f ../Makefile do-dvi)
Fred Drakee4837a11998-03-06 21:29:34 +0000106
Fred Drake465a42a1998-07-23 18:10:51 +0000107all-pdf pdf:
Fred Drakeb9838d91998-05-08 15:43:08 +0000108 (cd paper-$(PAPER); \
109 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
110 -f ../Makefile do-pdf)
Guido van Rossum20aca5a1991-01-25 13:29:04 +0000111
Fred Drake465a42a1998-07-23 18:10:51 +0000112all-ps ps:
Fred Drakeb9838d91998-05-08 15:43:08 +0000113 (cd paper-$(PAPER); \
114 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
115 -f ../Makefile do-ps)
Fred Drakef2951131998-05-07 19:30:16 +0000116
Fred Draked69e2c41998-05-11 18:25:46 +0000117world: all-ps all-pdf l2h tarballs
118
119
120# Targets for each document:
Fred Drake3f8a59f1998-07-24 13:58:27 +0000121.PHONY: api ext lib mac ref tut
Fred Draked69e2c41998-05-11 18:25:46 +0000122
123api:
124 (cd paper-$(PAPER); \
125 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
126 -f ../Makefile api.ps)
127
128ext:
129 (cd paper-$(PAPER); \
130 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
131 -f ../Makefile ext.ps)
132
133lib:
134 (cd paper-$(PAPER); \
135 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
136 -f ../Makefile lib.ps)
137
Fred Drake3f8a59f1998-07-24 13:58:27 +0000138mac:
139 (cd paper-$(PAPER); \
140 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
141 -f ../Makefile mac.ps)
142
Fred Draked69e2c41998-05-11 18:25:46 +0000143ref:
144 (cd paper-$(PAPER); \
145 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
146 -f ../Makefile ref.ps)
147
148tut:
149 (cd paper-$(PAPER); \
150 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
151 -f ../Makefile tut.ps)
152
153
154# Internal targets:
Fred Drakef2951131998-05-07 19:30:16 +0000155
156do-dvi: $(DVIFILES)
157do-pdf: $(PDFFILES)
Fred Drakecdbd3911998-05-15 17:02:10 +0000158do-ps: $(PSFILES)
Fred Drakef2951131998-05-07 19:30:16 +0000159
160# This target gets both the PDF and PS files updated.
Fred Drakeddae4141998-02-17 15:45:25 +0000161#
162all-formats: $(PSFILES) $(PDFFILES)
163
Fred Drakedd946761998-02-18 16:02:14 +0000164
Fred Drake126d8401998-02-04 19:54:40 +0000165# Rules to build PostScript and PDF formats
Fred Drakef2951131998-05-07 19:30:16 +0000166.SUFFIXES: .dvi .ps .pdf
Fred Drake126d8401998-02-04 19:54:40 +0000167
168.dvi.ps:
Fred Drake9fab3aa1998-04-28 19:20:43 +0000169 $(DVIPS) -o $@ $<
Fred Drake126d8401998-02-04 19:54:40 +0000170
Fred Drakef2951131998-05-07 19:30:16 +0000171#.pdf.ps:
172# $(ACROREAD) -toPostScript $<
Fred Drake126d8401998-02-04 19:54:40 +0000173
Fred Drake3b26eed1998-02-16 17:06:10 +0000174
Guido van Rossume83e3801995-03-17 16:01:35 +0000175# Dependencies
Fred Drakef2951131998-05-07 19:30:16 +0000176# We really need some support of dependency generator for this...
177
Fred Drake3f8a59f1998-07-24 13:58:27 +0000178COMMONSTYLES=texinputs/python.sty texinputs/pypaper.sty texinputs/myindex.ist
179COMMONTEX=texinputs/copyright.tex texinputs/boilerplate.tex
Fred Drakef2951131998-05-07 19:30:16 +0000180
Fred Drake3f8a59f1998-07-24 13:58:27 +0000181MANSTYLES=texinputs/fncychap.sty texinputs/manual.cls $(COMMONSTYLES)
182HOWTOSTYLES=texinputs/howto.cls $(COMMONSTYLES)
Fred Drake5d8f0ed1998-02-11 14:43:38 +0000183
Fred Drake3f8a59f1998-07-24 13:58:27 +0000184
185$(DVIFILES): tools/fix_hack tools/mkdvi.sh $(COMMONTEX)
186$(PDFFILES): tools/fix_hack tools/mkdvi.sh $(COMMONTEX)
187
188$(MANDVIFILES): $(MANSTYLES)
189$(MANPDFFILES): $(MANSTYLES)
190
191$(HOWTODVIFILES): tools/mkhowto.sh $(HOWTOSTYLES)
192$(HOWTOPDFFILES): tools/mkhowto.sh $(HOWTOSTYLES)
193
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000194
Fred Drakef2951131998-05-07 19:30:16 +0000195REFFILES = ref/ref1.tex ref/ref2.tex ref/ref3.tex ref/ref4.tex \
196 ref/ref5.tex ref/ref6.tex ref/ref7.tex ref/ref8.tex
Fred Drakea6bb3961998-05-06 19:51:39 +0000197
Guido van Rossum16d6e711994-08-08 12:30:22 +0000198# LaTeX source files for the Python Library Reference
Fred Drake9cdf0871998-05-07 15:03:25 +0000199LIBFILES = lib/lib.tex \
Fred Drake3f8a59f1998-07-24 13:58:27 +0000200 lib/libintro.tex lib/libobjs.tex lib/libstdtypes.tex lib/libexcs.tex \
201 lib/libfuncs.tex lib/libpython.tex lib/libsys.tex lib/libtypes.tex \
Fred Drake9cdf0871998-05-07 15:03:25 +0000202 lib/libtraceback.tex lib/libpickle.tex lib/libshelve.tex \
203 lib/libcopy.tex lib/libmarshal.tex lib/libimp.tex lib/libparser.tex \
204 lib/libbltin.tex lib/libmain.tex lib/libstrings.tex lib/libstring.tex \
205 lib/libregex.tex lib/libregsub.tex lib/libstruct.tex lib/libmisc.tex \
206 lib/libmath.tex lib/librand.tex lib/libwhrandom.tex lib/libarray.tex \
207 lib/liballos.tex lib/libos.tex lib/libtime.tex lib/libgetopt.tex \
208 lib/libtempfile.tex lib/liberrno.tex lib/libsomeos.tex lib/libsignal.tex \
209 lib/libsocket.tex lib/libselect.tex lib/libthread.tex lib/libunix.tex \
Fred Drake3f8a59f1998-07-24 13:58:27 +0000210 lib/libposix.tex lib/libposixpath.tex lib/libpwd.tex lib/libgrp.tex \
Fred Drake9cdf0871998-05-07 15:03:25 +0000211 lib/libcrypt.tex lib/libdbm.tex lib/libgdbm.tex lib/libtermios.tex \
212 lib/libfcntl.tex lib/libposixfile.tex lib/libsyslog.tex lib/libpdb.tex \
213 lib/libprofile.tex lib/libwww.tex lib/libcgi.tex lib/liburllib.tex \
214 lib/libhttplib.tex lib/libftplib.tex lib/libgopherlib.tex \
215 lib/libnntplib.tex lib/liburlparse.tex lib/libhtmllib.tex \
216 lib/libsgmllib.tex lib/librfc822.tex lib/libmimetools.tex \
217 lib/libbinascii.tex lib/libmm.tex lib/libaudioop.tex lib/libimageop.tex \
218 lib/libaifc.tex lib/libjpeg.tex lib/librgbimg.tex lib/libcrypto.tex \
219 lib/libmd5.tex lib/libmpz.tex lib/librotor.tex lib/libstdwin.tex \
220 lib/libsgi.tex lib/libal.tex lib/libcd.tex lib/libfl.tex lib/libfm.tex \
221 lib/libgl.tex lib/libimgfile.tex lib/libsun.tex lib/libxdrlib.tex \
222 lib/libimghdr.tex lib/librestricted.tex lib/librexec.tex \
223 lib/libbastion.tex lib/libformatter.tex lib/liboperator.tex \
Fred Drake3f8a59f1998-07-24 13:58:27 +0000224 lib/libsoundex.tex lib/libresource.tex lib/libstat.tex \
225 lib/libstringio.tex lib/libtoken.tex \
Fred Drake9cdf0871998-05-07 15:03:25 +0000226 lib/libundoc.tex lib/libmailcap.tex lib/libglob.tex lib/libuser.tex \
227 lib/libanydbm.tex lib/librandom.tex lib/libsite.tex lib/libwhichdb.tex \
228 lib/libbase64.tex lib/libfnmatch.tex lib/libquopri.tex lib/libzlib.tex \
229 lib/libsocksvr.tex lib/libmailbox.tex lib/libcommands.tex \
230 lib/libcmath.tex lib/libgzip.tex lib/libpprint.tex \
231 lib/libcode.tex lib/libmimify.tex lib/libre.tex lib/libuserdict.tex \
232 lib/libdis.tex lib/libxmllib.tex lib/libqueue.tex lib/liblocale.tex \
Fred Drake3f8a59f1998-07-24 13:58:27 +0000233 lib/libbasehttp.tex lib/libcopyreg.tex lib/libsymbol.tex \
Fred Drake9cdf0871998-05-07 15:03:25 +0000234 lib/libbinhex.tex lib/libuu.tex \
235 lib/libsunaudio.tex lib/libfileinput.tex lib/libimaplib.tex \
Fred Drakeedde1501998-05-19 15:04:21 +0000236 lib/libpoplib.tex lib/libcalendar.tex lib/libpopen2.tex \
Guido van Rossumf78a52c1998-06-28 17:57:05 +0000237 lib/libbisect.tex lib/libmimetypes.tex lib/libsmtplib.tex lib/libcmd.tex \
Fred Drakea9f445c1998-07-20 14:01:20 +0000238 lib/libmultifile.tex lib/libthreading.tex
Guido van Rossum16d6e711994-08-08 12:30:22 +0000239
Fred Drake9cdf0871998-05-07 15:03:25 +0000240# LaTeX source files for Macintosh Library Modules.
241MACLIBFILES = mac/mac.tex mac/libmac.tex mac/libctb.tex mac/libmacconsole.tex \
242 mac/libmacdnr.tex mac/libmacfs.tex mac/libmacos.tex mac/libmacostools.tex \
243 mac/libmactcp.tex mac/libmacspeech.tex mac/libmacui.tex mac/libmacic.tex \
244 mac/libframework.tex mac/libminiae.tex
Fred Drakebdbdb801998-04-17 14:01:44 +0000245
Fred Drakebbe33c51998-05-07 01:39:06 +0000246# Python Library Reference
Fred Drake520f8bd1998-03-09 16:43:54 +0000247lib.dvi: tools/indfix.py $(LIBFILES)
Fred Drake3af9f251998-04-24 21:07:22 +0000248 $(srcdir)/tools/newind.py >$*.ind
249 $(srcdir)/tools/newind.py modindex >mod$*.ind
Fred Drake9cdf0871998-05-07 15:03:25 +0000250 TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(LATEX) $*
Fred Drake8bc96571998-03-09 16:37:52 +0000251 $(MAKEINDEX) mod$*.idx
Fred Drake3af9f251998-04-24 21:07:22 +0000252 $(srcdir)/tools/fix_hack $*.idx
Fred Drake5ad78f31998-02-22 19:47:13 +0000253 $(MAKEINDEX) $*.idx
Fred Drake3af9f251998-04-24 21:07:22 +0000254 $(srcdir)/tools/indfix.py $*.ind
Fred Drake9cdf0871998-05-07 15:03:25 +0000255 TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(LATEX) $*
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000256
Fred Drakef2951131998-05-07 19:30:16 +0000257lib.pdf: tools/indfix.py $(LIBFILES)
258 $(srcdir)/tools/newind.py >$*.ind
259 $(srcdir)/tools/newind.py modindex >mod$*.ind
260 TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(PDFLATEX) $*
261 $(MAKEINDEX) mod$*.idx
262 $(srcdir)/tools/fix_hack $*.idx
263 $(MAKEINDEX) $*.idx
264 $(srcdir)/tools/indfix.py $*.ind
265 TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(PDFLATEX) $*
266
Fred Drakebbe33c51998-05-07 01:39:06 +0000267# Python/C API Reference Manual
268api.dvi: api/api.tex
269 $(MKDVI) api
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000270
Fred Drakef2951131998-05-07 19:30:16 +0000271api.pdf: api/api.tex
272 $(MKPDF) api
273
Fred Drakebbe33c51998-05-07 01:39:06 +0000274# Extending and Embedding the Python Interpreter
275ext.dvi: ext/ext.tex
276 $(MKDVI) ext
277
Fred Drakef2951131998-05-07 19:30:16 +0000278ext.pdf: ext/ext.tex
279 $(MKPDF) ext
280
Fred Drakecdbd3911998-05-15 17:02:10 +0000281# Macintosh Library Modules
Fred Drake3f8a59f1998-07-24 13:58:27 +0000282mac.dvi: $(MACLIBFILES)
Fred Drakecdbd3911998-05-15 17:02:10 +0000283 $(MKHOWTO) --dvi $(srcdir)/$*/$*.tex
284
Fred Drake3f8a59f1998-07-24 13:58:27 +0000285mac.pdf: $(MACLIBFILES)
Fred Drakecdbd3911998-05-15 17:02:10 +0000286 $(MKHOWTO) --pdf $(srcdir)/$*/$*.tex
287
Fred Drakebbe33c51998-05-07 01:39:06 +0000288# Python Reference Manual
Fred Drakef2951131998-05-07 19:30:16 +0000289ref.dvi: $(REFFILES)
Fred Drakebbe33c51998-05-07 01:39:06 +0000290 $(MKDVI) ref
291
Fred Drakef2951131998-05-07 19:30:16 +0000292ref.pdf: $(REFFILES)
293 $(MKPDF) ref
294
Fred Drakebbe33c51998-05-07 01:39:06 +0000295# Python Tutorial
296tut.dvi: tut/tut.tex
297 $(MKDVI) tut
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000298
Fred Drakef2951131998-05-07 19:30:16 +0000299tut.pdf: tut/tut.tex
300 $(MKPDF) tut
301
Guido van Rossume83e3801995-03-17 16:01:35 +0000302
303# The remaining part of the Makefile is concerned with various
Guido van Rossum73827c61995-03-20 13:00:32 +0000304# conversions, as described above. See also the README file.
Guido van Rossume83e3801995-03-17 16:01:35 +0000305
Fred Draked69e2c41998-05-11 18:25:46 +0000306.PHONY: html info
Fred Drake05dd3c01997-12-29 17:17:54 +0000307
Fred Drakeb9838d91998-05-08 15:43:08 +0000308info:
309 (cd $(INFODIR); $(MAKE))
Fred Drake5ad78f31998-02-22 19:47:13 +0000310
Guido van Rossum73827c61995-03-20 13:00:32 +0000311# Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to
312# HTML converter. For more info on this program, see
Guido van Rossume83e3801995-03-17 16:01:35 +0000313# <URL:http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html>.
Guido van Rossume83e3801995-03-17 16:01:35 +0000314
Guido van Rossum9cb64801997-12-29 20:01:55 +0000315# Note that LaTeX2HTML inserts references to an icons directory in
316# each page that it generates. I have placed a copy of this directory
317# in the distribution to simplify the process of creating a
318# self-contained HTML distribution; for this purpose I have also added
319# a (trivial) index.html. Change the definition of $ICONSERVER in
Fred Drake9fab3aa1998-04-28 19:20:43 +0000320# perl/l2hinit.perl to use a different location for the icons directory.
Guido van Rossume83e3801995-03-17 16:01:35 +0000321
Fred Drakef2951131998-05-07 19:30:16 +0000322COMMONPERL=perl/manual.perl perl/python.perl
Fred Drakebbe33c51998-05-07 01:39:06 +0000323
Fred Draked69e2c41998-05-11 18:25:46 +0000324html: l2h
325
Fred Drake9cdf0871998-05-07 15:03:25 +0000326l2h:
Fred Drakee593b621998-05-15 17:50:32 +0000327 (cd $(HTMLDIR); $(MAKE) TEXINPUTS=../paper-$(PAPER):../texinputs: \
328 -f ../html/Makefile)
Guido van Rossum6938f061994-08-01 12:22:53 +0000329
Fred Drake9cdf0871998-05-07 15:03:25 +0000330l2hapi: $(COMMONPERL)
Fred Drakef2951131998-05-07 19:30:16 +0000331 $(MKHTML) api $(L2HARGS)
Guido van Rossum6938f061994-08-01 12:22:53 +0000332
Fred Drake9cdf0871998-05-07 15:03:25 +0000333l2hext: $(COMMONPERL)
Fred Drakef2951131998-05-07 19:30:16 +0000334 $(MKHTML) ext $(L2HARGS)
Guido van Rossum970871f1993-02-21 20:10:26 +0000335
Fred Drakecdbd3911998-05-15 17:02:10 +0000336l2hlib: $(COMMONPERL) $(LIBFILES)
Fred Drake9fab3aa1998-04-28 19:20:43 +0000337 $(srcdir)/tools/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux
338 mv lib1.aux `$(KPSEWHICH) lib.aux`
Fred Drakef2951131998-05-07 19:30:16 +0000339 $(MKHTML) lib $(L2HARGS)
Fred Drakea6bb3961998-05-06 19:51:39 +0000340
Fred Drakecdbd3911998-05-15 17:02:10 +0000341l2hmac: $(COMMONPERL) $(MACLIBFILES)
342 $(srcdir)/tools/mkhowto.sh --html $(srcdir)/mac/mac.tex
343
Fred Drake9cdf0871998-05-07 15:03:25 +0000344l2href: $(COMMONPERL)
Fred Drakef2951131998-05-07 19:30:16 +0000345 $(MKHTML) ref $(L2HARGS)
Guido van Rossume83e3801995-03-17 16:01:35 +0000346
Fred Drake9cdf0871998-05-07 15:03:25 +0000347l2htut: $(COMMONPERL)
Fred Drakef2951131998-05-07 19:30:16 +0000348 $(MKHTML) tut $(L2HARGS)
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000349
Fred Drakee4837a11998-03-06 21:29:34 +0000350# webchecker needs an extra flag to process the huge index from the libref
351webcheck:
Fred Drake79c0f0e1998-05-19 18:04:13 +0000352 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/api/
353 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ext/
354 $(WEBCHECKER) -m290000 file:`pwd`/$(HTMLDIR)/lib/
355 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/mac/
356 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ref/
357 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/tut/
Fred Drakee4837a11998-03-06 21:29:34 +0000358
Fred Drakee34ab301998-05-11 21:10:15 +0000359lib-info-$(RELEASE).tgz: info
Fred Draked69e2c41998-05-11 18:25:46 +0000360 (cd $(INFODIR); tar cf - python-???.info*) | gzip -9 >$@
Fred Drakea7998351998-02-19 16:01:04 +0000361
Fred Drakee34ab301998-05-11 21:10:15 +0000362latex-$(RELEASE).tgz:
Fred Drake29cabd41998-05-11 18:53:07 +0000363 $(srcdir)/tools/mktarball.sh $(RELEASE)
Fred Drakee61d7af1998-03-05 16:37:34 +0000364
Fred Drakee34ab301998-05-11 21:10:15 +0000365pdf-$(PAPER)-$(RELEASE).tgz: all-pdf
Fred Draked69e2c41998-05-11 18:25:46 +0000366 (cd paper-$(PAPER); tar cf - $(PDFFILES)) | gzip -9 >$@
Fred Drake04cf4dc1998-02-12 22:33:50 +0000367
Fred Drakee34ab301998-05-11 21:10:15 +0000368postscript-$(PAPER)-$(RELEASE).tgz: all-ps
Fred Draked69e2c41998-05-11 18:25:46 +0000369 (cd paper-$(PAPER); tar cf - $(PSFILES)) | gzip -9 >$@
Fred Drake04cf4dc1998-02-12 22:33:50 +0000370
Fred Drakee34ab301998-05-11 21:10:15 +0000371html-$(RELEASE).tgz:
372 (cd $(HTMLDIR); tar cf - index.html ???/???.css ???/*.html */*.gif) \
Fred Drake29cabd41998-05-11 18:53:07 +0000373 | gzip -9 >$@
Fred Drake33d05b91998-01-13 16:33:09 +0000374
Fred Drakea7998351998-02-19 16:01:04 +0000375# convenience targets:
376
Fred Drakee34ab301998-05-11 21:10:15 +0000377tarhtml: html-$(RELEASE).tgz
Fred Drakebbe33c51998-05-07 01:39:06 +0000378
Fred Drakee34ab301998-05-11 21:10:15 +0000379tarinfo: lib-info-$(RELEASE).tgz
Fred Drakea7998351998-02-19 16:01:04 +0000380
Fred Drakee34ab301998-05-11 21:10:15 +0000381tarps: postscript-$(PAPER)-$(RELEASE).tgz
Fred Drake33d05b91998-01-13 16:33:09 +0000382
Fred Drakee34ab301998-05-11 21:10:15 +0000383tarpdf: pdf-$(PAPER)-$(RELEASE).tgz
Fred Drake04cf4dc1998-02-12 22:33:50 +0000384
Fred Drakee34ab301998-05-11 21:10:15 +0000385tarlatex: latex-$(RELEASE).tgz
Fred Drakee61d7af1998-03-05 16:37:34 +0000386
Fred Drakee34ab301998-05-11 21:10:15 +0000387tarballs: tarpdf tarps tarhtml tarinfo tarlatex
Guido van Rossum84cca441997-11-25 20:49:09 +0000388
Guido van Rossume83e3801995-03-17 16:01:35 +0000389
390# Housekeeping targets
391
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000392# Remove temporary files; all except the following:
Fred Drake6659c301998-03-03 22:02:19 +0000393# - sources: .tex, .bib, .sty, *.cls
Fred Drake04cf4dc1998-02-12 22:33:50 +0000394# - useful results: .dvi, .pdf, .ps, .texi, .info
Fred Drakee4837a11998-03-06 21:29:34 +0000395clean:
Fred Drake3f8a59f1998-07-24 13:58:27 +0000396 (cd paper-$(PAPER); rm -f *~ *.aux *.idx *.ilg *.ind *.log *.toc *.bkm *.syn)
Fred Drakee34ab301998-05-11 21:10:15 +0000397 (cd $(INFODIR); $(MAKE) clean)
Fred Drakeb9838d91998-05-08 15:43:08 +0000398 (cd $(HTMLDIR); rm -f @webchecker.pickle)
Fred Drakee34ab301998-05-11 21:10:15 +0000399 rm -f html-$(RELEASE).tgz info-$(RELEASE).tgz
400 rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz
401 rm -f latex-$(RELEASE).tgz
Guido van Rossum5b343731992-07-07 09:06:34 +0000402
Fred Drake03ff6f71997-08-22 18:18:54 +0000403l2hclean:
Fred Drakeb9838d91998-05-08 15:43:08 +0000404 (cd $(HTMLDIR); rm -rf api ext lib ref tut)
Fred Drake03ff6f71997-08-22 18:18:54 +0000405
Guido van Rossume83e3801995-03-17 16:01:35 +0000406# Remove temporaries as well as final products
Fred Drakee4837a11998-03-06 21:29:34 +0000407clobber: clean l2hclean
Fred Drakeb9838d91998-05-08 15:43:08 +0000408 (cd paper-$(PAPER); rm -f $(DVIFILES) $(PSFILES) $(PDFFILES))
Fred Drakee34ab301998-05-11 21:10:15 +0000409 (cd $(INFODIR); $(MAKE) clobber)
Fred Drake5ad78f31998-02-22 19:47:13 +0000410
411realclean: clobber
412distclean: clobber