| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 1 | # Makefile for Python documentation | 
|  | 2 | # --------------------------------- | 
|  | 3 | # | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 4 | # See also the README file. | 
|  | 5 | # | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 6 | # This is a bit of a mess.  The main documents are: | 
| Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 7 | #   api -- Python/C API Reference Manual | 
|  | 8 | #   ext -- Extending and Embedding the Python Interpreter | 
|  | 9 | #   lib -- Library Reference Manual | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 10 | #   ref -- Python Reference Manual | 
| Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 11 | #   tut -- Python Tutorial | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 12 | # | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 13 | # The latex sources for each of these documents are in subdirectories | 
|  | 14 | # with the three-letter designations above as the directory names. | 
| Guido van Rossum | 1f17543 | 1996-10-22 20:00:02 +0000 | [diff] [blame] | 15 | # | 
| Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 16 | # 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 Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 18 | # documents. | 
|  | 19 | # | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 20 | # 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 Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 25 | # | 
| Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 26 | # Everything is processed by LaTeX.  See the file `README' for more | 
|  | 27 | # information on the tools needed for processing. | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 28 | # | 
|  | 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 Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 33 | # 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 Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 36 | #   l2h -- convert tut, ref, lib, ext, api from LaTeX to HTML | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 37 | # See the README file for more info on these targets. | 
| Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 38 | # | 
|  | 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 Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 43 |  | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 44 | # Customizations -- you *may* have to edit these | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 45 |  | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 46 | # you could set this to a4 | 
|  | 47 | PAPER=letter | 
|  | 48 |  | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 49 | # Where are the various programs? | 
| Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 50 | LATEX=		latex | 
|  | 51 | PDFLATEX=	pdflatex | 
| Fred Drake | 9fab3aa | 1998-04-28 19:20:43 +0000 | [diff] [blame] | 52 | DVIPS=		dvips -N0 | 
| Fred Drake | df68e3d | 1998-05-08 03:46:38 +0000 | [diff] [blame] | 53 | KPSEWHICH=	TEXINPUTS=$(TEXINPUTS) kpsewhich tex | 
| Fred Drake | 3af9f25 | 1998-04-24 21:07:22 +0000 | [diff] [blame] | 54 | MAKEINDEX=	makeindex -s $(srcdir)/texinputs/myindex.ist | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 55 | ACROREAD=	acroread | 
| Fred Drake | 0d27d08 | 1998-04-23 20:07:55 +0000 | [diff] [blame] | 56 | L2HARGS= | 
| Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 57 | # HTMLDIR should not be '.'! | 
|  | 58 | HTMLDIR=	html | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 59 | PYTHON=		python | 
| Fred Drake | 3af9f25 | 1998-04-24 21:07:22 +0000 | [diff] [blame] | 60 | WEBCHECKER=	$(PYTHON) $(srcdir)/../Tools/webchecker/webchecker.py | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 61 |  | 
|  | 62 | # Install destination -- not used now but might be useful some time... | 
|  | 63 | DESTDIR=	/usr/local | 
|  | 64 | LIBDESTDIR=	$DESTDIR/lib | 
| Fred Drake | e4837a1 | 1998-03-06 21:29:34 +0000 | [diff] [blame] | 65 | LIBDEST=	$LIBDESTDIR/python$(VERSION) | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 66 | DOCDESTDIR=	$LIBDEST/doc | 
|  | 67 |  | 
| Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 68 | INFODIR=	info | 
| Fred Drake | 3af9f25 | 1998-04-24 21:07:22 +0000 | [diff] [blame] | 69 |  | 
|  | 70 | srcdir=. | 
|  | 71 | VPATH=. | 
| Fred Drake | 05dd3c0 | 1997-12-29 17:17:54 +0000 | [diff] [blame] | 72 |  | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 73 | # Ideally, you shouldn't need to edit beyond this point | 
| Guido van Rossum | 5b34373 | 1992-07-07 09:06:34 +0000 | [diff] [blame] | 74 |  | 
| Fred Drake | f5013f1 | 1998-04-13 21:02:49 +0000 | [diff] [blame] | 75 | RELEASE=1.5.1 | 
| Fred Drake | 33d05b9 | 1998-01-13 16:33:09 +0000 | [diff] [blame] | 76 | VERSION=1.5 | 
|  | 77 |  | 
| Fred Drake | cdbd391 | 1998-05-15 17:02:10 +0000 | [diff] [blame] | 78 | DVIFILES=	api.dvi ext.dvi lib.dvi mac.dvi ref.dvi tut.dvi | 
|  | 79 | PDFFILES=	api.pdf ext.pdf lib.pdf mac.pdf ref.pdf tut.pdf | 
|  | 80 | PSFILES=	api.ps ext.ps lib.ps mac.ps ref.ps tut.ps | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 81 |  | 
| Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 82 | # Be careful when messing with this one! | 
| Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 83 | TEXINPUTS=	.:../texinputs: | 
| Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 84 |  | 
|  | 85 | MKDVI=		TEXINPUTS=$(TEXINPUTS) $(srcdir)/tools/mkdvi.sh | 
| Fred Drake | cdbd391 | 1998-05-15 17:02:10 +0000 | [diff] [blame] | 86 | MKHOWTO=	$(srcdir)/tools/mkhowto.sh --keep | 
|  | 87 | MKHTML=		PAPER=$(PAPER) $(srcdir)/tools/mkhtml.sh | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 88 | MKPDF=		TEXINPUTS=$(TEXINPUTS) $(srcdir)/tools/mkdvi.sh --pdf | 
| Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 89 |  | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 90 | # Main target | 
| Fred Drake | 566d209 | 1998-05-08 02:00:48 +0000 | [diff] [blame] | 91 | all:	all-ps | 
| Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 92 |  | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 93 | all-dvi: | 
| Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 94 | (cd paper-$(PAPER); \ | 
|  | 95 | $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \ | 
|  | 96 | -f ../Makefile do-dvi) | 
| Fred Drake | e4837a1 | 1998-03-06 21:29:34 +0000 | [diff] [blame] | 97 |  | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 98 | all-pdf: | 
| Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 99 | (cd paper-$(PAPER); \ | 
|  | 100 | $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \ | 
|  | 101 | -f ../Makefile do-pdf) | 
| Guido van Rossum | 20aca5a | 1991-01-25 13:29:04 +0000 | [diff] [blame] | 102 |  | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 103 | all-ps: | 
| Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 104 | (cd paper-$(PAPER); \ | 
|  | 105 | $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \ | 
|  | 106 | -f ../Makefile do-ps) | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 107 |  | 
| Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 108 | world:	all-ps all-pdf l2h tarballs | 
|  | 109 |  | 
|  | 110 |  | 
|  | 111 | # Targets for each document: | 
|  | 112 | .PHONY: api ext lib ref tut | 
|  | 113 |  | 
|  | 114 | api: | 
|  | 115 | (cd paper-$(PAPER); \ | 
|  | 116 | $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \ | 
|  | 117 | -f ../Makefile api.ps) | 
|  | 118 |  | 
|  | 119 | ext: | 
|  | 120 | (cd paper-$(PAPER); \ | 
|  | 121 | $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \ | 
|  | 122 | -f ../Makefile ext.ps) | 
|  | 123 |  | 
|  | 124 | lib: | 
|  | 125 | (cd paper-$(PAPER); \ | 
|  | 126 | $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \ | 
|  | 127 | -f ../Makefile lib.ps) | 
|  | 128 |  | 
|  | 129 | ref: | 
|  | 130 | (cd paper-$(PAPER); \ | 
|  | 131 | $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \ | 
|  | 132 | -f ../Makefile ref.ps) | 
|  | 133 |  | 
|  | 134 | tut: | 
|  | 135 | (cd paper-$(PAPER); \ | 
|  | 136 | $(MAKE) srcdir=.. VPATH=.. TEXINPUTS=$(TEXINPUTS) \ | 
|  | 137 | -f ../Makefile tut.ps) | 
|  | 138 |  | 
|  | 139 |  | 
|  | 140 | # Internal targets: | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 141 |  | 
|  | 142 | do-dvi: $(DVIFILES) | 
|  | 143 | do-pdf: $(PDFFILES) | 
| Fred Drake | cdbd391 | 1998-05-15 17:02:10 +0000 | [diff] [blame] | 144 | do-ps:	$(PSFILES) | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 145 |  | 
|  | 146 | # This target gets both the PDF and PS files updated. | 
| Fred Drake | ddae414 | 1998-02-17 15:45:25 +0000 | [diff] [blame] | 147 | # | 
|  | 148 | all-formats:  $(PSFILES) $(PDFFILES) | 
|  | 149 |  | 
| Fred Drake | dd94676 | 1998-02-18 16:02:14 +0000 | [diff] [blame] | 150 |  | 
| Fred Drake | 126d840 | 1998-02-04 19:54:40 +0000 | [diff] [blame] | 151 | # Rules to build PostScript and PDF formats | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 152 | .SUFFIXES: .dvi .ps .pdf | 
| Fred Drake | 126d840 | 1998-02-04 19:54:40 +0000 | [diff] [blame] | 153 |  | 
|  | 154 | .dvi.ps: | 
| Fred Drake | 9fab3aa | 1998-04-28 19:20:43 +0000 | [diff] [blame] | 155 | $(DVIPS) -o $@ $< | 
| Fred Drake | 126d840 | 1998-02-04 19:54:40 +0000 | [diff] [blame] | 156 |  | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 157 | #.pdf.ps: | 
|  | 158 | #	$(ACROREAD) -toPostScript $< | 
| Fred Drake | 126d840 | 1998-02-04 19:54:40 +0000 | [diff] [blame] | 159 |  | 
| Fred Drake | 3b26eed | 1998-02-16 17:06:10 +0000 | [diff] [blame] | 160 |  | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 161 | # Dependencies | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 162 | # We really need some support of dependency generator for this... | 
|  | 163 |  | 
|  | 164 | MANSTYLES=texinputs/fncychap.sty texinputs/manual.cls \ | 
|  | 165 | texinputs/python.sty texinputs/myindex.ist | 
|  | 166 |  | 
| Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 167 | COMMONTEX=$(MANSTYLES) texinputs/copyright.tex texinputs/boilerplate.tex | 
| Fred Drake | 5d8f0ed | 1998-02-11 14:43:38 +0000 | [diff] [blame] | 168 |  | 
| Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 169 | $(DVIFILES): tools/fix_hack tools/mkdvi.sh $(COMMONTEX) | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 170 | $(PDFFILES): tools/fix_hack tools/mkdvi.sh $(COMMONTEX) | 
| Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 171 |  | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 172 | REFFILES = ref/ref1.tex ref/ref2.tex ref/ref3.tex ref/ref4.tex \ | 
|  | 173 | ref/ref5.tex ref/ref6.tex ref/ref7.tex ref/ref8.tex | 
| Fred Drake | a6bb396 | 1998-05-06 19:51:39 +0000 | [diff] [blame] | 174 |  | 
| Guido van Rossum | 16d6e71 | 1994-08-08 12:30:22 +0000 | [diff] [blame] | 175 | # LaTeX source files for the Python Library Reference | 
| Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 176 | LIBFILES = lib/lib.tex \ | 
|  | 177 | lib/libintro.tex lib/libobjs.tex lib/libtypes.tex lib/libexcs.tex \ | 
|  | 178 | lib/libfuncs.tex lib/libpython.tex lib/libsys.tex lib/libtypes2.tex \ | 
|  | 179 | lib/libtraceback.tex lib/libpickle.tex lib/libshelve.tex \ | 
|  | 180 | lib/libcopy.tex lib/libmarshal.tex lib/libimp.tex lib/libparser.tex \ | 
|  | 181 | lib/libbltin.tex lib/libmain.tex lib/libstrings.tex lib/libstring.tex \ | 
|  | 182 | lib/libregex.tex lib/libregsub.tex lib/libstruct.tex lib/libmisc.tex \ | 
|  | 183 | lib/libmath.tex lib/librand.tex lib/libwhrandom.tex lib/libarray.tex \ | 
|  | 184 | lib/liballos.tex lib/libos.tex lib/libtime.tex lib/libgetopt.tex \ | 
|  | 185 | lib/libtempfile.tex lib/liberrno.tex lib/libsomeos.tex lib/libsignal.tex \ | 
|  | 186 | lib/libsocket.tex lib/libselect.tex lib/libthread.tex lib/libunix.tex \ | 
|  | 187 | lib/libposix.tex lib/libppath.tex lib/libpwd.tex lib/libgrp.tex \ | 
|  | 188 | lib/libcrypt.tex lib/libdbm.tex lib/libgdbm.tex lib/libtermios.tex \ | 
|  | 189 | lib/libfcntl.tex lib/libposixfile.tex lib/libsyslog.tex lib/libpdb.tex \ | 
|  | 190 | lib/libprofile.tex lib/libwww.tex lib/libcgi.tex lib/liburllib.tex \ | 
|  | 191 | lib/libhttplib.tex lib/libftplib.tex lib/libgopherlib.tex \ | 
|  | 192 | lib/libnntplib.tex lib/liburlparse.tex lib/libhtmllib.tex \ | 
|  | 193 | lib/libsgmllib.tex lib/librfc822.tex lib/libmimetools.tex \ | 
|  | 194 | lib/libbinascii.tex lib/libmm.tex lib/libaudioop.tex lib/libimageop.tex \ | 
|  | 195 | lib/libaifc.tex lib/libjpeg.tex lib/librgbimg.tex lib/libcrypto.tex \ | 
|  | 196 | lib/libmd5.tex lib/libmpz.tex lib/librotor.tex lib/libstdwin.tex \ | 
|  | 197 | lib/libsgi.tex lib/libal.tex lib/libcd.tex lib/libfl.tex lib/libfm.tex \ | 
|  | 198 | lib/libgl.tex lib/libimgfile.tex lib/libsun.tex lib/libxdrlib.tex \ | 
|  | 199 | lib/libimghdr.tex lib/librestricted.tex lib/librexec.tex \ | 
|  | 200 | lib/libbastion.tex lib/libformatter.tex lib/liboperator.tex \ | 
|  | 201 | lib/libsoundex.tex lib/libresource.tex lib/libstat.tex lib/libstrio.tex \ | 
|  | 202 | lib/libundoc.tex lib/libmailcap.tex lib/libglob.tex lib/libuser.tex \ | 
|  | 203 | lib/libanydbm.tex lib/librandom.tex lib/libsite.tex lib/libwhichdb.tex \ | 
|  | 204 | lib/libbase64.tex lib/libfnmatch.tex lib/libquopri.tex lib/libzlib.tex \ | 
|  | 205 | lib/libsocksvr.tex lib/libmailbox.tex lib/libcommands.tex \ | 
|  | 206 | lib/libcmath.tex lib/libgzip.tex lib/libpprint.tex \ | 
|  | 207 | lib/libcode.tex lib/libmimify.tex lib/libre.tex lib/libuserdict.tex \ | 
|  | 208 | lib/libdis.tex lib/libxmllib.tex lib/libqueue.tex lib/liblocale.tex \ | 
|  | 209 | lib/libbasehttp.tex lib/libcopyreg.tex lib/libsymbol.tex lib/libtoken.tex \ | 
|  | 210 | lib/libbinhex.tex lib/libuu.tex \ | 
|  | 211 | lib/libsunaudio.tex lib/libfileinput.tex lib/libimaplib.tex \ | 
|  | 212 | lib/libpoplib.tex lib/libcalendar.tex lib/libpopen2.tex lib/libbisect.tex | 
| Guido van Rossum | 16d6e71 | 1994-08-08 12:30:22 +0000 | [diff] [blame] | 213 |  | 
| Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 214 | # LaTeX source files for Macintosh Library Modules. | 
|  | 215 | MACLIBFILES = mac/mac.tex mac/libmac.tex mac/libctb.tex mac/libmacconsole.tex \ | 
|  | 216 | mac/libmacdnr.tex mac/libmacfs.tex mac/libmacos.tex mac/libmacostools.tex \ | 
|  | 217 | mac/libmactcp.tex mac/libmacspeech.tex mac/libmacui.tex mac/libmacic.tex \ | 
|  | 218 | mac/libframework.tex mac/libminiae.tex | 
| Fred Drake | bdbdb80 | 1998-04-17 14:01:44 +0000 | [diff] [blame] | 219 |  | 
| Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 220 | # Python Library Reference | 
| Fred Drake | 520f8bd | 1998-03-09 16:43:54 +0000 | [diff] [blame] | 221 | lib.dvi: tools/indfix.py $(LIBFILES) | 
| Fred Drake | 3af9f25 | 1998-04-24 21:07:22 +0000 | [diff] [blame] | 222 | $(srcdir)/tools/newind.py >$*.ind | 
|  | 223 | $(srcdir)/tools/newind.py modindex >mod$*.ind | 
| Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 224 | TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(LATEX) $* | 
| Fred Drake | 8bc9657 | 1998-03-09 16:37:52 +0000 | [diff] [blame] | 225 | $(MAKEINDEX) mod$*.idx | 
| Fred Drake | 3af9f25 | 1998-04-24 21:07:22 +0000 | [diff] [blame] | 226 | $(srcdir)/tools/fix_hack $*.idx | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 227 | $(MAKEINDEX) $*.idx | 
| Fred Drake | 3af9f25 | 1998-04-24 21:07:22 +0000 | [diff] [blame] | 228 | $(srcdir)/tools/indfix.py $*.ind | 
| Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 229 | TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(LATEX) $* | 
| Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 230 |  | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 231 | lib.pdf: tools/indfix.py $(LIBFILES) | 
|  | 232 | $(srcdir)/tools/newind.py >$*.ind | 
|  | 233 | $(srcdir)/tools/newind.py modindex >mod$*.ind | 
|  | 234 | TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(PDFLATEX) $* | 
|  | 235 | $(MAKEINDEX) mod$*.idx | 
|  | 236 | $(srcdir)/tools/fix_hack $*.idx | 
|  | 237 | $(MAKEINDEX) $*.idx | 
|  | 238 | $(srcdir)/tools/indfix.py $*.ind | 
|  | 239 | TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(PDFLATEX) $* | 
|  | 240 |  | 
| Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 241 | # Python/C API Reference Manual | 
|  | 242 | api.dvi: api/api.tex | 
|  | 243 | $(MKDVI) api | 
| Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 244 |  | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 245 | api.pdf: api/api.tex | 
|  | 246 | $(MKPDF) api | 
|  | 247 |  | 
| Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 248 | # Extending and Embedding the Python Interpreter | 
|  | 249 | ext.dvi: ext/ext.tex | 
|  | 250 | $(MKDVI) ext | 
|  | 251 |  | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 252 | ext.pdf: ext/ext.tex | 
|  | 253 | $(MKPDF) ext | 
|  | 254 |  | 
| Fred Drake | cdbd391 | 1998-05-15 17:02:10 +0000 | [diff] [blame] | 255 | # Macintosh Library Modules | 
|  | 256 | mac.dvi: $(MACLIBFILES) tools/mkhowto.sh | 
|  | 257 | $(MKHOWTO) --dvi $(srcdir)/$*/$*.tex | 
|  | 258 |  | 
|  | 259 | mac.pdf: $(MACLIBFILES) tools/mkhowto.sh | 
|  | 260 | $(MKHOWTO) --pdf $(srcdir)/$*/$*.tex | 
|  | 261 |  | 
| Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 262 | # Python Reference Manual | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 263 | ref.dvi: $(REFFILES) | 
| Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 264 | $(MKDVI) ref | 
|  | 265 |  | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 266 | ref.pdf: $(REFFILES) | 
|  | 267 | $(MKPDF) ref | 
|  | 268 |  | 
| Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 269 | # Python Tutorial | 
|  | 270 | tut.dvi: tut/tut.tex | 
|  | 271 | $(MKDVI) tut | 
| Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 272 |  | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 273 | tut.pdf: tut/tut.tex | 
|  | 274 | $(MKPDF) tut | 
|  | 275 |  | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 276 |  | 
|  | 277 | # The remaining part of the Makefile is concerned with various | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 278 | # conversions, as described above.  See also the README file. | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 279 |  | 
| Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 280 | .PHONY: html info | 
| Fred Drake | 05dd3c0 | 1997-12-29 17:17:54 +0000 | [diff] [blame] | 281 |  | 
| Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 282 | info: | 
|  | 283 | (cd $(INFODIR); $(MAKE)) | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 284 |  | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 285 | # Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to | 
|  | 286 | # HTML converter.  For more info on this program, see | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 287 | # <URL:http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html>. | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 288 |  | 
| Guido van Rossum | 9cb6480 | 1997-12-29 20:01:55 +0000 | [diff] [blame] | 289 | # Note that LaTeX2HTML inserts references to an icons directory in | 
|  | 290 | # each page that it generates.  I have placed a copy of this directory | 
|  | 291 | # in the distribution to simplify the process of creating a | 
|  | 292 | # self-contained HTML distribution; for this purpose I have also added | 
|  | 293 | # a (trivial) index.html.  Change the definition of $ICONSERVER in | 
| Fred Drake | 9fab3aa | 1998-04-28 19:20:43 +0000 | [diff] [blame] | 294 | # perl/l2hinit.perl to use a different location for the icons directory. | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 295 |  | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 296 | COMMONPERL=perl/manual.perl perl/python.perl | 
| Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 297 |  | 
| Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 298 | html:	l2h | 
|  | 299 |  | 
| Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 300 | l2h: | 
| Fred Drake | e593b62 | 1998-05-15 17:50:32 +0000 | [diff] [blame^] | 301 | (cd $(HTMLDIR); $(MAKE) TEXINPUTS=../paper-$(PAPER):../texinputs: \ | 
|  | 302 | -f ../html/Makefile) | 
| Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 303 |  | 
| Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 304 | l2hapi: $(COMMONPERL) | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 305 | $(MKHTML) api $(L2HARGS) | 
| Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 306 |  | 
| Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 307 | l2hext: $(COMMONPERL) | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 308 | $(MKHTML) ext $(L2HARGS) | 
| Guido van Rossum | 970871f | 1993-02-21 20:10:26 +0000 | [diff] [blame] | 309 |  | 
| Fred Drake | cdbd391 | 1998-05-15 17:02:10 +0000 | [diff] [blame] | 310 | l2hlib: $(COMMONPERL) $(LIBFILES) | 
| Fred Drake | 9fab3aa | 1998-04-28 19:20:43 +0000 | [diff] [blame] | 311 | $(srcdir)/tools/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux | 
|  | 312 | mv lib1.aux `$(KPSEWHICH) lib.aux` | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 313 | $(MKHTML) lib $(L2HARGS) | 
| Fred Drake | a6bb396 | 1998-05-06 19:51:39 +0000 | [diff] [blame] | 314 |  | 
| Fred Drake | cdbd391 | 1998-05-15 17:02:10 +0000 | [diff] [blame] | 315 | l2hmac: $(COMMONPERL) $(MACLIBFILES) | 
|  | 316 | $(srcdir)/tools/mkhowto.sh --html $(srcdir)/mac/mac.tex | 
|  | 317 |  | 
| Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 318 | l2href: $(COMMONPERL) | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 319 | $(MKHTML) ref $(L2HARGS) | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 320 |  | 
| Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 321 | l2htut: $(COMMONPERL) | 
| Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 322 | $(MKHTML) tut $(L2HARGS) | 
| Guido van Rossum | 9231c8f | 1997-05-15 21:43:21 +0000 | [diff] [blame] | 323 |  | 
| Fred Drake | e4837a1 | 1998-03-06 21:29:34 +0000 | [diff] [blame] | 324 | # webchecker needs an extra flag to process the huge index from the libref | 
|  | 325 | webcheck: | 
| Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 326 | $(WEBCHECKER) file:`pwd`/api/ | 
|  | 327 | $(WEBCHECKER) file:`pwd`/ext/ | 
|  | 328 | $(WEBCHECKER) -m290000 file:`pwd`/lib/ | 
| Fred Drake | e593b62 | 1998-05-15 17:50:32 +0000 | [diff] [blame^] | 329 | $(WEBCHECKER) file:`pwd`/mac/ | 
| Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 330 | $(WEBCHECKER) file:`pwd`/ref/ | 
|  | 331 | $(WEBCHECKER) file:`pwd`/tut/ | 
| Fred Drake | e4837a1 | 1998-03-06 21:29:34 +0000 | [diff] [blame] | 332 |  | 
| Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 333 | lib-info-$(RELEASE).tgz: info | 
| Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 334 | (cd $(INFODIR); tar cf - python-???.info*) | gzip -9 >$@ | 
| Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 335 |  | 
| Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 336 | latex-$(RELEASE).tgz: | 
| Fred Drake | 29cabd4 | 1998-05-11 18:53:07 +0000 | [diff] [blame] | 337 | $(srcdir)/tools/mktarball.sh $(RELEASE) | 
| Fred Drake | e61d7af | 1998-03-05 16:37:34 +0000 | [diff] [blame] | 338 |  | 
| Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 339 | pdf-$(PAPER)-$(RELEASE).tgz: all-pdf | 
| Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 340 | (cd paper-$(PAPER); tar cf - $(PDFFILES)) | gzip -9 >$@ | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 341 |  | 
| Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 342 | postscript-$(PAPER)-$(RELEASE).tgz: all-ps | 
| Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 343 | (cd paper-$(PAPER); tar cf - $(PSFILES)) | gzip -9 >$@ | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 344 |  | 
| Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 345 | html-$(RELEASE).tgz: | 
|  | 346 | (cd $(HTMLDIR); tar cf - index.html ???/???.css ???/*.html */*.gif) \ | 
| Fred Drake | 29cabd4 | 1998-05-11 18:53:07 +0000 | [diff] [blame] | 347 | | gzip -9 >$@ | 
| Fred Drake | 33d05b9 | 1998-01-13 16:33:09 +0000 | [diff] [blame] | 348 |  | 
| Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 349 | # convenience targets: | 
|  | 350 |  | 
| Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 351 | tarhtml:  html-$(RELEASE).tgz | 
| Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 352 |  | 
| Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 353 | tarinfo:  lib-info-$(RELEASE).tgz | 
| Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 354 |  | 
| Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 355 | tarps:	postscript-$(PAPER)-$(RELEASE).tgz | 
| Fred Drake | 33d05b9 | 1998-01-13 16:33:09 +0000 | [diff] [blame] | 356 |  | 
| Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 357 | tarpdf:	pdf-$(PAPER)-$(RELEASE).tgz | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 358 |  | 
| Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 359 | tarlatex: latex-$(RELEASE).tgz | 
| Fred Drake | e61d7af | 1998-03-05 16:37:34 +0000 | [diff] [blame] | 360 |  | 
| Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 361 | tarballs:  tarpdf tarps tarhtml tarinfo tarlatex | 
| Guido van Rossum | 84cca44 | 1997-11-25 20:49:09 +0000 | [diff] [blame] | 362 |  | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 363 |  | 
|  | 364 | # Housekeeping targets | 
|  | 365 |  | 
| Guido van Rossum | 9231c8f | 1997-05-15 21:43:21 +0000 | [diff] [blame] | 366 | # Remove temporary files; all except the following: | 
| Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 367 | # - sources: .tex, .bib, .sty, *.cls | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 368 | # - useful results: .dvi, .pdf, .ps, .texi, .info | 
| Fred Drake | e4837a1 | 1998-03-06 21:29:34 +0000 | [diff] [blame] | 369 | clean: | 
| Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 370 | (cd paper-$(PAPER); rm -f *~ *.aux *.idx *.ilg *.ind *.log *.toc *.bkm) | 
| Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 371 | (cd $(INFODIR); $(MAKE) clean) | 
| Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 372 | (cd $(HTMLDIR); rm -f @webchecker.pickle) | 
| Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 373 | rm -f html-$(RELEASE).tgz info-$(RELEASE).tgz | 
|  | 374 | rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz | 
|  | 375 | rm -f latex-$(RELEASE).tgz | 
| Guido van Rossum | 5b34373 | 1992-07-07 09:06:34 +0000 | [diff] [blame] | 376 |  | 
| Fred Drake | 03ff6f7 | 1997-08-22 18:18:54 +0000 | [diff] [blame] | 377 | l2hclean: | 
| Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 378 | (cd $(HTMLDIR); rm -rf api ext lib ref tut) | 
| Fred Drake | 03ff6f7 | 1997-08-22 18:18:54 +0000 | [diff] [blame] | 379 |  | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 380 | # Remove temporaries as well as final products | 
| Fred Drake | e4837a1 | 1998-03-06 21:29:34 +0000 | [diff] [blame] | 381 | clobber: clean l2hclean | 
| Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 382 | (cd paper-$(PAPER); rm -f $(DVIFILES) $(PSFILES) $(PDFFILES)) | 
| Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 383 | (cd $(INFODIR); $(MAKE) clobber) | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 384 |  | 
|  | 385 | realclean:  clobber | 
|  | 386 | distclean:  clobber |