blob: c4043bf746bba0578bc86a5525fe463c2dc12241 [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 Drake9fab3aa1998-04-28 19:20:43 +000056DVIPS= dvips -N0
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 Drakef5013f11998-04-13 21:02:49 +000079RELEASE=1.5.1
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 Drake3f8a59f1998-07-24 13:58:27 +0000205 lib/libintro.tex lib/libobjs.tex lib/libstdtypes.tex lib/libexcs.tex \
206 lib/libfuncs.tex lib/libpython.tex lib/libsys.tex lib/libtypes.tex \
Fred Drake9cdf0871998-05-07 15:03:25 +0000207 lib/libtraceback.tex lib/libpickle.tex lib/libshelve.tex \
208 lib/libcopy.tex lib/libmarshal.tex lib/libimp.tex lib/libparser.tex \
209 lib/libbltin.tex lib/libmain.tex lib/libstrings.tex lib/libstring.tex \
210 lib/libregex.tex lib/libregsub.tex lib/libstruct.tex lib/libmisc.tex \
211 lib/libmath.tex lib/librand.tex lib/libwhrandom.tex lib/libarray.tex \
212 lib/liballos.tex lib/libos.tex lib/libtime.tex lib/libgetopt.tex \
213 lib/libtempfile.tex lib/liberrno.tex lib/libsomeos.tex lib/libsignal.tex \
214 lib/libsocket.tex lib/libselect.tex lib/libthread.tex lib/libunix.tex \
Fred Drake3f8a59f1998-07-24 13:58:27 +0000215 lib/libposix.tex lib/libposixpath.tex lib/libpwd.tex lib/libgrp.tex \
Fred Drake9cdf0871998-05-07 15:03:25 +0000216 lib/libcrypt.tex lib/libdbm.tex lib/libgdbm.tex lib/libtermios.tex \
217 lib/libfcntl.tex lib/libposixfile.tex lib/libsyslog.tex lib/libpdb.tex \
218 lib/libprofile.tex lib/libwww.tex lib/libcgi.tex lib/liburllib.tex \
219 lib/libhttplib.tex lib/libftplib.tex lib/libgopherlib.tex \
220 lib/libnntplib.tex lib/liburlparse.tex lib/libhtmllib.tex \
221 lib/libsgmllib.tex lib/librfc822.tex lib/libmimetools.tex \
222 lib/libbinascii.tex lib/libmm.tex lib/libaudioop.tex lib/libimageop.tex \
223 lib/libaifc.tex lib/libjpeg.tex lib/librgbimg.tex lib/libcrypto.tex \
224 lib/libmd5.tex lib/libmpz.tex lib/librotor.tex lib/libstdwin.tex \
225 lib/libsgi.tex lib/libal.tex lib/libcd.tex lib/libfl.tex lib/libfm.tex \
226 lib/libgl.tex lib/libimgfile.tex lib/libsun.tex lib/libxdrlib.tex \
227 lib/libimghdr.tex lib/librestricted.tex lib/librexec.tex \
228 lib/libbastion.tex lib/libformatter.tex lib/liboperator.tex \
Fred Drake3f8a59f1998-07-24 13:58:27 +0000229 lib/libsoundex.tex lib/libresource.tex lib/libstat.tex \
230 lib/libstringio.tex lib/libtoken.tex \
Fred Drake9cdf0871998-05-07 15:03:25 +0000231 lib/libundoc.tex lib/libmailcap.tex lib/libglob.tex lib/libuser.tex \
232 lib/libanydbm.tex lib/librandom.tex lib/libsite.tex lib/libwhichdb.tex \
233 lib/libbase64.tex lib/libfnmatch.tex lib/libquopri.tex lib/libzlib.tex \
234 lib/libsocksvr.tex lib/libmailbox.tex lib/libcommands.tex \
235 lib/libcmath.tex lib/libgzip.tex lib/libpprint.tex \
236 lib/libcode.tex lib/libmimify.tex lib/libre.tex lib/libuserdict.tex \
237 lib/libdis.tex lib/libxmllib.tex lib/libqueue.tex lib/liblocale.tex \
Fred Drake3f8a59f1998-07-24 13:58:27 +0000238 lib/libbasehttp.tex lib/libcopyreg.tex lib/libsymbol.tex \
Fred Drake9cdf0871998-05-07 15:03:25 +0000239 lib/libbinhex.tex lib/libuu.tex \
240 lib/libsunaudio.tex lib/libfileinput.tex lib/libimaplib.tex \
Fred Drakeedde1501998-05-19 15:04:21 +0000241 lib/libpoplib.tex lib/libcalendar.tex lib/libpopen2.tex \
Guido van Rossumf78a52c1998-06-28 17:57:05 +0000242 lib/libbisect.tex lib/libmimetypes.tex lib/libsmtplib.tex lib/libcmd.tex \
Fred Drakea9f445c1998-07-20 14:01:20 +0000243 lib/libmultifile.tex lib/libthreading.tex
Guido van Rossum16d6e711994-08-08 12:30:22 +0000244
Fred Drake9cdf0871998-05-07 15:03:25 +0000245# LaTeX source files for Macintosh Library Modules.
246MACLIBFILES = mac/mac.tex mac/libmac.tex mac/libctb.tex mac/libmacconsole.tex \
247 mac/libmacdnr.tex mac/libmacfs.tex mac/libmacos.tex mac/libmacostools.tex \
248 mac/libmactcp.tex mac/libmacspeech.tex mac/libmacui.tex mac/libmacic.tex \
249 mac/libframework.tex mac/libminiae.tex
Fred Drakebdbdb801998-04-17 14:01:44 +0000250
Fred Drakebbe33c51998-05-07 01:39:06 +0000251# Python Library Reference
Fred Drake520f8bd1998-03-09 16:43:54 +0000252lib.dvi: tools/indfix.py $(LIBFILES)
Fred Drake3af9f251998-04-24 21:07:22 +0000253 $(srcdir)/tools/newind.py >$*.ind
254 $(srcdir)/tools/newind.py modindex >mod$*.ind
Fred Drake9cdf0871998-05-07 15:03:25 +0000255 TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(LATEX) $*
Fred Drake8bc96571998-03-09 16:37:52 +0000256 $(MAKEINDEX) mod$*.idx
Fred Drake3af9f251998-04-24 21:07:22 +0000257 $(srcdir)/tools/fix_hack $*.idx
Fred Drake5ad78f31998-02-22 19:47:13 +0000258 $(MAKEINDEX) $*.idx
Fred Drake3af9f251998-04-24 21:07:22 +0000259 $(srcdir)/tools/indfix.py $*.ind
Fred Drake9cdf0871998-05-07 15:03:25 +0000260 TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(LATEX) $*
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000261
Fred Drakef2951131998-05-07 19:30:16 +0000262lib.pdf: tools/indfix.py $(LIBFILES)
263 $(srcdir)/tools/newind.py >$*.ind
264 $(srcdir)/tools/newind.py modindex >mod$*.ind
265 TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(PDFLATEX) $*
266 $(MAKEINDEX) mod$*.idx
267 $(srcdir)/tools/fix_hack $*.idx
268 $(MAKEINDEX) $*.idx
269 $(srcdir)/tools/indfix.py $*.ind
Fred Drake34116ba1998-07-24 15:42:12 +0000270 $(srcdir)/tools/toc2bkm.py $*
Fred Drakef2951131998-05-07 19:30:16 +0000271 TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(PDFLATEX) $*
272
Fred Drakebbe33c51998-05-07 01:39:06 +0000273# Python/C API Reference Manual
274api.dvi: api/api.tex
275 $(MKDVI) api
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000276
Fred Drakef2951131998-05-07 19:30:16 +0000277api.pdf: api/api.tex
278 $(MKPDF) api
279
Fred Drakebbe33c51998-05-07 01:39:06 +0000280# Extending and Embedding the Python Interpreter
281ext.dvi: ext/ext.tex
282 $(MKDVI) ext
283
Fred Drakef2951131998-05-07 19:30:16 +0000284ext.pdf: ext/ext.tex
285 $(MKPDF) ext
286
Fred Drakecdbd3911998-05-15 17:02:10 +0000287# Macintosh Library Modules
Fred Drake3f8a59f1998-07-24 13:58:27 +0000288mac.dvi: $(MACLIBFILES)
Fred Drakecdbd3911998-05-15 17:02:10 +0000289 $(MKHOWTO) --dvi $(srcdir)/$*/$*.tex
290
Fred Drake3f8a59f1998-07-24 13:58:27 +0000291mac.pdf: $(MACLIBFILES)
Fred Drakecdbd3911998-05-15 17:02:10 +0000292 $(MKHOWTO) --pdf $(srcdir)/$*/$*.tex
293
Fred Drakebbe33c51998-05-07 01:39:06 +0000294# Python Reference Manual
Fred Drakef2951131998-05-07 19:30:16 +0000295ref.dvi: $(REFFILES)
Fred Drakebbe33c51998-05-07 01:39:06 +0000296 $(MKDVI) ref
297
Fred Drakef2951131998-05-07 19:30:16 +0000298ref.pdf: $(REFFILES)
299 $(MKPDF) ref
300
Fred Drakebbe33c51998-05-07 01:39:06 +0000301# Python Tutorial
302tut.dvi: tut/tut.tex
303 $(MKDVI) tut
Guido van Rossumeb8d5031996-08-09 21:46:05 +0000304
Fred Drakef2951131998-05-07 19:30:16 +0000305tut.pdf: tut/tut.tex
306 $(MKPDF) tut
307
Guido van Rossume83e3801995-03-17 16:01:35 +0000308
309# The remaining part of the Makefile is concerned with various
Guido van Rossum73827c61995-03-20 13:00:32 +0000310# conversions, as described above. See also the README file.
Guido van Rossume83e3801995-03-17 16:01:35 +0000311
Fred Drake6f5bf8d1998-07-27 19:12:58 +0000312.PHONY: html l2h info
Fred Drake05dd3c01997-12-29 17:17:54 +0000313
Fred Drakeb9838d91998-05-08 15:43:08 +0000314info:
315 (cd $(INFODIR); $(MAKE))
Fred Drake5ad78f31998-02-22 19:47:13 +0000316
Guido van Rossum73827c61995-03-20 13:00:32 +0000317# Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to
318# HTML converter. For more info on this program, see
Guido van Rossume83e3801995-03-17 16:01:35 +0000319# <URL:http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html>.
Guido van Rossume83e3801995-03-17 16:01:35 +0000320
Guido van Rossum9cb64801997-12-29 20:01:55 +0000321# Note that LaTeX2HTML inserts references to an icons directory in
322# each page that it generates. I have placed a copy of this directory
323# in the distribution to simplify the process of creating a
324# self-contained HTML distribution; for this purpose I have also added
325# a (trivial) index.html. Change the definition of $ICONSERVER in
Fred Drake9fab3aa1998-04-28 19:20:43 +0000326# perl/l2hinit.perl to use a different location for the icons directory.
Guido van Rossume83e3801995-03-17 16:01:35 +0000327
Fred Drakef2951131998-05-07 19:30:16 +0000328COMMONPERL=perl/manual.perl perl/python.perl
Fred Drakebbe33c51998-05-07 01:39:06 +0000329
Fred Drake34116ba1998-07-24 15:42:12 +0000330l2h html:
Fred Drakee593b621998-05-15 17:50:32 +0000331 (cd $(HTMLDIR); $(MAKE) TEXINPUTS=../paper-$(PAPER):../texinputs: \
332 -f ../html/Makefile)
Guido van Rossum6938f061994-08-01 12:22:53 +0000333
Fred Drake9cdf0871998-05-07 15:03:25 +0000334l2hapi: $(COMMONPERL)
Fred Drakef2951131998-05-07 19:30:16 +0000335 $(MKHTML) api $(L2HARGS)
Guido van Rossum6938f061994-08-01 12:22:53 +0000336
Fred Drake9cdf0871998-05-07 15:03:25 +0000337l2hext: $(COMMONPERL)
Fred Drakef2951131998-05-07 19:30:16 +0000338 $(MKHTML) ext $(L2HARGS)
Guido van Rossum970871f1993-02-21 20:10:26 +0000339
Fred Drakecdbd3911998-05-15 17:02:10 +0000340l2hlib: $(COMMONPERL) $(LIBFILES)
Fred Drake9fab3aa1998-04-28 19:20:43 +0000341 $(srcdir)/tools/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux
342 mv lib1.aux `$(KPSEWHICH) lib.aux`
Fred Drakef2951131998-05-07 19:30:16 +0000343 $(MKHTML) lib $(L2HARGS)
Fred Drakea6bb3961998-05-06 19:51:39 +0000344
Fred Drakecdbd3911998-05-15 17:02:10 +0000345l2hmac: $(COMMONPERL) $(MACLIBFILES)
346 $(srcdir)/tools/mkhowto.sh --html $(srcdir)/mac/mac.tex
347
Fred Drake9cdf0871998-05-07 15:03:25 +0000348l2href: $(COMMONPERL)
Fred Drakef2951131998-05-07 19:30:16 +0000349 $(MKHTML) ref $(L2HARGS)
Guido van Rossume83e3801995-03-17 16:01:35 +0000350
Fred Drake9cdf0871998-05-07 15:03:25 +0000351l2htut: $(COMMONPERL)
Fred Drakef2951131998-05-07 19:30:16 +0000352 $(MKHTML) tut $(L2HARGS)
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000353
Fred Drakee4837a11998-03-06 21:29:34 +0000354# webchecker needs an extra flag to process the huge index from the libref
355webcheck:
Fred Drake79c0f0e1998-05-19 18:04:13 +0000356 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/api/
357 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ext/
358 $(WEBCHECKER) -m290000 file:`pwd`/$(HTMLDIR)/lib/
359 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/mac/
360 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ref/
361 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/tut/
Fred Drakee4837a11998-03-06 21:29:34 +0000362
Fred Drakee34ab301998-05-11 21:10:15 +0000363lib-info-$(RELEASE).tgz: info
Fred Draked69e2c41998-05-11 18:25:46 +0000364 (cd $(INFODIR); tar cf - python-???.info*) | gzip -9 >$@
Fred Drakea7998351998-02-19 16:01:04 +0000365
Fred Drakee34ab301998-05-11 21:10:15 +0000366latex-$(RELEASE).tgz:
Fred Drake29cabd41998-05-11 18:53:07 +0000367 $(srcdir)/tools/mktarball.sh $(RELEASE)
Fred Drakee61d7af1998-03-05 16:37:34 +0000368
Fred Drakee34ab301998-05-11 21:10:15 +0000369pdf-$(PAPER)-$(RELEASE).tgz: all-pdf
Fred Draked69e2c41998-05-11 18:25:46 +0000370 (cd paper-$(PAPER); tar cf - $(PDFFILES)) | gzip -9 >$@
Fred Drake04cf4dc1998-02-12 22:33:50 +0000371
Fred Drakee34ab301998-05-11 21:10:15 +0000372postscript-$(PAPER)-$(RELEASE).tgz: all-ps
Fred Draked69e2c41998-05-11 18:25:46 +0000373 (cd paper-$(PAPER); tar cf - $(PSFILES)) | gzip -9 >$@
Fred Drake04cf4dc1998-02-12 22:33:50 +0000374
Fred Drakee34ab301998-05-11 21:10:15 +0000375html-$(RELEASE).tgz:
376 (cd $(HTMLDIR); tar cf - index.html ???/???.css ???/*.html */*.gif) \
Fred Drake29cabd41998-05-11 18:53:07 +0000377 | gzip -9 >$@
Fred Drake33d05b91998-01-13 16:33:09 +0000378
Fred Drakea7998351998-02-19 16:01:04 +0000379# convenience targets:
380
Fred Drakee34ab301998-05-11 21:10:15 +0000381tarhtml: html-$(RELEASE).tgz
Fred Drakebbe33c51998-05-07 01:39:06 +0000382
Fred Drakee34ab301998-05-11 21:10:15 +0000383tarinfo: lib-info-$(RELEASE).tgz
Fred Drakea7998351998-02-19 16:01:04 +0000384
Fred Drakee34ab301998-05-11 21:10:15 +0000385tarps: postscript-$(PAPER)-$(RELEASE).tgz
Fred Drake33d05b91998-01-13 16:33:09 +0000386
Fred Drakee34ab301998-05-11 21:10:15 +0000387tarpdf: pdf-$(PAPER)-$(RELEASE).tgz
Fred Drake04cf4dc1998-02-12 22:33:50 +0000388
Fred Drakee34ab301998-05-11 21:10:15 +0000389tarlatex: latex-$(RELEASE).tgz
Fred Drakee61d7af1998-03-05 16:37:34 +0000390
Fred Drakeefc17bd1998-07-28 21:05:16 +0000391tarballs: tarpdf tarps tarhtml tarlatex
Guido van Rossum84cca441997-11-25 20:49:09 +0000392
Guido van Rossume83e3801995-03-17 16:01:35 +0000393
394# Housekeeping targets
395
Guido van Rossum9231c8f1997-05-15 21:43:21 +0000396# Remove temporary files; all except the following:
Fred Drake6659c301998-03-03 22:02:19 +0000397# - sources: .tex, .bib, .sty, *.cls
Fred Drake04cf4dc1998-02-12 22:33:50 +0000398# - useful results: .dvi, .pdf, .ps, .texi, .info
Fred Drakee4837a11998-03-06 21:29:34 +0000399clean:
Fred Drake3f8a59f1998-07-24 13:58:27 +0000400 (cd paper-$(PAPER); rm -f *~ *.aux *.idx *.ilg *.ind *.log *.toc *.bkm *.syn)
Fred Drakee34ab301998-05-11 21:10:15 +0000401 (cd $(INFODIR); $(MAKE) clean)
Fred Drakeb9838d91998-05-08 15:43:08 +0000402 (cd $(HTMLDIR); rm -f @webchecker.pickle)
Fred Drakee34ab301998-05-11 21:10:15 +0000403 rm -f html-$(RELEASE).tgz info-$(RELEASE).tgz
404 rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz
405 rm -f latex-$(RELEASE).tgz
Guido van Rossum5b343731992-07-07 09:06:34 +0000406
Fred Drake03ff6f71997-08-22 18:18:54 +0000407l2hclean:
Fred Drakeb9838d91998-05-08 15:43:08 +0000408 (cd $(HTMLDIR); rm -rf api ext lib ref tut)
Fred Drake03ff6f71997-08-22 18:18:54 +0000409
Guido van Rossume83e3801995-03-17 16:01:35 +0000410# Remove temporaries as well as final products
Fred Drakee4837a11998-03-06 21:29:34 +0000411clobber: clean l2hclean
Fred Drakeb9838d91998-05-08 15:43:08 +0000412 (cd paper-$(PAPER); rm -f $(DVIFILES) $(PSFILES) $(PDFFILES))
Fred Drakee34ab301998-05-11 21:10:15 +0000413 (cd $(INFODIR); $(MAKE) clobber)
Fred Drake5ad78f31998-02-22 19:47:13 +0000414
415realclean: clobber
416distclean: clobber