UserString.MutableString has been removed in Python 3.0.
[python.git] / Doc / Makefile
blob5e17cf83221eac291f1ffbbc8c5343430ddfd88f
2 # Makefile for Python documentation
3 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 # You can set these variables from the command line.
7 PYTHON = python
8 SVNROOT = http://svn.python.org/projects
9 SPHINXOPTS =
10 PAPER =
11 SOURCES =
13 ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_paper_size=$(PAPER) \
14 $(SPHINXOPTS) . build/$(BUILDER) $(SOURCES)
16 .PHONY: help checkout update build html web htmlhelp clean coverage
18 help:
19 @echo "Please use \`make <target>' where <target> is one of"
20 @echo " html to make standalone HTML files"
21 @echo " web to make file usable by Sphinx.web"
22 @echo " htmlhelp to make HTML files and a HTML help project"
23 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
24 @echo " changes to make an overview over all changed/added/deprecated items"
25 @echo " linkcheck to check all external links for integrity"
26 @echo " coverage to check documentation coverage for library and C API"
28 checkout:
29 @if [ ! -d tools/sphinx ]; then \
30 echo "Checking out Sphinx..."; \
31 svn checkout $(SVNROOT)/doctools/trunk/sphinx tools/sphinx; \
33 @if [ ! -d tools/docutils ]; then \
34 echo "Checking out Docutils..."; \
35 svn checkout $(SVNROOT)/external/docutils-0.4/docutils tools/docutils; \
37 @if [ ! -d tools/jinja ]; then \
38 echo "Checking out Jinja..."; \
39 svn checkout $(SVNROOT)/external/Jinja-1.1/jinja tools/jinja; \
41 @if [ ! -d tools/pygments ]; then \
42 echo "Checking out Pygments..."; \
43 svn checkout $(SVNROOT)/external/Pygments-0.9/pygments tools/pygments; \
46 update: checkout
47 svn update tools/sphinx
48 svn update tools/docutils
49 svn update tools/jinja
50 svn update tools/pygments
52 build: checkout
53 mkdir -p build/$(BUILDER) build/doctrees
54 $(PYTHON) tools/sphinx-build.py $(ALLSPHINXOPTS)
55 @echo
57 html: BUILDER = html
58 html: build
59 @echo "Build finished. The HTML pages are in build/html."
61 web: BUILDER = web
62 web: build
63 @echo "Build finished; now you can run"
64 @echo " PYTHONPATH=tools $(PYTHON) -m sphinx.web build/web"
65 @echo "to start the server."
67 htmlhelp: BUILDER = htmlhelp
68 htmlhelp: build
69 @echo "Build finished; now you can run HTML Help Workshop with the" \
70 "build/htmlhelp/pydoc.hhp project file."
72 latex: BUILDER = latex
73 latex: build
74 @echo "Build finished; the LaTeX files are in build/latex."
75 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
76 "run these through (pdf)latex."
78 changes: BUILDER = changes
79 changes: build
80 @echo "The overview file is in build/changes."
82 linkcheck: BUILDER = linkcheck
83 linkcheck: build
84 @echo "Link check complete; look for any errors in the above output " \
85 "or in build/$(BUILDER)/output.txt"
87 coverage: BUILDER = coverage
88 coverage: build
89 @echo "Coverage finished; see c.txt and python.txt in build/coverage"
91 doctest: BUILDER = doctest
92 doctest: build
93 @echo "Testing of doctests in the sources finished, look at the " \
94 "results in build/doctest/output.txt"
96 clean:
97 -rm -rf build/*
98 -rm -rf tools/sphinx