Fix an amazing number of typos & malformed sentences reported by Detlef
[python/dscho.git] / Doc / Makefile
blobe48fdb24ee99c0a37d7282e1f60f2fb4cd554db9
1 # Makefile for Python documentation
2 # ---------------------------------
4 # See also the README file.
6 # This is a bit of a mess. The main documents are:
7 # api -- Python/C API Reference Manual
8 # ext -- Extending and Embedding the Python Interpreter
9 # lib -- Library Reference Manual
10 # mac -- Macintosh Library Modules
11 # ref -- Python Reference Manual
12 # tut -- Python Tutorial
14 # The latex sources for each of these documents are in subdirectories
15 # with the three-letter designations above as the directory names.
17 # The main target creates DVI and PostScript for the main each of the
18 # documents. You can also do "make lib" (etc.) to create the DVI and
19 # PostScript versions of individual documents.
21 # The document classes and styles are in the texinputs/ directory.
22 # These define a number of macros that are similar in name and intent
23 # as macros in Texinfo (e.g. \code{...} and \emph{...}), as well as a
24 # number of environments for formatting function and data definitions.
26 # Everything is processed by LaTeX. See the file `README' for more
27 # information on the tools needed for processing.
29 # There's a problem with generating the index which has been solved by
30 # a sed command applied to the index file. The shell script fix_hack
31 # does this (the Makefile takes care of calling it).
33 # Additional targets attempt to convert selected LaTeX sources to
34 # various other formats. These are generally site specific because
35 # the tools used are all but universal. These targets are:
37 # html -- convert all documents from LaTeX to HTML
38 # pdf -- convert all documents from LaTeX to the
39 # Portable Document Format
41 # See the README file for more information on these targets.
43 # The formatted output is located in subdirectories. For PDF and
44 # PostScript, look in the paper-$(PAPER)/ directory. For HTML, look in
45 # the html/ directory. If you want to fix the GNU info process, look
46 # in the info/ directory; please send patches to python-docs@python.org.
48 # Customizations -- you *may* have to edit these
50 # you could set this to a4
51 PAPER=letter
53 # Ideally, you shouldn't need to edit beyond this point
55 HTMLDIR= html
56 INFODIR= info
57 TOOLSDIR= tools
59 RELEASE=1.5.2b2
60 VERSION=1.5
62 # These must be declared phony since there
63 # are directories with matching names:
64 .PHONY: api ext lib mac ref tut
65 .PHONY: html info
68 # Main target
69 all: ps
71 dvi:
72 (cd paper-$(PAPER); $(MAKE) dvi)
74 pdf:
75 (cd paper-$(PAPER); $(MAKE) pdf)
77 ps:
78 (cd paper-$(PAPER); $(MAKE) ps)
80 world: ps pdf html tarballs
83 # Targets for each document:
84 api api.ps:
85 (cd paper-$(PAPER); $(MAKE) api.ps)
87 ext ext.ps:
88 (cd paper-$(PAPER); $(MAKE) ext.ps)
90 lib lib.ps:
91 (cd paper-$(PAPER); $(MAKE) lib.ps)
93 mac mac.ps:
94 (cd paper-$(PAPER); $(MAKE) mac.ps)
96 ref ref.ps:
97 (cd paper-$(PAPER); $(MAKE) ref.ps)
99 tut tut.ps:
100 (cd paper-$(PAPER); $(MAKE) tut.ps)
103 api.dvi:
104 (cd paper-$(PAPER); $(MAKE) api.dvi)
106 ext.dvi:
107 (cd paper-$(PAPER); $(MAKE) ext.dvi)
109 lib.dvi:
110 (cd paper-$(PAPER); $(MAKE) lib.dvi)
112 mac.dvi:
113 (cd paper-$(PAPER); $(MAKE) mac.dvi)
115 ref.dvi:
116 (cd paper-$(PAPER); $(MAKE) ref.dvi)
118 tut.dvi:
119 (cd paper-$(PAPER); $(MAKE) tut.dvi)
122 api.pdf:
123 (cd paper-$(PAPER); $(MAKE) api.pdf)
125 ext.pdf:
126 (cd paper-$(PAPER); $(MAKE) ext.pdf)
128 lib.pdf:
129 (cd paper-$(PAPER); $(MAKE) lib.pdf)
131 mac.pdf:
132 (cd paper-$(PAPER); $(MAKE) mac.pdf)
134 ref.pdf:
135 (cd paper-$(PAPER); $(MAKE) ref.pdf)
137 tut.pdf:
138 (cd paper-$(PAPER); $(MAKE) tut.pdf)
141 # The remaining part of the Makefile is concerned with various
142 # conversions, as described above. See also the README file.
144 info:
145 (cd $(INFODIR); $(MAKE))
147 # Targets to convert the manuals to HTML using Nikos Drakos' LaTeX to
148 # HTML converter. For more info on this program, see
149 # <URL:http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html>.
151 # Note that LaTeX2HTML inserts references to an icons directory in
152 # each page that it generates. I have placed a copy of this directory
153 # in the distribution to simplify the process of creating a
154 # self-contained HTML distribution; for this purpose I have also added
155 # a (trivial) index.html. Change the definition of $ICONSERVER in
156 # perl/l2hinit.perl to use a different location for the icons directory.
158 # If you have the standard LaTeX2HTML icons installed, the versions shipped
159 # with this documentation should be stored in a separate directory and used
160 # instead. The standard set does *not* include all the icons used in the
161 # Python documentation.
163 html:
164 (cd $(HTMLDIR); $(MAKE) PAPER=$(PAPER) -f ../html/Makefile)
166 htmlapi:
167 (cd $(HTMLDIR); $(MAKE) PAPER=$(PAPER) -f ../html/Makefile api)
169 htmlext:
170 (cd $(HTMLDIR); $(MAKE) PAPER=$(PAPER) -f ../html/Makefile ext)
172 htmllib:
173 (cd $(HTMLDIR); $(MAKE) PAPER=$(PAPER) -f ../html/Makefile lib)
175 htmlmac:
176 (cd $(HTMLDIR); $(MAKE) PAPER=$(PAPER) -f ../html/Makefile mac)
178 htmlref:
179 (cd $(HTMLDIR); $(MAKE) PAPER=$(PAPER) -f ../html/Makefile ref)
181 htmltut:
182 (cd $(HTMLDIR); $(MAKE) PAPER=$(PAPER) -f ../html/Makefile tut)
185 # webchecker needs an extra flag to process the huge index from the libref
186 webcheck:
187 (cd $(HTMLDIR); $(MAKE) -f ../html/Makefile webcheck)
190 # Release packaging targets:
192 info-$(RELEASE).tgz: info
193 (cd $(INFODIR); tar cf - README python.dir python-???.info*) \
194 | gzip -9 >$@
196 latex-$(RELEASE).tgz:
197 $(TOOLSDIR)/mktarball.sh $(RELEASE)
199 pdf-$(PAPER)-$(RELEASE).tgz: pdf
200 (cd paper-$(PAPER); tar cf - *.pdf) | gzip -9 >$@
202 postscript-$(PAPER)-$(RELEASE).tgz: ps
203 (cd paper-$(PAPER); $(MAKE) README)
204 (cd paper-$(PAPER); tar cf - *.ps README) | gzip -9 >$@
206 html-$(RELEASE).tgz: html
207 (cd $(HTMLDIR); tar cf - index.html ???/???.css ???/*.html */*.gif) \
208 | gzip -9 >$@
210 # convenience targets:
212 tarhtml: html-$(RELEASE).tgz
213 tarinfo: info-$(RELEASE).tgz
214 tarps: postscript-$(PAPER)-$(RELEASE).tgz
215 tarpdf: pdf-$(PAPER)-$(RELEASE).tgz
216 tarlatex: latex-$(RELEASE).tgz
218 tarballs: tarpdf tarps tarhtml tarinfo tarlatex
221 # Housekeeping targets
223 # Remove temporary files; all except the following:
224 # - sources: .tex, .bib, .sty, *.cls
225 # - useful results: .dvi, .pdf, .ps, .texi, .info
226 clean:
227 (cd paper-$(PAPER); $(MAKE) clean)
228 (cd $(HTMLDIR); $(MAKE) clean)
229 (cd $(INFODIR); $(MAKE) clean)
231 l2hclean:
232 (cd $(HTMLDIR); $(MAKE) clean)
234 # Remove temporaries as well as final products
235 clobber:
236 (cd $(HTMLDIR); $(MAKE) clobber)
237 rm -f html-$(RELEASE).tgz info-$(RELEASE).tgz
238 rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz
239 rm -f latex-$(RELEASE).tgz
240 (cd paper-$(PAPER); $(MAKE) clobber)
241 (cd $(HTMLDIR); $(MAKE) clobber)
242 (cd $(INFODIR); $(MAKE) clobber)
244 realclean: clobber
245 distclean: clobber