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