| 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 | # | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 22 | # There's one local style file: myformat.sty.  This defines a number | 
|  | 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? | 
|  | 49 | LATEX=		latex | 
| Fred Drake | 3b26eed | 1998-02-16 17:06:10 +0000 | [diff] [blame] | 50 | PDFLATEX=	pdflatex | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 51 | BIBTEX=		bibtex | 
| Guido van Rossum | 5344d4f | 1997-10-05 18:51:02 +0000 | [diff] [blame] | 52 | DVIPS=		dvips -f -N0 | 
| Fred Drake | 126d840 | 1998-02-04 19:54:40 +0000 | [diff] [blame] | 53 | DISTILL=	distill | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 54 | MAKEINDEX=	makeindex | 
| Fred Drake | f93f101 | 1996-10-29 16:07:46 +0000 | [diff] [blame] | 55 | L2H=		latex2html | 
| Guido van Rossum | 0f280b6 | 1997-12-01 18:50:09 +0000 | [diff] [blame] | 56 | L2HARGS=	-address $$LOGNAME@`domainname` | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 57 |  | 
|  | 58 | # Install destination -- not used now but might be useful some time... | 
|  | 59 | DESTDIR=	/usr/local | 
|  | 60 | LIBDESTDIR=	$DESTDIR/lib | 
|  | 61 | LIBDEST=	$LIBDESTDIR/python | 
|  | 62 | DOCDESTDIR=	$LIBDEST/doc | 
|  | 63 |  | 
| Fred Drake | 05dd3c0 | 1997-12-29 17:17:54 +0000 | [diff] [blame] | 64 | # This is only used for .info generation: | 
|  | 65 | EMACS=		emacs | 
|  | 66 | PYTHON=		python | 
|  | 67 | MAKEINFO=	makeinfo | 
| Fred Drake | 6eab2fb | 1998-02-13 03:23:33 +0000 | [diff] [blame] | 68 | PARTPARSEOBJ=	partparse.pyc | 
|  | 69 | PARTPARSE=	$(PYTHON) $(PARTPARSEOBJ) | 
| Fred Drake | 05dd3c0 | 1997-12-29 17:17:54 +0000 | [diff] [blame] | 70 |  | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 71 | # Ideally, you shouldn't need to edit beyond this point | 
| Guido van Rossum | 5b34373 | 1992-07-07 09:06:34 +0000 | [diff] [blame] | 72 |  | 
| Fred Drake | 33d05b9 | 1998-01-13 16:33:09 +0000 | [diff] [blame] | 73 | VERSION=1.5 | 
|  | 74 |  | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 75 | DVIFILES=	api.dvi ext.dvi lib.dvi tut.dvi | 
| Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 76 | INFOFILES=	python-lib.info | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 77 | PDFFILES=	api.pdf ext.pdf lib.pdf tut.pdf | 
|  | 78 | PSFILES=	api.ps ext.ps lib.ps tut.ps | 
|  | 79 |  | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 80 | # Main target | 
| Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 81 | all:	all-ps | 
|  | 82 |  | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 83 | all-dvi: $(DVIFILES) | 
|  | 84 | all-pdf: $(PDFFILES) | 
|  | 85 | all-ps:	 $(PSFILES) | 
| Guido van Rossum | 20aca5a | 1991-01-25 13:29:04 +0000 | [diff] [blame] | 86 |  | 
| Fred Drake | 5fd242b | 1998-02-17 18:20:30 +0000 | [diff] [blame] | 87 | # This target gets both the PDF and PS files updated; the all-pdf target | 
|  | 88 | # above doesn't ensure that both are done if the "alternate" rule (using | 
|  | 89 | # pdflatex) for PDF generation is used. | 
| Fred Drake | ddae414 | 1998-02-17 15:45:25 +0000 | [diff] [blame] | 90 | # | 
|  | 91 | all-formats:  $(PSFILES) $(PDFFILES) | 
|  | 92 |  | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 93 | # Individual document fake targets | 
| Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 94 | tut:	tut.ps | 
|  | 95 | lib:	lib.ps | 
| Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 96 | ext:	ext.ps | 
| Guido van Rossum | 9231c8f | 1997-05-15 21:43:21 +0000 | [diff] [blame] | 97 | api:	api.ps | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 98 |  | 
| Fred Drake | dd94676 | 1998-02-18 16:02:14 +0000 | [diff] [blame] | 99 | # All formats for a single document | 
|  | 100 | api-all:  api.dvi api.pdf api.ps l2hapi | 
|  | 101 | ext-all:  ext.dvi ext.pdf ext.ps l2hext | 
|  | 102 | lib-all:  lib.dvi lib.pdf lib.ps l2hlib | 
|  | 103 | tut-all:  tut.dvi tut.pdf tut.ps l2htut | 
|  | 104 |  | 
|  | 105 |  | 
| Fred Drake | 126d840 | 1998-02-04 19:54:40 +0000 | [diff] [blame] | 106 | # Rules to build PostScript and PDF formats | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 107 | .SUFFIXES: .dvi .ps .pdf .tex | 
| Fred Drake | 126d840 | 1998-02-04 19:54:40 +0000 | [diff] [blame] | 108 |  | 
|  | 109 | .dvi.ps: | 
|  | 110 | $(DVIPS) $< >$@ | 
|  | 111 |  | 
| Fred Drake | ddae414 | 1998-02-17 15:45:25 +0000 | [diff] [blame] | 112 | #.ps.pdf: | 
|  | 113 | #	$(DISTILL) $< | 
| Fred Drake | 126d840 | 1998-02-04 19:54:40 +0000 | [diff] [blame] | 114 |  | 
| Fred Drake | 3b26eed | 1998-02-16 17:06:10 +0000 | [diff] [blame] | 115 | # An alternate formulation of PDF creation; requires latex format with | 
|  | 116 | # pdftex.  To use this instead of the Acrobat distiller solution, comment | 
|  | 117 | # out the above .ps.pdf rule and uncomment this rule.  This was tested | 
|  | 118 | # using a pre-release of the teTeX distribution.  See | 
|  | 119 | # http://www.tug.org/tetex/ for more information on getting & using teTeX. | 
|  | 120 | # This rule avoids creation of the intermediate PostScript files and uses | 
|  | 121 | # only free software. | 
|  | 122 | # | 
| Fred Drake | ddae414 | 1998-02-17 15:45:25 +0000 | [diff] [blame] | 123 | .dvi.pdf: | 
|  | 124 | $(PDFLATEX) $* | 
| Fred Drake | 3b26eed | 1998-02-16 17:06:10 +0000 | [diff] [blame] | 125 |  | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 126 | # Dependencies | 
| Fred Drake | 5d8f0ed | 1998-02-11 14:43:38 +0000 | [diff] [blame] | 127 | COMMONTEX=myformat.sty copyright.tex boilerplate.tex | 
|  | 128 |  | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 129 | $(DVIFILES): fix_hack $(COMMONTEX) | 
| Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 130 |  | 
| Guido van Rossum | 16d6e71 | 1994-08-08 12:30:22 +0000 | [diff] [blame] | 131 | # LaTeX source files for the Python Library Reference | 
|  | 132 | LIBFILES = lib.tex \ | 
| Guido van Rossum | 40006cf | 1996-08-19 22:58:03 +0000 | [diff] [blame] | 133 | libintro.tex libobjs.tex libtypes.tex libexcs.tex libfuncs.tex \ | 
|  | 134 | libpython.tex libsys.tex libtypes2.tex libtraceback.tex libpickle.tex \ | 
|  | 135 | libshelve.tex libcopy.tex libmarshal.tex libimp.tex libparser.tex \ | 
|  | 136 | libbltin.tex libmain.tex libstrings.tex libstring.tex libregex.tex \ | 
|  | 137 | libregsub.tex libstruct.tex libmisc.tex libmath.tex librand.tex \ | 
|  | 138 | libwhrandom.tex libarray.tex liballos.tex libos.tex libtime.tex \ | 
|  | 139 | libgetopt.tex libtempfile.tex liberrno.tex libsomeos.tex libsignal.tex \ | 
|  | 140 | libsocket.tex libselect.tex libthread.tex libunix.tex libposix.tex \ | 
|  | 141 | libppath.tex libpwd.tex libgrp.tex libcrypt.tex libdbm.tex libgdbm.tex \ | 
|  | 142 | libtermios.tex libfcntl.tex libposixfile.tex libsyslog.tex libpdb.tex \ | 
|  | 143 | libprofile.tex libwww.tex libcgi.tex liburllib.tex libhttplib.tex \ | 
|  | 144 | libftplib.tex libgopherlib.tex libnntplib.tex liburlparse.tex \ | 
|  | 145 | libhtmllib.tex libsgmllib.tex librfc822.tex libmimetools.tex \ | 
|  | 146 | libbinascii.tex libmm.tex libaudioop.tex libimageop.tex libaifc.tex \ | 
|  | 147 | libjpeg.tex librgbimg.tex libcrypto.tex libmd5.tex libmpz.tex \ | 
|  | 148 | librotor.tex libmac.tex libctb.tex libmacconsole.tex libmacdnr.tex \ | 
|  | 149 | libmacfs.tex libmacos.tex libmacostools.tex libmactcp.tex \ | 
|  | 150 | libmacspeech.tex libmacui.tex libstdwin.tex libsgi.tex libal.tex \ | 
|  | 151 | 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] | 152 | libxdrlib.tex libimghdr.tex \ | 
|  | 153 | librestricted.tex librexec.tex libbastion.tex \ | 
| Guido van Rossum | 3dd68d3 | 1996-12-31 02:24:54 +0000 | [diff] [blame] | 154 | libformatter.tex liboperator.tex libsoundex.tex libresource.tex \ | 
| Guido van Rossum | 7f3b042 | 1997-03-27 14:56:18 +0000 | [diff] [blame] | 155 | libstat.tex libstrio.tex libundoc.tex libmailcap.tex libglob.tex \ | 
| Guido van Rossum | e76b7a8 | 1997-04-27 21:25:52 +0000 | [diff] [blame] | 156 | libuser.tex libanydbm.tex librandom.tex libsite.tex libwhichdb.tex \ | 
| Guido van Rossum | 41c302f | 1997-06-02 17:36:12 +0000 | [diff] [blame] | 157 | libbase64.tex libfnmatch.tex libquopri.tex libzlib.tex libsocksvr.tex \ | 
| Fred Drake | 18600a4 | 1997-07-18 20:43:27 +0000 | [diff] [blame] | 158 | libmailbox.tex libcommands.tex libcmath.tex libni.tex libgzip.tex \ | 
| Guido van Rossum | 36764b8 | 1997-08-30 20:02:25 +0000 | [diff] [blame] | 159 | libpprint.tex libcode.tex libmimify.tex libre.tex libmacic.tex \ | 
| Guido van Rossum | 9cb6480 | 1997-12-29 20:01:55 +0000 | [diff] [blame] | 160 | libuserdict.tex libdis.tex libxmllib.tex libqueue.tex \ | 
| Fred Drake | 8ff4b8b | 1998-02-18 17:19:53 +0000 | [diff] [blame] | 161 | liblocale.tex libbasehttp.tex libcopyreg.tex libsymbol.tex libtoken.tex \ | 
| Fred Drake | 9168328 | 1998-02-19 20:46:47 +0000 | [diff] [blame] | 162 | libframework.tex libminiae.tex libbinhex.tex libuu.tex libsunaudio.tex | 
| Guido van Rossum | 16d6e71 | 1994-08-08 12:30:22 +0000 | [diff] [blame] | 163 |  | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 164 | # Library document | 
| Fred Drake | 4be0071 | 1998-02-09 22:18:42 +0000 | [diff] [blame] | 165 | lib.dvi: modindex.py indfix.py $(LIBFILES) | 
| Fred Drake | 906f7ea | 1998-02-23 21:32:18 +0000 | [diff] [blame] | 166 | echo '\\''begin{theindex}\end{theindex}' >$*.ind | 
|  | 167 | echo '\\''begin{theindex}\label{modindex}\end{theindex}' >modules.ind | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 168 | $(LATEX) $* | 
| Fred Drake | 34252f9 | 1998-01-02 03:01:47 +0000 | [diff] [blame] | 169 | ./modindex.py modules.idx | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 170 | ./fix_hack $*.idx | 
|  | 171 | $(MAKEINDEX) $*.idx | 
|  | 172 | ./indfix.py $*.ind | 
|  | 173 | $(LATEX) $* | 
| Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 174 |  | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 175 | # Tutorial document | 
|  | 176 | tut.dvi: tut.tex | 
|  | 177 | $(LATEX) $* | 
|  | 178 | $(LATEX) $* | 
| Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 179 |  | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 180 | # Extending & Embedding, Python/C API documents. | 
|  | 181 | # Done this way to avoid repeated command sets. | 
|  | 182 | .tex.dvi: | 
| Fred Drake | 906f7ea | 1998-02-23 21:32:18 +0000 | [diff] [blame] | 183 | echo '\\''begin{theindex}\end{theindex}' >$*.ind | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 184 | $(LATEX) $* | 
|  | 185 | ./fix_hack $*.idx | 
|  | 186 | $(MAKEINDEX) $*.idx | 
|  | 187 | $(LATEX) $* | 
| Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 188 |  | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 189 |  | 
|  | 190 | # The remaining part of the Makefile is concerned with various | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 191 | # conversions, as described above.  See also the README file. | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 192 |  | 
| Fred Drake | 6eab2fb | 1998-02-13 03:23:33 +0000 | [diff] [blame] | 193 | .SUFFIXES: .py .pyc .pyo | 
|  | 194 |  | 
|  | 195 | .py.pyo: | 
|  | 196 | $(PYTHON) -O -c "import $*" | 
| Fred Drake | 05dd3c0 | 1997-12-29 17:17:54 +0000 | [diff] [blame] | 197 |  | 
|  | 198 | .py.pyc: | 
|  | 199 | $(PYTHON) -c "import $*" | 
|  | 200 |  | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 201 | .PRECIOUS:	python-lib.texi | 
| Fred Drake | 05dd3c0 | 1997-12-29 17:17:54 +0000 | [diff] [blame] | 202 |  | 
| Fred Drake | 3d913ad | 1997-12-29 21:31:23 +0000 | [diff] [blame] | 203 | # The sed script in this target fixes a really nasty little condition in | 
|  | 204 | # 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] | 205 | # and makeinfo can't handle a group without a leading @command.  But at | 
|  | 206 | # least the info file gets generated. | 
| Fred Drake | 3d913ad | 1997-12-29 21:31:23 +0000 | [diff] [blame] | 207 |  | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 208 | lib1.texi: $(LIBFILES) texipre.dat texipost.dat $(PARTPARSEOBJ) | 
| Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 209 | $(PARTPARSE) -o $@ `./whichlibs` | 
|  | 210 | sed 's/"{\\}n{\\}n/"\\n\\n/' $@ >temp.texi | 
|  | 211 | mv temp.texi $@ | 
| Fred Drake | 05dd3c0 | 1997-12-29 17:17:54 +0000 | [diff] [blame] | 212 |  | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 213 | python-lib.texi: lib1.texi fix.el | 
| Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 214 | cp lib1.texi temp.texi | 
| Fred Drake | 05dd3c0 | 1997-12-29 17:17:54 +0000 | [diff] [blame] | 215 | $(EMACS) -batch -l fix.el -f save-buffer -kill | 
| Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 216 | mv temp.texi $@ | 
| Fred Drake | 05dd3c0 | 1997-12-29 17:17:54 +0000 | [diff] [blame] | 217 |  | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 218 | python-lib.info: python-lib.texi | 
| Fred Drake | f7f2e70 | 1998-02-19 21:40:51 +0000 | [diff] [blame] | 219 | $(MAKEINFO) --footnote-style end --fill-column 72 \ | 
| Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 220 | --paragraph-indent 0 $< | 
| Fred Drake | 05dd3c0 | 1997-12-29 17:17:54 +0000 | [diff] [blame] | 221 |  | 
| Fred Drake | 13704a8 | 1997-12-29 22:04:44 +0000 | [diff] [blame] | 222 | # this is needed to prevent a second set of info files from being generated, | 
|  | 223 | # at least when using GNU make | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 224 | .PHONY: lib.info lib.texi | 
| Fred Drake | 13704a8 | 1997-12-29 22:04:44 +0000 | [diff] [blame] | 225 |  | 
| Fred Drake | 05dd3c0 | 1997-12-29 17:17:54 +0000 | [diff] [blame] | 226 | lib.info: python-lib.info | 
|  | 227 |  | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 228 | lib.texi: python-lib.texi | 
|  | 229 |  | 
| Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 230 | # Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to | 
|  | 231 | # HTML converter.  For more info on this program, see | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 232 | # <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] | 233 |  | 
| Guido van Rossum | 9cb6480 | 1997-12-29 20:01:55 +0000 | [diff] [blame] | 234 | # Note that LaTeX2HTML inserts references to an icons directory in | 
|  | 235 | # each page that it generates.  I have placed a copy of this directory | 
|  | 236 | # in the distribution to simplify the process of creating a | 
|  | 237 | # self-contained HTML distribution; for this purpose I have also added | 
|  | 238 | # a (trivial) index.html.  Change the definition of $ICONSERVER in | 
|  | 239 | # .latex2html-init to use a different location for the icons directory. | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 240 |  | 
| Guido van Rossum | 9cb6480 | 1997-12-29 20:01:55 +0000 | [diff] [blame] | 241 | # The sed hack rips out a superfluous comma which I haven't found the | 
|  | 242 | # source of.  The prominent location makes it worth the extra step; | 
|  | 243 | # this affects the title pages! | 
| Fred Drake | fc8f6f3 | 1996-12-06 18:45:30 +0000 | [diff] [blame] | 244 |  | 
| Fred Drake | ddae414 | 1998-02-17 15:45:25 +0000 | [diff] [blame] | 245 | l2h: l2hapi l2hext l2hlib l2htut | 
| Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 246 |  | 
| Fred Drake | b4d4e25 | 1996-11-11 21:03:01 +0000 | [diff] [blame] | 247 | l2htut: tut.dvi myformat.perl | 
| Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 248 | $(L2H) $(L2HARGS) tut.tex | 
| Fred Drake | 9168328 | 1998-02-19 20:46:47 +0000 | [diff] [blame] | 249 | (cd tut; ../node2label.pl footnode.html tut.html node*.html) | 
| Fred Drake | fc8f6f3 | 1996-12-06 18:45:30 +0000 | [diff] [blame] | 250 | sed 's/^<P CLASS=ABSTRACT>,/<P CLASS=ABSTRACT>/' \ | 
|  | 251 | <tut/tut.html >tut/xxx | 
|  | 252 | mv tut/xxx tut/tut.html | 
| Fred Drake | 03ff6f7 | 1997-08-22 18:18:54 +0000 | [diff] [blame] | 253 | ln -s tut.html tut/index.html || true | 
| Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 254 |  | 
| Fred Drake | b4d4e25 | 1996-11-11 21:03:01 +0000 | [diff] [blame] | 255 | l2hext: ext.dvi myformat.perl | 
| Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 256 | $(L2H) $(L2HARGS) ext.tex | 
| Fred Drake | 9168328 | 1998-02-19 20:46:47 +0000 | [diff] [blame] | 257 | (cd ext; ../node2label.pl footnode.html ext.html node*.html) | 
| Fred Drake | fc8f6f3 | 1996-12-06 18:45:30 +0000 | [diff] [blame] | 258 | sed 's/^<P CLASS=ABSTRACT>,/<P CLASS=ABSTRACT>/' \ | 
|  | 259 | <ext/ext.html >ext/xxx | 
|  | 260 | mv ext/xxx ext/ext.html | 
| Fred Drake | 03ff6f7 | 1997-08-22 18:18:54 +0000 | [diff] [blame] | 261 | ln -s ext.html ext/index.html || true | 
| Guido van Rossum | 970871f | 1993-02-21 20:10:26 +0000 | [diff] [blame] | 262 |  | 
| Fred Drake | b4d4e25 | 1996-11-11 21:03:01 +0000 | [diff] [blame] | 263 | l2hlib: lib.dvi myformat.perl | 
| Fred Drake | 03ff6f7 | 1997-08-22 18:18:54 +0000 | [diff] [blame] | 264 | ./fix_libaux.sed <lib.aux >lib1.aux | 
|  | 265 | mv lib1.aux lib.aux | 
| Fred Drake | dd94676 | 1998-02-18 16:02:14 +0000 | [diff] [blame] | 266 | if [ -d lib ] ; then rm -f lib/*.html ; fi | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 267 | $(L2H) $(L2HARGS) lib.tex | 
| Fred Drake | dd94676 | 1998-02-18 16:02:14 +0000 | [diff] [blame] | 268 | (cd lib; ../node2label.pl footnode.html lib.html node*.html) | 
| Fred Drake | f1e6707 | 1996-12-06 15:11:34 +0000 | [diff] [blame] | 269 | sed 's/^<P CLASS=ABSTRACT>,/<P CLASS=ABSTRACT>/' \ | 
|  | 270 | <lib/lib.html >lib/xxx | 
|  | 271 | mv lib/xxx lib/lib.html | 
| Fred Drake | 03ff6f7 | 1997-08-22 18:18:54 +0000 | [diff] [blame] | 272 | ln -s lib.html lib/index.html || true | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 273 |  | 
| Fred Drake | 9168328 | 1998-02-19 20:46:47 +0000 | [diff] [blame] | 274 | # note that the node2label.pl command doesn't include a footnode.html | 
| Guido van Rossum | 9231c8f | 1997-05-15 21:43:21 +0000 | [diff] [blame] | 275 | l2hapi: api.dvi myformat.perl | 
|  | 276 | $(L2H) $(L2HARGS) api.tex | 
| Fred Drake | 9168328 | 1998-02-19 20:46:47 +0000 | [diff] [blame] | 277 | (cd api; ../node2label.pl api.html node*.html) | 
| Guido van Rossum | 9231c8f | 1997-05-15 21:43:21 +0000 | [diff] [blame] | 278 | sed 's/^<P CLASS=ABSTRACT>,/<P CLASS=ABSTRACT>/' \ | 
|  | 279 | <api/api.html >api/xxx | 
| Guido van Rossum | 9231c8f | 1997-05-15 21:43:21 +0000 | [diff] [blame] | 280 | mv api/xxx api/api.html | 
| Fred Drake | 03ff6f7 | 1997-08-22 18:18:54 +0000 | [diff] [blame] | 281 | ln -s api.html api/index.html || true | 
| Guido van Rossum | 9231c8f | 1997-05-15 21:43:21 +0000 | [diff] [blame] | 282 |  | 
| Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 283 | info-$(VERSION).tar.gz: $(INFOFILES) | 
|  | 284 | tar cf - python-???.info* | gzip -9 >$@ | 
|  | 285 |  | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 286 | pdf-$(VERSION).tar.gz: $(PDFFILES) | 
| Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 287 | tar cf - ???.pdf | gzip -9 >$@ | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 288 |  | 
|  | 289 | postscript-$(VERSION).tar.gz: $(PSFILES) ref/ref.ps | 
|  | 290 | cp ref/ref.ps . | 
| Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 291 | tar cf - ???.ps | gzip -9 >$@ | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 292 | rm ref.ps | 
|  | 293 |  | 
| Guido van Rossum | 330c660 | 1997-11-26 15:31:32 +0000 | [diff] [blame] | 294 | tarhtml: | 
| Guido van Rossum | 84cca44 | 1997-11-25 20:49:09 +0000 | [diff] [blame] | 295 | @echo "Did you remember to run makeMIFs.py in the ref subdirectory...?" | 
| Fred Drake | 33d05b9 | 1998-01-13 16:33:09 +0000 | [diff] [blame] | 296 | tar cf - index.html ???/???.css ???/*.html lib/*.gif icons/*.* \ | 
| Fred Drake | 95810e4 | 1998-01-13 17:18:57 +0000 | [diff] [blame] | 297 | | gzip -9 >html-$(VERSION).tar.gz | 
| Fred Drake | 33d05b9 | 1998-01-13 16:33:09 +0000 | [diff] [blame] | 298 |  | 
| Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 299 | # convenience targets: | 
|  | 300 |  | 
|  | 301 | tarinfo:  info-$(VERSION).tar.gz | 
|  | 302 |  | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 303 | tarps:	postscript-$(VERSION).tar.gz | 
| Fred Drake | 33d05b9 | 1998-01-13 16:33:09 +0000 | [diff] [blame] | 304 |  | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 305 | tarpdf:	pdf-$(VERSION).tar.gz | 
|  | 306 |  | 
|  | 307 | tarballs:  tarpdf tarps tarhtml | 
| Guido van Rossum | 84cca44 | 1997-11-25 20:49:09 +0000 | [diff] [blame] | 308 |  | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 309 |  | 
|  | 310 | # Housekeeping targets | 
|  | 311 |  | 
| Guido van Rossum | 9231c8f | 1997-05-15 21:43:21 +0000 | [diff] [blame] | 312 | # Remove temporary files; all except the following: | 
|  | 313 | # - sources: .tex, .bib, .sty | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 314 | # - useful results: .dvi, .pdf, .ps, .texi, .info | 
| Fred Drake | 03ff6f7 | 1997-08-22 18:18:54 +0000 | [diff] [blame] | 315 | clean:	l2hclean | 
| Fred Drake | 6eab2fb | 1998-02-13 03:23:33 +0000 | [diff] [blame] | 316 | rm -f @* *~ *.aux *.idx *.ilg *.ind *.log *.toc *.blg *.bbl *.py[co] | 
| Fred Drake | 4d3b2a2 | 1998-02-23 21:34:26 +0000 | [diff] [blame^] | 317 | rm -f *.bak *.orig lib1.texi *.out | 
| Fred Drake | 95810e4 | 1998-01-13 17:18:57 +0000 | [diff] [blame] | 318 | rm -f html-$(VERSION).tar.gz postscript-$(VERSION).tar.gz | 
| Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 319 | rm -f pdf-$(VERSION).tar.gz | 
| Guido van Rossum | 5b34373 | 1992-07-07 09:06:34 +0000 | [diff] [blame] | 320 |  | 
| Fred Drake | 03ff6f7 | 1997-08-22 18:18:54 +0000 | [diff] [blame] | 321 | l2hclean: | 
| Fred Drake | 5de31fc | 1997-08-22 18:20:33 +0000 | [diff] [blame] | 322 | rm -rf api ext lib tut | 
| Fred Drake | 03ff6f7 | 1997-08-22 18:18:54 +0000 | [diff] [blame] | 323 |  | 
| Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 324 | # Remove temporaries as well as final products | 
| Guido van Rossum | 5b34373 | 1992-07-07 09:06:34 +0000 | [diff] [blame] | 325 | clobber: clean | 
| Fred Drake | 6b7fc6f | 1998-02-04 20:33:13 +0000 | [diff] [blame] | 326 | rm -f *.dvi *.pdf *.ps *.texi *.info *.info-[0-9]* | 
| Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 327 |  | 
|  | 328 | realclean:  clobber | 
|  | 329 | distclean:  clobber |