blob: 90b3a698674d114c37374de1c161396b74ddc6ba [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 Drake34116ba1998-07-24 15:42:12 +000010# mac -- Macintosh Library Modules
Fred Drakef2951131998-05-07 19:30:16 +000011# ref -- Python Reference Manual
Fred Draked69e2c41998-05-11 18:25:46 +000012# tut -- Python Tutorial
Guido van Rossume83e3801995-03-17 16:01:35 +000013#
Fred Drakef2951131998-05-07 19:30:16 +000014# The latex sources for each of these documents are in subdirectories
15# with the three-letter designations above as the directory names.
Guido van Rossum1f175431996-10-22 20:00:02 +000016#
Fred Draked69e2c41998-05-11 18:25:46 +000017# The main target creates DVI and PostScript for the main each of the
Fred Drakeefc17bd1998-07-28 21:05:16 +000018# documents. You can also do "make lib" (etc.) to create the DVI and
19# PostScript versions of individual documents.
Guido van Rossume83e3801995-03-17 16:01:35 +000020#
Fred Drakef2951131998-05-07 19:30:16 +000021# The document classes and styles are in the texinputs/ directory.
22# These define a number of macros that are similar in name and intent
23# as macros in Texinfo (e.g. \code{...} and \emph{...}), as well as a
Fred Drakeefc17bd1998-07-28 21:05:16 +000024# number of environments for formatting function and data definitions.
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 Drake34116ba1998-07-24 15:42:12 +000036#
37# html -- convert all documents from LaTeX to HTML
Fred Drakeefc17bd1998-07-28 21:05:16 +000038# pdf -- convert all documents from LaTeX to the
39# Portable Document Format
Fred Drake34116ba1998-07-24 15:42:12 +000040#
Fred Drakeefc17bd1998-07-28 21:05:16 +000041# See the README file for more information on these targets.
Fred Draked69e2c41998-05-11 18:25:46 +000042#
43# The formatted output is located in subdirectories. For PDF and
44# PostScript, look in the paper-$(PAPER)/ directory. For HTML, look in
Fred Drake34116ba1998-07-24 15:42:12 +000045# the html/ directory. If you want to fix the GNU info process, look
46# in the info/ directory.
Guido van Rossume83e3801995-03-17 16:01:35 +000047
Guido van Rossum73827c61995-03-20 13:00:32 +000048# Customizations -- you *may* have to edit these
Guido van Rossume83e3801995-03-17 16:01:35 +000049
Fred Drakef2951131998-05-07 19:30:16 +000050# you could set this to a4
51PAPER=letter
52
Guido van Rossum73827c61995-03-20 13:00:32 +000053# Where are the various programs?
Fred Drake9cdf0871998-05-07 15:03:25 +000054LATEX= latex
55PDFLATEX= pdflatex
Fred Drakeb35631581998-07-29 05:07:41 +000056DVIPS= dvips -N0 -t $(PAPER)
Fred Drakedf68e3d1998-05-08 03:46:38 +000057KPSEWHICH= TEXINPUTS=$(TEXINPUTS) kpsewhich tex
Fred Drake3af9f251998-04-24 21:07:22 +000058MAKEINDEX= makeindex -s $(srcdir)/texinputs/myindex.ist
Fred Drakef2951131998-05-07 19:30:16 +000059ACROREAD= acroread
Fred Drake0d27d081998-04-23 20:07:55 +000060L2HARGS=
Fred Drakeb9838d91998-05-08 15:43:08 +000061# HTMLDIR should not be '.'!
62HTMLDIR= html
Fred Drakef2951131998-05-07 19:30:16 +000063PYTHON= python
Fred Drake3af9f251998-04-24 21:07:22 +000064WEBCHECKER= $(PYTHON) $(srcdir)/../Tools/webchecker/webchecker.py
Guido van Rossum73827c61995-03-20 13:00:32 +000065
66# Install destination -- not used now but might be useful some time...
67DESTDIR= /usr/local
68LIBDESTDIR= $DESTDIR/lib
Fred Drakee4837a11998-03-06 21:29:34 +000069LIBDEST= $LIBDESTDIR/python$(VERSION)
Guido van Rossum73827c61995-03-20 13:00:32 +000070DOCDESTDIR= $LIBDEST/doc
71
Fred Drakeb9838d91998-05-08 15:43:08 +000072INFODIR= info
Fred Drake3af9f251998-04-24 21:07:22 +000073
74srcdir=.
75VPATH=.
Fred Drake05dd3c01997-12-29 17:17:54 +000076
Guido van Rossum73827c61995-03-20 13:00:32 +000077# Ideally, you shouldn't need to edit beyond this point
Guido van Rossum5b343731992-07-07 09:06:34 +000078
Fred Drake228e31e1998-08-04 16:59:29 +000079RELEASE=1.5.1p1
Fred Drake33d05b91998-01-13 16:33:09 +000080VERSION=1.5
81
Fred Drake3f8a59f1998-07-24 13:58:27 +000082MANDVIFILES= api.dvi ext.dvi lib.dvi ref.dvi tut.dvi
83HOWTODVIFILES= mac.dvi
84
85MANPDFFILES= api.pdf ext.pdf lib.pdf ref.pdf tut.pdf
86HOWTOPDFFILES= mac.pdf
87
88MANPSFILES= api.ps ext.ps lib.ps ref.ps tut.ps
89HOWTOPSFILES= mac.ps
90
91DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES)
92PDFFILES= $(MANPDFFILES) $(HOWTOPDFFILES)
93PSFILES= $(MANPSFILES) $(HOWTOPSFILES)
Fred Drake04cf4dc1998-02-12 22:33:50 +000094
Fred Drakebbe33c51998-05-07 01:39:06 +000095# Be careful when messing with this one!
Fred Drakeb9838d91998-05-08 15:43:08 +000096TEXINPUTS= .:../texinputs:
Fred Drakebbe33c51998-05-07 01:39:06 +000097
98MKDVI= TEXINPUTS=$(TEXINPUTS) $(srcdir)/tools/mkdvi.sh
Fred Drakecdbd3911998-05-15 17:02:10 +000099MKHOWTO= $(srcdir)/tools/mkhowto.sh --keep
100MKHTML= PAPER=$(PAPER) $(srcdir)/tools/mkhtml.sh
Fred Drakef2951131998-05-07 19:30:16 +0000101MKPDF= TEXINPUTS=$(TEXINPUTS) $(srcdir)/tools/mkdvi.sh --pdf
Fred Drakebbe33c51998-05-07 01:39:06 +0000102
Guido van Rossume83e3801995-03-17 16:01:35 +0000103# Main target
Fred Drake34116ba1998-07-24 15:42:12 +0000104all: ps
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000105
Fred Drake34116ba1998-07-24 15:42:12 +0000106dvi:
Fred Drakeb9838d91998-05-08 15:43:08 +0000107 (cd paper-$(PAPER); \
108 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
109 -f ../Makefile do-dvi)
Fred Drakee4837a11998-03-06 21:29:34 +0000110
Fred Drake34116ba1998-07-24 15:42:12 +0000111pdf:
Fred Drakeb9838d91998-05-08 15:43:08 +0000112 (cd paper-$(PAPER); \
113 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
114 -f ../Makefile do-pdf)
Guido van Rossum20aca5a1991-01-25 13:29:04 +0000115
Fred Drake34116ba1998-07-24 15:42:12 +0000116ps:
Fred Drakeb9838d91998-05-08 15:43:08 +0000117 (cd paper-$(PAPER); \
118 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
119 -f ../Makefile do-ps)
Fred Drakef2951131998-05-07 19:30:16 +0000120
Fred Drake34116ba1998-07-24 15:42:12 +0000121world: ps pdf html tarballs
Fred Draked69e2c41998-05-11 18:25:46 +0000122
123
124# Targets for each document:
Fred Drake3f8a59f1998-07-24 13:58:27 +0000125.PHONY: api ext lib mac ref tut
Fred Draked69e2c41998-05-11 18:25:46 +0000126
127api:
128 (cd paper-$(PAPER); \
129 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
130 -f ../Makefile api.ps)
131
132ext:
133 (cd paper-$(PAPER); \
134 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
135 -f ../Makefile ext.ps)
136
137lib:
138 (cd paper-$(PAPER); \
139 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
140 -f ../Makefile lib.ps)
141
Fred Drake3f8a59f1998-07-24 13:58:27 +0000142mac:
143 (cd paper-$(PAPER); \
144 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
145 -f ../Makefile mac.ps)
146
Fred Draked69e2c41998-05-11 18:25:46 +0000147ref:
148 (cd paper-$(PAPER); \
149 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
150 -f ../Makefile ref.ps)
151
152tut:
153 (cd paper-$(PAPER); \
154 $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \
155 -f ../Makefile tut.ps)
156
157
158# Internal targets:
Fred Drakef2951131998-05-07 19:30:16 +0000159
160do-dvi: $(DVIFILES)
161do-pdf: $(PDFFILES)
Fred Drakecdbd3911998-05-15 17:02:10 +0000162do-ps: $(PSFILES)
Fred Drakef2951131998-05-07 19:30:16 +0000163
164# This target gets both the PDF and PS files updated.
Fred Drakeddae4141998-02-17 15:45:25 +0000165#
166all-formats: $(PSFILES) $(PDFFILES)
167
Fred Drakedd946761998-02-18 16:02:14 +0000168
Fred Drake126d8401998-02-04 19:54:40 +0000169# Rules to build PostScript and PDF formats
Fred Drakef2951131998-05-07 19:30:16 +0000170.SUFFIXES: .dvi .ps .pdf
Fred Drake126d8401998-02-04 19:54:40 +0000171
172.dvi.ps:
Fred Drake9fab3aa1998-04-28 19:20:43 +0000173 $(DVIPS) -o $@ $<
Fred Drake126d8401998-02-04 19:54:40 +0000174
Fred Drakef2951131998-05-07 19:30:16 +0000175#.pdf.ps:
176# $(ACROREAD) -toPostScript $<
Fred Drake126d8401998-02-04 19:54:40 +0000177
Fred Drake3b26eed1998-02-16 17:06:10 +0000178
Guido van Rossume83e3801995-03-17 16:01:35 +0000179# Dependencies
Fred Drakef2951131998-05-07 19:30:16 +0000180# We really need some support of dependency generator for this...
181
Fred Drake3f8a59f1998-07-24 13:58:27 +0000182COMMONSTYLES=texinputs/python.sty texinputs/pypaper.sty texinputs/myindex.ist
183COMMONTEX=texinputs/copyright.tex texinputs/boilerplate.tex
Fred Drakef2951131998-05-07 19:30:16 +0000184
Fred Drake3f8a59f1998-07-24 13:58:27 +0000185MANSTYLES=texinputs/fncychap.sty texinputs/manual.cls $(COMMONSTYLES)
186HOWTOSTYLES=texinputs/howto.cls $(COMMONSTYLES)
Fred Drake5d8f0ed1998-02-11 14:43:38 +0000187
Fred Drake3f8a59f1998-07-24 13:58:27 +0000188
189$(DVIFILES): tools/fix_hack tools/mkdvi.sh $(COMMONTEX)
190$(PDFFILES): tools/fix_hack tools/mkdvi.sh $(COMMONTEX)
191
192$(MANDVIFILES): $(MANSTYLES)
193$(MANPDFFILES): $(MANSTYLES)
194
195$(HOWTODVIFILES): tools/mkhowto.sh $(HOWTOSTYLES)
196$(HOWTOPDFFILES): tools/mkhowto.sh $(HOWTOSTYLES)
197
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000198
Fred Drakef2951131998-05-07 19:30:16 +0000199REFFILES = ref/ref1.tex ref/ref2.tex ref/ref3.tex ref/ref4.tex \
Fred Drakeefc17bd1998-07-28 21:05:16 +0000200 ref/ref5.tex ref/ref6.tex ref/ref7.tex ref/ref8.tex \
201 ref/ref.tex
Fred Drakea6bb3961998-05-06 19:51:39 +0000202
Guido van Rossum16d6e711994-08-08 12:30:22 +0000203# LaTeX source files for the Python Library Reference
Fred Drake9cdf0871998-05-07 15:03:25 +0000204LIBFILES = lib/lib.tex \
Fred Drakef54556e1998-08-04 20:53:55 +0000205 lib/libintro.tex lib/libobjs.tex lib/libstdtypes.tex \
206 lib/libexcs.tex lib/libfuncs.tex lib/libpython.tex lib/libsys.tex \
207 lib/libtypes.tex lib/libtraceback.tex lib/libpickle.tex \
208 lib/libshelve.tex lib/libcopy.tex lib/libmarshal.tex \
209 lib/libimp.tex lib/libparser.tex lib/libbltin.tex lib/libmain.tex \
210 lib/libstrings.tex lib/libstring.tex lib/libregex.tex \
211 lib/libregsub.tex lib/libstruct.tex lib/libmisc.tex \
212 lib/libmath.tex lib/librand.tex lib/libwhrandom.tex \
213 lib/libarray.tex lib/liballos.tex lib/libos.tex lib/libtime.tex \
214 lib/libgetopt.tex lib/libtempfile.tex lib/liberrno.tex \
215 lib/libsomeos.tex lib/libsignal.tex lib/libsocket.tex \
216 lib/libselect.tex lib/libthread.tex lib/libunix.tex \
217 lib/libposix.tex lib/libposixpath.tex lib/libpwd.tex \
218 lib/libgrp.tex lib/libcrypt.tex lib/libdbm.tex lib/libgdbm.tex \
219 lib/libtermios.tex lib/libfcntl.tex lib/libposixfile.tex \
220 lib/libsyslog.tex lib/libpdb.tex lib/libprofile.tex lib/libwww.tex \
221 lib/libcgi.tex lib/liburllib.tex lib/libhttplib.tex \
222 lib/libftplib.tex lib/libgopherlib.tex lib/libnntplib.tex \
223 lib/liburlparse.tex lib/libhtmllib.tex lib/libsgmllib.tex \
224 lib/librfc822.tex lib/libmimetools.tex lib/libbinascii.tex \
225 lib/libmm.tex lib/libaudioop.tex lib/libimageop.tex \
226 lib/libaifc.tex lib/libjpeg.tex lib/librgbimg.tex \
227 lib/libcrypto.tex lib/libmd5.tex lib/libmpz.tex lib/librotor.tex \
228 lib/libstdwin.tex lib/libsgi.tex lib/libal.tex lib/libcd.tex \
229 lib/libfl.tex lib/libfm.tex lib/libgl.tex lib/libimgfile.tex \
230 lib/libsun.tex lib/libxdrlib.tex lib/libimghdr.tex \
231 lib/librestricted.tex lib/librexec.tex lib/libbastion.tex \
232 lib/libformatter.tex lib/liboperator.tex lib/libsoundex.tex \
233 lib/libresource.tex lib/libstat.tex lib/libstringio.tex \
234 lib/libtoken.tex lib/libundoc.tex lib/libmailcap.tex \
235 lib/libglob.tex lib/libuser.tex lib/libanydbm.tex \
236 lib/librandom.tex lib/libsite.tex lib/libwhichdb.tex \
237 lib/libbase64.tex lib/libfnmatch.tex lib/libquopri.tex \
238 lib/libzlib.tex lib/libsocksvr.tex lib/libmailbox.tex \
239 lib/libcommands.tex lib/libcmath.tex lib/libgzip.tex \
240 lib/libpprint.tex lib/libcode.tex lib/libmimify.tex lib/libre.tex \
241 lib/libuserdict.tex lib/libdis.tex lib/libxmllib.tex \
242 lib/libqueue.tex lib/liblocale.tex lib/libbasehttp.tex \
243 lib/libcopyreg.tex lib/libsymbol.tex lib/libbinhex.tex \
244 lib/libuu.tex lib/libsunaudio.tex lib/libfileinput.tex \
245 lib/libimaplib.tex lib/libpoplib.tex lib/libcalendar.tex \
246 lib/libpopen2.tex lib/libbisect.tex lib/libmimetypes.tex \
247 lib/libsmtplib.tex lib/libcmd.tex lib/libmultifile.tex \
248 lib/libthreading.tex
Guido van Rossum16d6e711994-08-08 12:30:22 +0000249
Fred Drake9cdf0871998-05-07 15:03:25 +0000250# LaTeX source files for Macintosh Library Modules.
Fred Drakef54556e1998-08-04 20:53:55 +0000251MACLIBFILES = mac/mac.tex mac/libmac.tex mac/libctb.tex \
252 mac/libmacconsole.tex mac/libmacdnr.tex mac/libmacfs.tex \
253 mac/libmacos.tex mac/libmacostools.tex mac/libmactcp.tex \
254 mac/libmacspeech.tex mac/libmacui.tex mac/libmacic.tex \
Fred Drake9cdf0871998-05-07 15:03:25 +0000255 mac/libframework.tex mac/libminiae.tex
Fred Drakebdbdb801998-04-17 14:01:44 +0000256
Fred Drakebbe33c51998-05-07 01:39:06 +0000257# Python Library Reference
Fred Drake520f8bd1998-03-09 16:43:54 +0000258lib.dvi: tools/indfix.py $(LIBFILES)
Fred Drake3af9f251998-04-24 21:07:22 +0000259 $(srcdir)/tools/newind.py >$*.ind
260 $(srcdir)/tools/newind.py modindex >mod$*.ind
Fred Drake9cdf0871998-05-07 15:03:25 +0000261 TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(LATEX) $*
Fred Drake8bc96571998-03-09 16:37:52 +0000262 $(MAKEINDEX) mod$*.idx
Fred Drake3af9f251998-04-24 21:07:22 +0000263 $(srcdir)/tools/fix_hack $*.idx
Fred Drake5ad78f31998-02-22 19:47:13 +0000264 $(MAKEINDEX) $*.idx
Fred Drake3af9f251998-04-24 21:07:22 +0000265 $(srcdir)/tools/indfix.py $*.ind
Fred Drake9cdf0871998-05-07 15:03:25 +0000266 TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(LATEX) $*
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000267
Fred Drakef2951131998-05-07 19:30:16 +0000268lib.pdf: tools/indfix.py $(LIBFILES)
269 $(srcdir)/tools/newind.py >$*.ind
270 $(srcdir)/tools/newind.py modindex >mod$*.ind
271 TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(PDFLATEX) $*
272 $(MAKEINDEX) mod$*.idx
273 $(srcdir)/tools/fix_hack $*.idx
274 $(MAKEINDEX) $*.idx
275 $(srcdir)/tools/indfix.py $*.ind
Fred Drake34116ba1998-07-24 15:42:12 +0000276 $(srcdir)/tools/toc2bkm.py $*
Fred Drakef2951131998-05-07 19:30:16 +0000277 TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(PDFLATEX) $*
278
Fred Drakebbe33c51998-05-07 01:39:06 +0000279# Python/C API Reference Manual
280api.dvi: api/api.tex
281 $(MKDVI) api
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000282
Fred Drakef2951131998-05-07 19:30:16 +0000283api.pdf: api/api.tex
284 $(MKPDF) api
285
Fred Drakebbe33c51998-05-07 01:39:06 +0000286# Extending and Embedding the Python Interpreter
287ext.dvi: ext/ext.tex
288 $(MKDVI) ext
289
Fred Drakef2951131998-05-07 19:30:16 +0000290ext.pdf: ext/ext.tex
291 $(MKPDF) ext
292
Fred Drakecdbd3911998-05-15 17:02:10 +0000293# Macintosh Library Modules
Fred Drake3f8a59f1998-07-24 13:58:27 +0000294mac.dvi: $(MACLIBFILES)
Fred Drakecdbd3911998-05-15 17:02:10 +0000295 $(MKHOWTO) --dvi $(srcdir)/$*/$*.tex
296
Fred Drake3f8a59f1998-07-24 13:58:27 +0000297mac.pdf: $(MACLIBFILES)
Fred Drakecdbd3911998-05-15 17:02:10 +0000298 $(MKHOWTO) --pdf $(srcdir)/$*/$*.tex
299
Fred Drakebbe33c51998-05-07 01:39:06 +0000300# Python Reference Manual
Fred Drakef2951131998-05-07 19:30:16 +0000301ref.dvi: $(REFFILES)
Fred Drakebbe33c51998-05-07 01:39:06 +0000302 $(MKDVI) ref
303
Fred Drakef2951131998-05-07 19:30:16 +0000304ref.pdf: $(REFFILES)
305 $(MKPDF) ref
306
Fred Drakebbe33c51998-05-07 01:39:06 +0000307# Python Tutorial
308tut.dvi: tut/tut.tex
309 $(MKDVI) tut
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000310
Fred Drakef2951131998-05-07 19:30:16 +0000311tut.pdf: tut/tut.tex
312 $(MKPDF) tut
313
Guido van Rossume83e3801995-03-17 16:01:35 +0000314
315# The remaining part of the Makefile is concerned with various
Guido van Rossum73827c61995-03-20 13:00:32 +0000316# conversions, as described above. See also the README file.
Guido van Rossume83e3801995-03-17 16:01:35 +0000317
Fred Drake6f5bf8d1998-07-27 19:12:58 +0000318.PHONY: html l2h info
Fred Drake05dd3c01997-12-29 17:17:54 +0000319
Fred Drakeb9838d91998-05-08 15:43:08 +0000320info:
321 (cd $(INFODIR); $(MAKE))
Fred Drake5ad78f31998-02-22 19:47:13 +0000322
Guido van Rossum73827c61995-03-20 13:00:32 +0000323# Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to
324# HTML converter. For more info on this program, see
Guido van Rossume83e3801995-03-17 16:01:35 +0000325# <URL:http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html>.
Guido van Rossume83e3801995-03-17 16:01:35 +0000326
Guido van Rossum9cb64801997-12-29 20:01:55 +0000327# Note that LaTeX2HTML inserts references to an icons directory in
328# each page that it generates. I have placed a copy of this directory
329# in the distribution to simplify the process of creating a
330# self-contained HTML distribution; for this purpose I have also added
331# a (trivial) index.html. Change the definition of $ICONSERVER in
Fred Drake9fab3aa1998-04-28 19:20:43 +0000332# perl/l2hinit.perl to use a different location for the icons directory.
Guido van Rossume83e3801995-03-17 16:01:35 +0000333
Fred Drakef2951131998-05-07 19:30:16 +0000334COMMONPERL=perl/manual.perl perl/python.perl
Fred Drakebbe33c51998-05-07 01:39:06 +0000335
Fred Drake34116ba1998-07-24 15:42:12 +0000336l2h html:
Fred Drakee593b621998-05-15 17:50:32 +0000337 (cd $(HTMLDIR); $(MAKE) TEXINPUTS=../paper-$(PAPER):../texinputs: \
338 -f ../html/Makefile)
Guido van Rossum6938f061994-08-01 12:22:53 +0000339
Fred Drake9cdf0871998-05-07 15:03:25 +0000340l2hapi: $(COMMONPERL)
Fred Drakef2951131998-05-07 19:30:16 +0000341 $(MKHTML) api $(L2HARGS)
Guido van Rossum6938f061994-08-01 12:22:53 +0000342
Fred Drake9cdf0871998-05-07 15:03:25 +0000343l2hext: $(COMMONPERL)
Fred Drakef2951131998-05-07 19:30:16 +0000344 $(MKHTML) ext $(L2HARGS)
Guido van Rossum970871f1993-02-21 20:10:26 +0000345
Fred Drakecdbd3911998-05-15 17:02:10 +0000346l2hlib: $(COMMONPERL) $(LIBFILES)
Fred Drake9fab3aa1998-04-28 19:20:43 +0000347 $(srcdir)/tools/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux
348 mv lib1.aux `$(KPSEWHICH) lib.aux`
Fred Drakef2951131998-05-07 19:30:16 +0000349 $(MKHTML) lib $(L2HARGS)
Fred Drakea6bb3961998-05-06 19:51:39 +0000350
Fred Drakecdbd3911998-05-15 17:02:10 +0000351l2hmac: $(COMMONPERL) $(MACLIBFILES)
352 $(srcdir)/tools/mkhowto.sh --html $(srcdir)/mac/mac.tex
353
Fred Drake9cdf0871998-05-07 15:03:25 +0000354l2href: $(COMMONPERL)
Fred Drakef2951131998-05-07 19:30:16 +0000355 $(MKHTML) ref $(L2HARGS)
Guido van Rossume83e3801995-03-17 16:01:35 +0000356
Fred Drake9cdf0871998-05-07 15:03:25 +0000357l2htut: $(COMMONPERL)
Fred Drakef2951131998-05-07 19:30:16 +0000358 $(MKHTML) tut $(L2HARGS)
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000359
Fred Drakee4837a11998-03-06 21:29:34 +0000360# webchecker needs an extra flag to process the huge index from the libref
361webcheck:
Fred Drake79c0f0e1998-05-19 18:04:13 +0000362 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/api/
363 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ext/
364 $(WEBCHECKER) -m290000 file:`pwd`/$(HTMLDIR)/lib/
365 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/mac/
366 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ref/
367 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/tut/
Fred Drakee4837a11998-03-06 21:29:34 +0000368
Fred Drakee34ab301998-05-11 21:10:15 +0000369lib-info-$(RELEASE).tgz: info
Fred Draked69e2c41998-05-11 18:25:46 +0000370 (cd $(INFODIR); tar cf - python-???.info*) | gzip -9 >$@
Fred Drakea7998351998-02-19 16:01:04 +0000371
Fred Drakee34ab301998-05-11 21:10:15 +0000372latex-$(RELEASE).tgz:
Fred Drake29cabd41998-05-11 18:53:07 +0000373 $(srcdir)/tools/mktarball.sh $(RELEASE)
Fred Drakee61d7af1998-03-05 16:37:34 +0000374
Fred Draked19b9d61998-07-29 03:49:44 +0000375pdf-$(PAPER)-$(RELEASE).tgz: pdf
Fred Draked69e2c41998-05-11 18:25:46 +0000376 (cd paper-$(PAPER); tar cf - $(PDFFILES)) | gzip -9 >$@
Fred Drake04cf4dc1998-02-12 22:33:50 +0000377
Fred Draked19b9d61998-07-29 03:49:44 +0000378postscript-$(PAPER)-$(RELEASE).tgz: ps
Fred Draked69e2c41998-05-11 18:25:46 +0000379 (cd paper-$(PAPER); tar cf - $(PSFILES)) | gzip -9 >$@
Fred Drake04cf4dc1998-02-12 22:33:50 +0000380
Fred Drakee34ab301998-05-11 21:10:15 +0000381html-$(RELEASE).tgz:
382 (cd $(HTMLDIR); tar cf - index.html ???/???.css ???/*.html */*.gif) \
Fred Drake29cabd41998-05-11 18:53:07 +0000383 | gzip -9 >$@
Fred Drake33d05b91998-01-13 16:33:09 +0000384
Fred Drakea7998351998-02-19 16:01:04 +0000385# convenience targets:
386
Fred Drakee34ab301998-05-11 21:10:15 +0000387tarhtml: html-$(RELEASE).tgz
Fred Drakebbe33c51998-05-07 01:39:06 +0000388
Fred Drakee34ab301998-05-11 21:10:15 +0000389tarinfo: lib-info-$(RELEASE).tgz
Fred Drakea7998351998-02-19 16:01:04 +0000390
Fred Drakee34ab301998-05-11 21:10:15 +0000391tarps: postscript-$(PAPER)-$(RELEASE).tgz
Fred Drake33d05b91998-01-13 16:33:09 +0000392
Fred Drakee34ab301998-05-11 21:10:15 +0000393tarpdf: pdf-$(PAPER)-$(RELEASE).tgz
Fred Drake04cf4dc1998-02-12 22:33:50 +0000394
Fred Drakee34ab301998-05-11 21:10:15 +0000395tarlatex: latex-$(RELEASE).tgz
Fred Drakee61d7af1998-03-05 16:37:34 +0000396
Fred Drakeefc17bd1998-07-28 21:05:16 +0000397tarballs: tarpdf tarps tarhtml tarlatex
Guido van Rossum84cca441997-11-25 20:49:09 +0000398
Guido van Rossume83e3801995-03-17 16:01:35 +0000399
400# Housekeeping targets
401
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000402# Remove temporary files; all except the following:
Fred Drake6659c301998-03-03 22:02:19 +0000403# - sources: .tex, .bib, .sty, *.cls
Fred Drake04cf4dc1998-02-12 22:33:50 +0000404# - useful results: .dvi, .pdf, .ps, .texi, .info
Fred Drakee4837a11998-03-06 21:29:34 +0000405clean:
Fred Drakef54556e1998-08-04 20:53:55 +0000406 (cd paper-$(PAPER); \
407 rm -f *~ *.aux *.idx *.ilg *.ind *.log *.toc *.bkm *.syn)
Fred Drakee34ab301998-05-11 21:10:15 +0000408 (cd $(INFODIR); $(MAKE) clean)
Fred Drakeb9838d91998-05-08 15:43:08 +0000409 (cd $(HTMLDIR); rm -f @webchecker.pickle)
Fred Drakee34ab301998-05-11 21:10:15 +0000410 rm -f html-$(RELEASE).tgz info-$(RELEASE).tgz
411 rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz
412 rm -f latex-$(RELEASE).tgz
Guido van Rossum5b343731992-07-07 09:06:34 +0000413
Fred Drake03ff6f71997-08-22 18:18:54 +0000414l2hclean:
Fred Drakeb9838d91998-05-08 15:43:08 +0000415 (cd $(HTMLDIR); rm -rf api ext lib ref tut)
Fred Drake03ff6f71997-08-22 18:18:54 +0000416
Guido van Rossume83e3801995-03-17 16:01:35 +0000417# Remove temporaries as well as final products
Fred Drakee4837a11998-03-06 21:29:34 +0000418clobber: clean l2hclean
Fred Drakeb9838d91998-05-08 15:43:08 +0000419 (cd paper-$(PAPER); rm -f $(DVIFILES) $(PSFILES) $(PDFFILES))
Fred Drakee34ab301998-05-11 21:10:15 +0000420 (cd $(INFODIR); $(MAKE) clobber)
Fred Drake5ad78f31998-02-22 19:47:13 +0000421
422realclean: clobber
423distclean: clobber