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