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 | 465a42a | 1998-07-23 18:10:51 +0000 | [diff] [blame] | 93 | all-dvi 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 | 465a42a | 1998-07-23 18:10:51 +0000 | [diff] [blame] | 98 | all-pdf 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 | 465a42a | 1998-07-23 18:10:51 +0000 | [diff] [blame] | 103 | all-ps 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 \ |
Fred Drake | 8e7c826 | 1998-06-22 17:14:47 +0000 | [diff] [blame] | 165 | texinputs/python.sty texinputs/pypaper.sty texinputs/myindex.ist |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 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 \ |
Fred Drake | edde150 | 1998-05-19 15:04:21 +0000 | [diff] [blame] | 212 | lib/libpoplib.tex lib/libcalendar.tex lib/libpopen2.tex \ |
Guido van Rossum | f78a52c | 1998-06-28 17:57:05 +0000 | [diff] [blame] | 213 | lib/libbisect.tex lib/libmimetypes.tex lib/libsmtplib.tex lib/libcmd.tex \ |
Fred Drake | a9f445c | 1998-07-20 14:01:20 +0000 | [diff] [blame] | 214 | lib/libmultifile.tex lib/libthreading.tex |
Guido van Rossum | 16d6e71 | 1994-08-08 12:30:22 +0000 | [diff] [blame] | 215 | |
Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 216 | # LaTeX source files for Macintosh Library Modules. |
| 217 | MACLIBFILES = mac/mac.tex mac/libmac.tex mac/libctb.tex mac/libmacconsole.tex \ |
| 218 | mac/libmacdnr.tex mac/libmacfs.tex mac/libmacos.tex mac/libmacostools.tex \ |
| 219 | mac/libmactcp.tex mac/libmacspeech.tex mac/libmacui.tex mac/libmacic.tex \ |
| 220 | mac/libframework.tex mac/libminiae.tex |
Fred Drake | bdbdb80 | 1998-04-17 14:01:44 +0000 | [diff] [blame] | 221 | |
Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 222 | # Python Library Reference |
Fred Drake | 520f8bd | 1998-03-09 16:43:54 +0000 | [diff] [blame] | 223 | lib.dvi: tools/indfix.py $(LIBFILES) |
Fred Drake | 3af9f25 | 1998-04-24 21:07:22 +0000 | [diff] [blame] | 224 | $(srcdir)/tools/newind.py >$*.ind |
| 225 | $(srcdir)/tools/newind.py modindex >mod$*.ind |
Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 226 | TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(LATEX) $* |
Fred Drake | 8bc9657 | 1998-03-09 16:37:52 +0000 | [diff] [blame] | 227 | $(MAKEINDEX) mod$*.idx |
Fred Drake | 3af9f25 | 1998-04-24 21:07:22 +0000 | [diff] [blame] | 228 | $(srcdir)/tools/fix_hack $*.idx |
Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 229 | $(MAKEINDEX) $*.idx |
Fred Drake | 3af9f25 | 1998-04-24 21:07:22 +0000 | [diff] [blame] | 230 | $(srcdir)/tools/indfix.py $*.ind |
Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 231 | TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(LATEX) $* |
Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 232 | |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 233 | lib.pdf: tools/indfix.py $(LIBFILES) |
| 234 | $(srcdir)/tools/newind.py >$*.ind |
| 235 | $(srcdir)/tools/newind.py modindex >mod$*.ind |
| 236 | TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(PDFLATEX) $* |
| 237 | $(MAKEINDEX) mod$*.idx |
| 238 | $(srcdir)/tools/fix_hack $*.idx |
| 239 | $(MAKEINDEX) $*.idx |
| 240 | $(srcdir)/tools/indfix.py $*.ind |
| 241 | TEXINPUTS=$(srcdir)/lib:$(TEXINPUTS) $(PDFLATEX) $* |
| 242 | |
Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 243 | # Python/C API Reference Manual |
| 244 | api.dvi: api/api.tex |
| 245 | $(MKDVI) api |
Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 246 | |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 247 | api.pdf: api/api.tex |
| 248 | $(MKPDF) api |
| 249 | |
Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 250 | # Extending and Embedding the Python Interpreter |
| 251 | ext.dvi: ext/ext.tex |
| 252 | $(MKDVI) ext |
| 253 | |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 254 | ext.pdf: ext/ext.tex |
| 255 | $(MKPDF) ext |
| 256 | |
Fred Drake | cdbd391 | 1998-05-15 17:02:10 +0000 | [diff] [blame] | 257 | # Macintosh Library Modules |
| 258 | mac.dvi: $(MACLIBFILES) tools/mkhowto.sh |
| 259 | $(MKHOWTO) --dvi $(srcdir)/$*/$*.tex |
| 260 | |
| 261 | mac.pdf: $(MACLIBFILES) tools/mkhowto.sh |
| 262 | $(MKHOWTO) --pdf $(srcdir)/$*/$*.tex |
| 263 | |
Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 264 | # Python Reference Manual |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 265 | ref.dvi: $(REFFILES) |
Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 266 | $(MKDVI) ref |
| 267 | |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 268 | ref.pdf: $(REFFILES) |
| 269 | $(MKPDF) ref |
| 270 | |
Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 271 | # Python Tutorial |
| 272 | tut.dvi: tut/tut.tex |
| 273 | $(MKDVI) tut |
Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 274 | |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 275 | tut.pdf: tut/tut.tex |
| 276 | $(MKPDF) tut |
| 277 | |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 278 | |
| 279 | # The remaining part of the Makefile is concerned with various |
Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 280 | # conversions, as described above. See also the README file. |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 281 | |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 282 | .PHONY: html info |
Fred Drake | 05dd3c0 | 1997-12-29 17:17:54 +0000 | [diff] [blame] | 283 | |
Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 284 | info: |
| 285 | (cd $(INFODIR); $(MAKE)) |
Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 286 | |
Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 287 | # Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to |
| 288 | # HTML converter. For more info on this program, see |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 289 | # <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] | 290 | |
Guido van Rossum | 9cb6480 | 1997-12-29 20:01:55 +0000 | [diff] [blame] | 291 | # Note that LaTeX2HTML inserts references to an icons directory in |
| 292 | # each page that it generates. I have placed a copy of this directory |
| 293 | # in the distribution to simplify the process of creating a |
| 294 | # self-contained HTML distribution; for this purpose I have also added |
| 295 | # a (trivial) index.html. Change the definition of $ICONSERVER in |
Fred Drake | 9fab3aa | 1998-04-28 19:20:43 +0000 | [diff] [blame] | 296 | # 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] | 297 | |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 298 | COMMONPERL=perl/manual.perl perl/python.perl |
Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 299 | |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 300 | html: l2h |
| 301 | |
Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 302 | l2h: |
Fred Drake | e593b62 | 1998-05-15 17:50:32 +0000 | [diff] [blame] | 303 | (cd $(HTMLDIR); $(MAKE) TEXINPUTS=../paper-$(PAPER):../texinputs: \ |
| 304 | -f ../html/Makefile) |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 305 | |
Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 306 | l2hapi: $(COMMONPERL) |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 307 | $(MKHTML) api $(L2HARGS) |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 308 | |
Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 309 | l2hext: $(COMMONPERL) |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 310 | $(MKHTML) ext $(L2HARGS) |
Guido van Rossum | 970871f | 1993-02-21 20:10:26 +0000 | [diff] [blame] | 311 | |
Fred Drake | cdbd391 | 1998-05-15 17:02:10 +0000 | [diff] [blame] | 312 | l2hlib: $(COMMONPERL) $(LIBFILES) |
Fred Drake | 9fab3aa | 1998-04-28 19:20:43 +0000 | [diff] [blame] | 313 | $(srcdir)/tools/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux |
| 314 | mv lib1.aux `$(KPSEWHICH) lib.aux` |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 315 | $(MKHTML) lib $(L2HARGS) |
Fred Drake | a6bb396 | 1998-05-06 19:51:39 +0000 | [diff] [blame] | 316 | |
Fred Drake | cdbd391 | 1998-05-15 17:02:10 +0000 | [diff] [blame] | 317 | l2hmac: $(COMMONPERL) $(MACLIBFILES) |
| 318 | $(srcdir)/tools/mkhowto.sh --html $(srcdir)/mac/mac.tex |
| 319 | |
Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 320 | l2href: $(COMMONPERL) |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 321 | $(MKHTML) ref $(L2HARGS) |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 322 | |
Fred Drake | 9cdf087 | 1998-05-07 15:03:25 +0000 | [diff] [blame] | 323 | l2htut: $(COMMONPERL) |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 324 | $(MKHTML) tut $(L2HARGS) |
Guido van Rossum | 9231c8f | 1997-05-15 21:43:21 +0000 | [diff] [blame] | 325 | |
Fred Drake | e4837a1 | 1998-03-06 21:29:34 +0000 | [diff] [blame] | 326 | # webchecker needs an extra flag to process the huge index from the libref |
| 327 | webcheck: |
Fred Drake | 79c0f0e | 1998-05-19 18:04:13 +0000 | [diff] [blame] | 328 | $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/api/ |
| 329 | $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ext/ |
| 330 | $(WEBCHECKER) -m290000 file:`pwd`/$(HTMLDIR)/lib/ |
| 331 | $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/mac/ |
| 332 | $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ref/ |
| 333 | $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/tut/ |
Fred Drake | e4837a1 | 1998-03-06 21:29:34 +0000 | [diff] [blame] | 334 | |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 335 | lib-info-$(RELEASE).tgz: info |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 336 | (cd $(INFODIR); tar cf - python-???.info*) | gzip -9 >$@ |
Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 337 | |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 338 | latex-$(RELEASE).tgz: |
Fred Drake | 29cabd4 | 1998-05-11 18:53:07 +0000 | [diff] [blame] | 339 | $(srcdir)/tools/mktarball.sh $(RELEASE) |
Fred Drake | e61d7af | 1998-03-05 16:37:34 +0000 | [diff] [blame] | 340 | |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 341 | pdf-$(PAPER)-$(RELEASE).tgz: all-pdf |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 342 | (cd paper-$(PAPER); tar cf - $(PDFFILES)) | gzip -9 >$@ |
Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 343 | |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 344 | postscript-$(PAPER)-$(RELEASE).tgz: all-ps |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 345 | (cd paper-$(PAPER); tar cf - $(PSFILES)) | gzip -9 >$@ |
Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 346 | |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 347 | html-$(RELEASE).tgz: |
| 348 | (cd $(HTMLDIR); tar cf - index.html ???/???.css ???/*.html */*.gif) \ |
Fred Drake | 29cabd4 | 1998-05-11 18:53:07 +0000 | [diff] [blame] | 349 | | gzip -9 >$@ |
Fred Drake | 33d05b9 | 1998-01-13 16:33:09 +0000 | [diff] [blame] | 350 | |
Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 351 | # convenience targets: |
| 352 | |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 353 | tarhtml: html-$(RELEASE).tgz |
Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 354 | |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 355 | tarinfo: lib-info-$(RELEASE).tgz |
Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 356 | |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 357 | tarps: postscript-$(PAPER)-$(RELEASE).tgz |
Fred Drake | 33d05b9 | 1998-01-13 16:33:09 +0000 | [diff] [blame] | 358 | |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 359 | tarpdf: pdf-$(PAPER)-$(RELEASE).tgz |
Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 360 | |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 361 | tarlatex: latex-$(RELEASE).tgz |
Fred Drake | e61d7af | 1998-03-05 16:37:34 +0000 | [diff] [blame] | 362 | |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 363 | tarballs: tarpdf tarps tarhtml tarinfo tarlatex |
Guido van Rossum | 84cca44 | 1997-11-25 20:49:09 +0000 | [diff] [blame] | 364 | |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 365 | |
| 366 | # Housekeeping targets |
| 367 | |
Guido van Rossum | 9231c8f | 1997-05-15 21:43:21 +0000 | [diff] [blame] | 368 | # Remove temporary files; all except the following: |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 369 | # - sources: .tex, .bib, .sty, *.cls |
Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 370 | # - useful results: .dvi, .pdf, .ps, .texi, .info |
Fred Drake | e4837a1 | 1998-03-06 21:29:34 +0000 | [diff] [blame] | 371 | clean: |
Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 372 | (cd paper-$(PAPER); rm -f *~ *.aux *.idx *.ilg *.ind *.log *.toc *.bkm) |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 373 | (cd $(INFODIR); $(MAKE) clean) |
Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 374 | (cd $(HTMLDIR); rm -f @webchecker.pickle) |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 375 | rm -f html-$(RELEASE).tgz info-$(RELEASE).tgz |
| 376 | rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz |
| 377 | rm -f latex-$(RELEASE).tgz |
Guido van Rossum | 5b34373 | 1992-07-07 09:06:34 +0000 | [diff] [blame] | 378 | |
Fred Drake | 03ff6f7 | 1997-08-22 18:18:54 +0000 | [diff] [blame] | 379 | l2hclean: |
Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 380 | (cd $(HTMLDIR); rm -rf api ext lib ref tut) |
Fred Drake | 03ff6f7 | 1997-08-22 18:18:54 +0000 | [diff] [blame] | 381 | |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 382 | # Remove temporaries as well as final products |
Fred Drake | e4837a1 | 1998-03-06 21:29:34 +0000 | [diff] [blame] | 383 | clobber: clean l2hclean |
Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 384 | (cd paper-$(PAPER); rm -f $(DVIFILES) $(PSFILES) $(PDFFILES)) |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 385 | (cd $(INFODIR); $(MAKE) clobber) |
Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 386 | |
| 387 | realclean: clobber |
| 388 | distclean: clobber |