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 | # |
Fred Drake | 6532b9b | 1999-04-22 14:16:14 +0000 | [diff] [blame] | 6 | # This is a bit of a mess. The documents are identified by short names: |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 7 | # api -- Python/C API Reference Manual |
Fred Drake | 6532b9b | 1999-04-22 14:16:14 +0000 | [diff] [blame] | 8 | # doc -- Documenting Python |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 9 | # ext -- Extending and Embedding the Python Interpreter |
| 10 | # lib -- Library Reference Manual |
Fred Drake | 34116ba | 1998-07-24 15:42:12 +0000 | [diff] [blame] | 11 | # mac -- Macintosh Library Modules |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 12 | # ref -- Python Reference Manual |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 13 | # tut -- Python Tutorial |
Greg Ward | 0862f80 | 2000-04-28 16:53:36 +0000 | [diff] [blame] | 14 | # inst -- Installing Python Modules |
| 15 | # dist -- Distributing Python Modules |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 16 | # |
Fred Drake | 3a045e8 | 2001-01-22 20:47:26 +0000 | [diff] [blame] | 17 | # The LaTeX sources for each of these documents are in subdirectories |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 18 | # with the three-letter designations above as the directory names. |
Guido van Rossum | 1f17543 | 1996-10-22 20:00:02 +0000 | [diff] [blame] | 19 | # |
Fred Drake | 3a045e8 | 2001-01-22 20:47:26 +0000 | [diff] [blame] | 20 | # The main target creates HTML for each of the documents. You can |
| 21 | # also do "make lib" (etc.) to create the HTML versions of individual |
| 22 | # documents. |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 23 | # |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 24 | # The document classes and styles are in the texinputs/ directory. |
| 25 | # These define a number of macros that are similar in name and intent |
| 26 | # as macros in Texinfo (e.g. \code{...} and \emph{...}), as well as a |
Fred Drake | efc17bd | 1998-07-28 21:05:16 +0000 | [diff] [blame] | 27 | # number of environments for formatting function and data definitions. |
Fred Drake | 3a045e8 | 2001-01-22 20:47:26 +0000 | [diff] [blame] | 28 | # Documentation for the macros is included in "Documenting Python"; see |
| 29 | # http://www.python.org/doc/current/doc/doc.html, or the sources for |
| 30 | # this document in the doc/ directory. |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 31 | # |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 32 | # Everything is processed by LaTeX. See the file `README' for more |
| 33 | # information on the tools needed for processing. |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 34 | # |
| 35 | # There's a problem with generating the index which has been solved by |
| 36 | # a sed command applied to the index file. The shell script fix_hack |
| 37 | # does this (the Makefile takes care of calling it). |
| 38 | # |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 39 | # Additional targets attempt to convert selected LaTeX sources to |
| 40 | # various other formats. These are generally site specific because |
| 41 | # the tools used are all but universal. These targets are: |
Fred Drake | 34116ba | 1998-07-24 15:42:12 +0000 | [diff] [blame] | 42 | # |
Fred Drake | 3a045e8 | 2001-01-22 20:47:26 +0000 | [diff] [blame] | 43 | # ps -- convert all documents from LaTeX to PostScript |
| 44 | # pdf -- convert all documents from LaTeX to the |
Fred Drake | efc17bd | 1998-07-28 21:05:16 +0000 | [diff] [blame] | 45 | # Portable Document Format |
Fred Drake | 34116ba | 1998-07-24 15:42:12 +0000 | [diff] [blame] | 46 | # |
Fred Drake | efc17bd | 1998-07-28 21:05:16 +0000 | [diff] [blame] | 47 | # See the README file for more information on these targets. |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 48 | # |
| 49 | # The formatted output is located in subdirectories. For PDF and |
| 50 | # PostScript, look in the paper-$(PAPER)/ directory. For HTML, look in |
Fred Drake | 34116ba | 1998-07-24 15:42:12 +0000 | [diff] [blame] | 51 | # the html/ directory. If you want to fix the GNU info process, look |
Fred Drake | eb7fe4f | 1998-08-12 17:08:37 +0000 | [diff] [blame] | 52 | # in the info/ directory; please send patches to python-docs@python.org. |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 53 | |
Fred Drake | 78430b6 | 2000-08-29 16:30:21 +0000 | [diff] [blame] | 54 | # This Makefile only includes information on how to perform builds; for |
| 55 | # dependency information, see Makefile.deps. |
| 56 | |
Fred Drake | 3a045e8 | 2001-01-22 20:47:26 +0000 | [diff] [blame] | 57 | # Customization -- you *may* have to edit this |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 58 | |
Fred Drake | 3a045e8 | 2001-01-22 20:47:26 +0000 | [diff] [blame] | 59 | # You could set this to a4: |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 60 | PAPER=letter |
| 61 | |
Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 62 | # Ideally, you shouldn't need to edit beyond this point |
Guido van Rossum | 5b34373 | 1992-07-07 09:06:34 +0000 | [diff] [blame] | 63 | |
Fred Drake | eb7fe4f | 1998-08-12 17:08:37 +0000 | [diff] [blame] | 64 | HTMLDIR= html |
| 65 | INFODIR= info |
| 66 | TOOLSDIR= tools |
| 67 | |
Fred Drake | 860e256 | 1999-07-12 16:52:50 +0000 | [diff] [blame] | 68 | # This is the *documentation* release, and is used to construct the file |
| 69 | # names of the downloadable tarballs. |
Fred Drake | 8863460 | 2001-01-25 17:32:51 +0000 | [diff] [blame] | 70 | RELEASE=2.1a2 |
Fred Drake | 860e256 | 1999-07-12 16:52:50 +0000 | [diff] [blame] | 71 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 72 | PYTHON= python |
| 73 | DVIPS= dvips -N0 -t $(PAPER) |
| 74 | |
| 75 | MKHOWTO= $(TOOLSDIR)/mkhowto |
| 76 | MKHTML= $(MKHOWTO) --html --about html/stdabout.dat \ |
| 77 | --address $(PYTHONDOCS) --up-link ../index.html \ |
| 78 | --up-title "Python Documentation Index" \ |
| 79 | --global-module-index "../modindex.html" |
| 80 | MKPDF= $(MKHOWTO) --paper=$(PAPER) --pdf |
| 81 | MKPS= $(MKHOWTO) --paper=$(PAPER) --ps |
| 82 | |
| 83 | BUILDINDEX=$(TOOLSDIR)/buildindex.py |
| 84 | |
| 85 | PYTHONDOCS='See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.' |
| 86 | HTMLBASE= file:`pwd` |
| 87 | |
| 88 | # what's what |
| 89 | MANDVIFILES= paper-$(PAPER)/api.dvi paper-$(PAPER)/ext.dvi \ |
| 90 | paper-$(PAPER)/lib.dvi paper-$(PAPER)/mac.dvi \ |
| 91 | paper-$(PAPER)/ref.dvi paper-$(PAPER)/tut.dvi |
| 92 | HOWTODVIFILES= paper-$(PAPER)/doc.dvi paper-$(PAPER)/inst.dvi \ |
| 93 | paper-$(PAPER)/dist.dvi |
| 94 | |
| 95 | MANPDFFILES= paper-$(PAPER)/api.pdf paper-$(PAPER)/ext.pdf \ |
| 96 | paper-$(PAPER)/lib.pdf paper-$(PAPER)/mac.pdf \ |
| 97 | paper-$(PAPER)/ref.pdf paper-$(PAPER)/tut.pdf |
| 98 | HOWTOPDFFILES= paper-$(PAPER)/doc.pdf paper-$(PAPER)/inst.pdf \ |
| 99 | paper-$(PAPER)/dist.pdf |
| 100 | |
| 101 | MANPSFILES= paper-$(PAPER)/api.ps paper-$(PAPER)/ext.ps \ |
| 102 | paper-$(PAPER)/lib.ps paper-$(PAPER)/mac.ps \ |
| 103 | paper-$(PAPER)/ref.ps paper-$(PAPER)/tut.ps |
| 104 | HOWTOPSFILES= paper-$(PAPER)/doc.ps paper-$(PAPER)/inst.ps \ |
| 105 | paper-$(PAPER)/dist.ps |
| 106 | |
| 107 | DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES) |
| 108 | PDFFILES= $(MANPDFFILES) $(HOWTOPDFFILES) |
| 109 | PSFILES= $(MANPSFILES) $(HOWTOPSFILES) |
| 110 | |
| 111 | INDEXFILES=html/api/api.html \ |
| 112 | html/doc/doc.html \ |
| 113 | html/ext/ext.html \ |
| 114 | html/lib/lib.html \ |
| 115 | html/mac/mac.html \ |
| 116 | html/ref/ref.html \ |
| 117 | html/tut/tut.html \ |
| 118 | html/inst/inst.html \ |
| 119 | html/dist/dist.html |
| 120 | |
| 121 | COMMONPERL= perl/manual.perl perl/python.perl perl/l2hinit.perl |
| 122 | |
| 123 | include Makefile.deps |
Fred Drake | 33d05b9 | 1998-01-13 16:33:09 +0000 | [diff] [blame] | 124 | |
Fred Drake | eb7fe4f | 1998-08-12 17:08:37 +0000 | [diff] [blame] | 125 | # These must be declared phony since there |
| 126 | # are directories with matching names: |
Greg Ward | 0862f80 | 2000-04-28 16:53:36 +0000 | [diff] [blame] | 127 | .PHONY: api doc ext lib mac ref tut inst dist |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 128 | .PHONY: html info |
Fred Drake | 3f8a59f | 1998-07-24 13:58:27 +0000 | [diff] [blame] | 129 | |
Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 130 | |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 131 | # Main target |
Fred Drake | 3a045e8 | 2001-01-22 20:47:26 +0000 | [diff] [blame] | 132 | all: html |
Guido van Rossum | eb8d503 | 1996-08-09 21:46:05 +0000 | [diff] [blame] | 133 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 134 | dvi: $(DVIFILES) |
| 135 | pdf: $(PDFFILES) |
| 136 | ps: $(PSFILES) |
Fred Drake | e4837a1 | 1998-03-06 21:29:34 +0000 | [diff] [blame] | 137 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 138 | world: ps pdf html distfiles |
Guido van Rossum | 20aca5a | 1991-01-25 13:29:04 +0000 | [diff] [blame] | 139 | |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 140 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 141 | # Rules to build PostScript and PDF formats |
| 142 | .SUFFIXES: .dvi .ps |
| 143 | |
| 144 | .dvi.ps: |
| 145 | $(DVIPS) -o $@ $< |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 146 | |
| 147 | |
| 148 | # Targets for each document: |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 149 | # Python/C API Reference Manual |
| 150 | paper-$(PAPER)/api.dvi: paper-$(PAPER)/api.tex $(APIFILES) |
| 151 | (cd paper-$(PAPER); $(MKDVI) api.tex) |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 152 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 153 | paper-$(PAPER)/api.pdf: paper-$(PAPER)/api.tex $(APIFILES) |
| 154 | (cd paper-$(PAPER); $(MKPDF) api.tex) |
Fred Drake | 1508743 | 1999-03-16 16:11:27 +0000 | [diff] [blame] | 155 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 156 | paper-$(PAPER)/api.tex: api/api.tex api/refcounts.dat tools/anno-api.py |
| 157 | $(PYTHON) $(TOOLSDIR)/anno-api.py -o $@ api/api.tex |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 158 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 159 | # Distributing Python Modules |
| 160 | paper-$(PAPER)/dist.dvi: $(DISTFILES) |
| 161 | (cd paper-$(PAPER); $(MKDVI) ../dist/dist.tex) |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 162 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 163 | paper-$(PAPER)/dist.pdf: $(DISTFILES) |
| 164 | (cd paper-$(PAPER); $(MKPDF) ../dist/dist.tex |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 165 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 166 | # Documenting Python |
| 167 | paper-$(PAPER)/doc.dvi: $(DOCFILES) |
| 168 | (cd paper-$(PAPER); $(MKDVI) ../doc/doc.tex |
Fred Drake | 3f8a59f | 1998-07-24 13:58:27 +0000 | [diff] [blame] | 169 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 170 | paper-$(PAPER)/doc.pdf: $(DOCFILES) |
| 171 | (cd paper-$(PAPER); $(MKPDF) ../doc/doc.tex_ |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 172 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 173 | # Extending and Embedding the Python Interpreter |
| 174 | paper-$(PAPER)/ext.dvi: $(EXTFILES) |
| 175 | (cd paper-$(PAPER); $(MKDVI) ../ext/ext.tex) |
Greg Ward | 0862f80 | 2000-04-28 16:53:36 +0000 | [diff] [blame] | 176 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 177 | paper-$(PAPER)/ext.pdf: $(EXTFILES) |
| 178 | (cd paper-$(PAPER); $(MKPDF) ../ext/ext.tex) |
Greg Ward | 0862f80 | 2000-04-28 16:53:36 +0000 | [diff] [blame] | 179 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 180 | # Installing Python Modules |
| 181 | paper-$(PAPER)/inst.dvi: $(INSTFILES) |
| 182 | (cd paper-$(PAPER); $(MKDVI) ../inst/inst.tex) |
Fred Drake | d69e2c4 | 1998-05-11 18:25:46 +0000 | [diff] [blame] | 183 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 184 | paper-$(PAPER)/inst.pdf: $(INSTFILES) |
| 185 | (cd paper-$(PAPER); $(MKPDF) ../inst/inst.tex) |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 186 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 187 | # Python Library Reference |
| 188 | paper-$(PAPER)/lib.dvi: $(LIBFILES) |
| 189 | (cd paper-$(PAPER); $(MKDVI) ../lib/lib.tex) |
Fred Drake | 1508743 | 1999-03-16 16:11:27 +0000 | [diff] [blame] | 190 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 191 | paper-$(PAPER)/lib.pdf: $(LIBFILES) |
| 192 | (cd paper-$(PAPER); $(MKPDF) ../lib/lib.tex) |
Fred Drake | f295113 | 1998-05-07 19:30:16 +0000 | [diff] [blame] | 193 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 194 | # Macintosh Library Modules |
| 195 | paper-$(PAPER)/mac.dvi: $(MACFILES) |
| 196 | (cd paper-$(PAPER); $(MKDVI) ../mac/mac.tex) |
Fred Drake | eb7fe4f | 1998-08-12 17:08:37 +0000 | [diff] [blame] | 197 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 198 | paper-$(PAPER)/mac.pdf: $(MACFILES) |
| 199 | (cd paper-$(PAPER); $(MKPDF) ../mac/mac.tex) |
Fred Drake | eb7fe4f | 1998-08-12 17:08:37 +0000 | [diff] [blame] | 200 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 201 | # Python Reference Manual |
| 202 | paper-$(PAPER)/ref.dvi: $(REFFILES) |
| 203 | (cd paper-$(PAPER); $(MKDVI) ../ref/ref.tex) |
Fred Drake | eb7fe4f | 1998-08-12 17:08:37 +0000 | [diff] [blame] | 204 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 205 | paper-$(PAPER)/ref.pdf: $(REFFILES) |
| 206 | (cd paper-$(PAPER); $(MKPDF) ../ref/ref.tex) |
Fred Drake | ddae414 | 1998-02-17 15:45:25 +0000 | [diff] [blame] | 207 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 208 | # Python Tutorial |
| 209 | paper-$(PAPER)/tut.dvi: $(TUTFILES) |
| 210 | (cd paper-$(PAPER); $(MKDVI) ../tut/tut.tex) |
Greg Ward | 0862f80 | 2000-04-28 16:53:36 +0000 | [diff] [blame] | 211 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 212 | paper-$(PAPER)/tut.pdf: $(TUTFILES) |
| 213 | (cd paper-$(PAPER); $(MKPDF) ../tut/tut.tex) |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 214 | |
| 215 | # The remaining part of the Makefile is concerned with various |
Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 216 | # conversions, as described above. See also the README file. |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 217 | |
Fred Drake | b9838d9 | 1998-05-08 15:43:08 +0000 | [diff] [blame] | 218 | info: |
| 219 | (cd $(INFODIR); $(MAKE)) |
Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 220 | |
Guido van Rossum | 73827c6 | 1995-03-20 13:00:32 +0000 | [diff] [blame] | 221 | # Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to |
| 222 | # HTML converter. For more info on this program, see |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 223 | # <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] | 224 | |
Guido van Rossum | 9cb6480 | 1997-12-29 20:01:55 +0000 | [diff] [blame] | 225 | # Note that LaTeX2HTML inserts references to an icons directory in |
| 226 | # each page that it generates. I have placed a copy of this directory |
| 227 | # in the distribution to simplify the process of creating a |
| 228 | # self-contained HTML distribution; for this purpose I have also added |
| 229 | # a (trivial) index.html. Change the definition of $ICONSERVER in |
Fred Drake | 9fab3aa | 1998-04-28 19:20:43 +0000 | [diff] [blame] | 230 | # 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] | 231 | |
Fred Drake | eb7fe4f | 1998-08-12 17:08:37 +0000 | [diff] [blame] | 232 | # If you have the standard LaTeX2HTML icons installed, the versions shipped |
| 233 | # with this documentation should be stored in a separate directory and used |
| 234 | # instead. The standard set does *not* include all the icons used in the |
| 235 | # Python documentation. |
Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 236 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 237 | $(INDEXFILES): $(COMMONPERL) html/about.dat tools/node2label.pl |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 238 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 239 | html/acks.html: ACKS $(TOOLSDIR)/support.py $(TOOLSDIR)/mkackshtml |
| 240 | $(TOOLSDIR)/mkackshtml --address $(PYTHONDOCS) \ |
Fred Drake | d27ed85 | 2001-02-22 23:06:21 +0000 | [diff] [blame] | 241 | --output html/acks.html <ACKS |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 242 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 243 | html/modindex.html: $(TOOLSDIR)/support.py $(TOOLSDIR)/mkmodindex |
| 244 | html/modindex.html: html/lib/lib.html html/mac/mac.html |
Fred Drake | 2f55b11 | 2001-02-22 23:12:37 +0000 | [diff] [blame] | 245 | (cd html; \ |
| 246 | ../$(TOOLSDIR)/mkmodindex --columns 4 --output modindex.html \ |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 247 | --address $(PYTHONDOCS) \ |
Fred Drake | 2f55b11 | 2001-02-22 23:12:37 +0000 | [diff] [blame] | 248 | lib/modindex.html mac/modindex.html) |
Fred Drake | 7d5f5dd | 1999-03-18 19:08:47 +0000 | [diff] [blame] | 249 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 250 | html: $(INDEXFILES) html/index.html html/modindex.html html/acks.html |
Guido van Rossum | 970871f | 1993-02-21 20:10:26 +0000 | [diff] [blame] | 251 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 252 | api html/api/api.html: $(APIFILES) |
| 253 | $(MKHTML) --dir html/api api/api.tex |
Fred Drake | a6bb396 | 1998-05-06 19:51:39 +0000 | [diff] [blame] | 254 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 255 | doc html/doc/doc.html: $(DOCFILES) |
| 256 | $(MKHTML) --dir html/doc doc/doc.tex |
Fred Drake | cdbd391 | 1998-05-15 17:02:10 +0000 | [diff] [blame] | 257 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 258 | ext html/ext/ext.html: $(EXTFILES) |
| 259 | $(MKHTML) --dir html/ext ext/ext.tex |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 260 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 261 | lib html/lib/lib.html: $(LIBFILES) |
| 262 | $(MKHTML) --dir html/lib lib/lib.tex |
Fred Drake | eb7fe4f | 1998-08-12 17:08:37 +0000 | [diff] [blame] | 263 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 264 | mac html/mac/mac.html: $(MACFILES) |
| 265 | $(MKHTML) --dir html/mac mac/mac.tex |
Greg Ward | 0862f80 | 2000-04-28 16:53:36 +0000 | [diff] [blame] | 266 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 267 | ref html/ref/ref.html: $(REFFILES) |
| 268 | $(MKHTML) --dir html/ref ref/ref.tex |
Greg Ward | 0862f80 | 2000-04-28 16:53:36 +0000 | [diff] [blame] | 269 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 270 | tut html/tut/tut.html: $(TUTFILES) |
| 271 | $(MKHTML) --dir html/tut --numeric --split 3 tut/tut.tex |
| 272 | |
| 273 | inst html/inst/inst.html: $(INSTFILES) perl/distutils.perl |
| 274 | $(MKHTML) --dir html/inst inst/inst.tex |
| 275 | |
| 276 | dist html/dist/dist.html: $(DISTFILES) perl/distutils.perl |
| 277 | $(MKHTML) --dir html/dist dist/dist.tex |
Fred Drake | e7a8c97 | 2000-04-07 16:27:15 +0000 | [diff] [blame] | 278 | |
Guido van Rossum | 9231c8f | 1997-05-15 21:43:21 +0000 | [diff] [blame] | 279 | |
Fred Drake | e4837a1 | 1998-03-06 21:29:34 +0000 | [diff] [blame] | 280 | # webchecker needs an extra flag to process the huge index from the libref |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 281 | WEBCHECKER=$(PYTHON) ../Tools/webchecker/webchecker.py |
| 282 | HTMLBASE= file:`pwd`/html |
| 283 | |
| 284 | webcheck: html |
| 285 | $(WEBCHECKER) $(HTMLBASE)/api/ |
| 286 | $(WEBCHECKER) $(HTMLBASE)/doc/ |
| 287 | $(WEBCHECKER) $(HTMLBASE)/ext/ |
| 288 | $(WEBCHECKER) -m290000 $(HTMLBASE)/lib/ |
| 289 | $(WEBCHECKER) $(HTMLBASE)/mac/ |
| 290 | $(WEBCHECKER) $(HTMLBASE)/ref/ |
| 291 | $(WEBCHECKER) $(HTMLBASE)/tut/ |
| 292 | $(WEBCHECKER) $(HTMLBASE)/dist/ |
| 293 | $(WEBCHECKER) $(HTMLBASE)/inst/ |
| 294 | |
| 295 | fastwebcheck: html |
| 296 | $(WEBCHECKER) -x $(HTMLBASE)/api/ |
| 297 | $(WEBCHECKER) -x $(HTMLBASE)/doc/ |
| 298 | $(WEBCHECKER) -x $(HTMLBASE)/ext/ |
| 299 | $(WEBCHECKER) -x -m290000 $(HTMLBASE)/lib/ |
| 300 | $(WEBCHECKER) -x $(HTMLBASE)/mac/ |
| 301 | $(WEBCHECKER) -x $(HTMLBASE)/ref/ |
| 302 | $(WEBCHECKER) -x $(HTMLBASE)/tut/ |
| 303 | $(WEBCHECKER) -x $(HTMLBASE)/dist/ |
| 304 | $(WEBCHECKER) -x $(HTMLBASE)/inst/ |
Fred Drake | eb7fe4f | 1998-08-12 17:08:37 +0000 | [diff] [blame] | 305 | |
| 306 | |
| 307 | # Release packaging targets: |
Fred Drake | e4837a1 | 1998-03-06 21:29:34 +0000 | [diff] [blame] | 308 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 309 | paper-$(PAPER)/README: ps $(TOOLSDIR)/getpagecounts |
| 310 | (cd paper-$(PAPER); ../$(TOOLSDIR)/getpagecounts >$@) |
| 311 | |
Fred Drake | b6584ca | 1999-01-08 15:49:45 +0000 | [diff] [blame] | 312 | info-$(RELEASE).tgz: info |
Fred Drake | 28e66d1 | 1999-01-29 22:23:25 +0000 | [diff] [blame] | 313 | (cd $(INFODIR); tar cf - README python.dir python-???.info*) \ |
| 314 | | gzip -9 >$@ |
Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 315 | |
Fred Drake | 4ef3ea0 | 1999-07-27 16:30:59 +0000 | [diff] [blame] | 316 | info-$(RELEASE).tar.bz2: info |
| 317 | (cd $(INFODIR); tar cf - README python.dir python-???.info*) \ |
| 318 | | bzip2 -9 >$@ |
| 319 | |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 320 | latex-$(RELEASE).tgz: |
Fred Drake | 83c0983 | 1999-08-02 20:20:14 +0000 | [diff] [blame] | 321 | $(TOOLSDIR)/mksourcepkg --gzip $(RELEASE) |
Fred Drake | e61d7af | 1998-03-05 16:37:34 +0000 | [diff] [blame] | 322 | |
Fred Drake | 4ef3ea0 | 1999-07-27 16:30:59 +0000 | [diff] [blame] | 323 | latex-$(RELEASE).tar.bz2: |
Fred Drake | 83c0983 | 1999-08-02 20:20:14 +0000 | [diff] [blame] | 324 | $(TOOLSDIR)/mksourcepkg --bzip2 $(RELEASE) |
Fred Drake | 4ef3ea0 | 1999-07-27 16:30:59 +0000 | [diff] [blame] | 325 | |
Fred Drake | 7dcc69a | 1999-07-23 16:11:36 +0000 | [diff] [blame] | 326 | latex-$(RELEASE).zip: |
Fred Drake | 02ba621 | 2000-04-04 20:58:25 +0000 | [diff] [blame] | 327 | rm -f $@ |
Fred Drake | 83c0983 | 1999-08-02 20:20:14 +0000 | [diff] [blame] | 328 | $(TOOLSDIR)/mksourcepkg --zip $(RELEASE) |
Fred Drake | 7dcc69a | 1999-07-23 16:11:36 +0000 | [diff] [blame] | 329 | |
Fred Drake | d19b9d6 | 1998-07-29 03:49:44 +0000 | [diff] [blame] | 330 | pdf-$(PAPER)-$(RELEASE).tgz: pdf |
Fred Drake | eb7fe4f | 1998-08-12 17:08:37 +0000 | [diff] [blame] | 331 | (cd paper-$(PAPER); tar cf - *.pdf) | gzip -9 >$@ |
Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 332 | |
Fred Drake | 4ef3ea0 | 1999-07-27 16:30:59 +0000 | [diff] [blame] | 333 | pdf-$(PAPER)-$(RELEASE).tar.bz2: pdf |
| 334 | (cd paper-$(PAPER); tar cf - *.pdf) | bzip2 -9 >$@ |
| 335 | |
Fred Drake | 7dcc69a | 1999-07-23 16:11:36 +0000 | [diff] [blame] | 336 | pdf-$(PAPER)-$(RELEASE).zip: pdf |
Fred Drake | 02ba621 | 2000-04-04 20:58:25 +0000 | [diff] [blame] | 337 | rm -f $@ |
| 338 | (cd paper-$(PAPER); zip -q -9 ../$@ *.pdf) |
Fred Drake | 7dcc69a | 1999-07-23 16:11:36 +0000 | [diff] [blame] | 339 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 340 | postscript-$(PAPER)-$(RELEASE).tar.bz2: ps paper-$(PAPER)/README |
Fred Drake | 02ba621 | 2000-04-04 20:58:25 +0000 | [diff] [blame] | 341 | (cd paper-$(PAPER); tar cf - *.ps README) | bzip2 -9 >$@ |
Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 342 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 343 | postscript-$(PAPER)-$(RELEASE).tgz: ps paper-$(PAPER)/README |
Fred Drake | 02ba621 | 2000-04-04 20:58:25 +0000 | [diff] [blame] | 344 | (cd paper-$(PAPER); tar cf - *.ps README) | gzip -9 >$@ |
Fred Drake | 4ef3ea0 | 1999-07-27 16:30:59 +0000 | [diff] [blame] | 345 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 346 | postscript-$(PAPER)-$(RELEASE).zip: ps paper-$(PAPER)/README |
Fred Drake | 02ba621 | 2000-04-04 20:58:25 +0000 | [diff] [blame] | 347 | rm -f $@ |
| 348 | (cd paper-$(PAPER); zip -q -9 ../$@ *.ps README) |
Fred Drake | 7dcc69a | 1999-07-23 16:11:36 +0000 | [diff] [blame] | 349 | |
Fred Drake | fcb7adb | 1999-01-12 20:32:39 +0000 | [diff] [blame] | 350 | html-$(RELEASE).tgz: html |
Fred Drake | 02ba621 | 2000-04-04 20:58:25 +0000 | [diff] [blame] | 351 | (cd $(HTMLDIR); \ |
Fred Drake | 90f8767 | 2000-09-08 21:54:44 +0000 | [diff] [blame] | 352 | tar cf - *.html */*.css */*.html */*.gif) \ |
Fred Drake | 29cabd4 | 1998-05-11 18:53:07 +0000 | [diff] [blame] | 353 | | gzip -9 >$@ |
Fred Drake | 33d05b9 | 1998-01-13 16:33:09 +0000 | [diff] [blame] | 354 | |
Fred Drake | 4ef3ea0 | 1999-07-27 16:30:59 +0000 | [diff] [blame] | 355 | html-$(RELEASE).tar.bz2: html |
Fred Drake | 02ba621 | 2000-04-04 20:58:25 +0000 | [diff] [blame] | 356 | (cd $(HTMLDIR); \ |
Fred Drake | 90f8767 | 2000-09-08 21:54:44 +0000 | [diff] [blame] | 357 | tar cf - *.html */*.css */*.html */*.gif) \ |
Fred Drake | 4ef3ea0 | 1999-07-27 16:30:59 +0000 | [diff] [blame] | 358 | | bzip2 -9 >$@ |
| 359 | |
Fred Drake | 7dcc69a | 1999-07-23 16:11:36 +0000 | [diff] [blame] | 360 | html-$(RELEASE).zip: html |
Fred Drake | 02ba621 | 2000-04-04 20:58:25 +0000 | [diff] [blame] | 361 | rm -f $@ |
| 362 | (cd $(HTMLDIR); \ |
Fred Drake | 90f8767 | 2000-09-08 21:54:44 +0000 | [diff] [blame] | 363 | zip -q -9 ../$@ *.html */*.css */*.html */*.gif) |
Fred Drake | 7dcc69a | 1999-07-23 16:11:36 +0000 | [diff] [blame] | 364 | |
Fred Drake | a799835 | 1998-02-19 16:01:04 +0000 | [diff] [blame] | 365 | # convenience targets: |
| 366 | |
Fred Drake | eb7fe4f | 1998-08-12 17:08:37 +0000 | [diff] [blame] | 367 | tarhtml: html-$(RELEASE).tgz |
Fred Drake | b6584ca | 1999-01-08 15:49:45 +0000 | [diff] [blame] | 368 | tarinfo: info-$(RELEASE).tgz |
Fred Drake | eb7fe4f | 1998-08-12 17:08:37 +0000 | [diff] [blame] | 369 | tarps: postscript-$(PAPER)-$(RELEASE).tgz |
| 370 | tarpdf: pdf-$(PAPER)-$(RELEASE).tgz |
| 371 | tarlatex: latex-$(RELEASE).tgz |
Fred Drake | bbe33c5 | 1998-05-07 01:39:06 +0000 | [diff] [blame] | 372 | |
Fred Drake | 83c0983 | 1999-08-02 20:20:14 +0000 | [diff] [blame] | 373 | tarballs: tarpdf tarps tarhtml |
Guido van Rossum | 84cca44 | 1997-11-25 20:49:09 +0000 | [diff] [blame] | 374 | |
Fred Drake | 7dcc69a | 1999-07-23 16:11:36 +0000 | [diff] [blame] | 375 | ziphtml: html-$(RELEASE).zip |
| 376 | zipps: postscript-$(PAPER)-$(RELEASE).zip |
| 377 | zippdf: pdf-$(PAPER)-$(RELEASE).zip |
| 378 | ziplatex: latex-$(RELEASE).zip |
| 379 | |
Fred Drake | b906d2e | 2000-07-01 02:37:37 +0000 | [diff] [blame] | 380 | zips: zippdf zipps ziphtml |
Fred Drake | 7dcc69a | 1999-07-23 16:11:36 +0000 | [diff] [blame] | 381 | |
Fred Drake | 4ef3ea0 | 1999-07-27 16:30:59 +0000 | [diff] [blame] | 382 | bziphtml: html-$(RELEASE).tar.bz2 |
| 383 | bzipinfo: info-$(RELEASE).tar.bz2 |
| 384 | bzipps: postscript-$(PAPER)-$(RELEASE).tar.bz2 |
| 385 | bzippdf: pdf-$(PAPER)-$(RELEASE).tar.bz2 |
| 386 | bziplatex: latex-$(RELEASE).tar.bz2 |
| 387 | |
Fred Drake | 83c0983 | 1999-08-02 20:20:14 +0000 | [diff] [blame] | 388 | bzips: bzippdf bzipps bziphtml |
Fred Drake | 4ef3ea0 | 1999-07-27 16:30:59 +0000 | [diff] [blame] | 389 | |
Fred Drake | 8863460 | 2001-01-25 17:32:51 +0000 | [diff] [blame] | 390 | distfiles: tarballs zips bzips |
| 391 | $(TOOLSDIR)/mksourcepkg --all $(RELEASE) |
Fred Drake | 4ef3ea0 | 1999-07-27 16:30:59 +0000 | [diff] [blame] | 392 | |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 393 | |
| 394 | # Housekeeping targets |
| 395 | |
Guido van Rossum | 9231c8f | 1997-05-15 21:43:21 +0000 | [diff] [blame] | 396 | # Remove temporary files; all except the following: |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 397 | # - sources: .tex, .bib, .sty, *.cls |
Fred Drake | 04cf4dc | 1998-02-12 22:33:50 +0000 | [diff] [blame] | 398 | # - useful results: .dvi, .pdf, .ps, .texi, .info |
Fred Drake | e4837a1 | 1998-03-06 21:29:34 +0000 | [diff] [blame] | 399 | clean: |
Fred Drake | eb7fe4f | 1998-08-12 17:08:37 +0000 | [diff] [blame] | 400 | (cd paper-$(PAPER); $(MAKE) clean) |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 401 | (cd $(INFODIR); $(MAKE) clean) |
Guido van Rossum | 5b34373 | 1992-07-07 09:06:34 +0000 | [diff] [blame] | 402 | |
Guido van Rossum | e83e380 | 1995-03-17 16:01:35 +0000 | [diff] [blame] | 403 | # Remove temporaries as well as final products |
Fred Drake | b6584ca | 1999-01-08 15:49:45 +0000 | [diff] [blame] | 404 | clobber: |
Fred Drake | eb7fe4f | 1998-08-12 17:08:37 +0000 | [diff] [blame] | 405 | rm -f html-$(RELEASE).tgz info-$(RELEASE).tgz |
| 406 | rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz |
Fred Drake | 7dcc69a | 1999-07-23 16:11:36 +0000 | [diff] [blame] | 407 | rm -f latex-$(RELEASE).tgz html-$(RELEASE).zip |
| 408 | rm -f pdf-$(RELEASE).zip postscript-$(RELEASE).zip |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 409 | rm -f $(DVIFILES) $(PSFILES) $(PDFFILES) |
Fred Drake | e34ab30 | 1998-05-11 21:10:15 +0000 | [diff] [blame] | 410 | (cd $(INFODIR); $(MAKE) clobber) |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 411 | rm -rf html/index.html html/modindex.html html/acks.html |
| 412 | rm -rf html/api/ html/doc/ html/ext/ html/lib/ html/mac/ |
| 413 | rm -rf html/ref/ html/tut/ html/inst/ html/dist/ |
Fred Drake | 5ad78f3 | 1998-02-22 19:47:13 +0000 | [diff] [blame] | 414 | |
Fred Drake | f6bfe8e | 2001-02-19 19:19:26 +0000 | [diff] [blame] | 415 | realclean distclean: clobber |
| 416 | |
| 417 | |
| 418 | # html/index.html is dependent on $(INDEXFILES) since we want the date |
| 419 | # on the front index to be updated whenever any of the child documents |
| 420 | # are updated and boilerplate.tex uses \today as the date. |
| 421 | |
| 422 | # It's at the end of the file since it wedges font-lock in XEmacs. |
| 423 | |
| 424 | BOILERPLATE=texinputs/boilerplate.tex |
| 425 | html/index.html: html/index.html.in $(BOILERPLATE) $(INDEXFILES) |
| 426 | DATE=`grep '\\date{' $(BOILERPLATE) | sed 's/.*\\date{\(.*\)}.*$$/\1/'` ; \ |
| 427 | if [ "$$DATE" = '\today' ] ; then DATE=`date '+%B %e, %Y'`;fi;\ |
| 428 | sed -e "s/@DATE@/$$DATE/g" -e "s/@RELEASE@/$(RELEASE)/g" \ |
| 429 | $< >$@ |