Speed-up isinstance() for one easy case.
[python.git] / Doc / Makefile
blobe94be8160d6972bb3ae4cd8783a776969fd8acbd
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 =
12 ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_paper_size=$(PAPER) \
13 $(SPHINXOPTS) . build/$(BUILDER)
15 .PHONY: help checkout update build html web htmlhelp clean coverage
17 help:
18 @echo "Please use \`make <target>' where <target> is one of"
19 @echo " html to make standalone HTML files"
20 @echo " web to make file usable by Sphinx.web"
21 @echo " htmlhelp to make HTML files and a HTML help project"
22 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
23 @echo " changes to make an overview over all changed/added/deprecated items"
24 @echo " linkcheck to check all external links for integrity"
25 @echo " coverage to check documentation coverage for library and C API"
27 checkout:
28 @if [ ! -d tools/sphinx ]; then \
29 echo "Checking out Sphinx..."; \
30 svn checkout $(SVNROOT)/doctools/trunk/sphinx tools/sphinx; \
32 @if [ ! -d tools/docutils ]; then \
33 echo "Checking out Docutils..."; \
34 svn checkout $(SVNROOT)/external/docutils-0.4/docutils tools/docutils; \
36 @if [ ! -d tools/pygments ]; then \
37 echo "Checking out Pygments..."; \
38 svn checkout $(SVNROOT)/external/Pygments-0.9/pygments tools/pygments; \
41 update: checkout
42 svn update tools/sphinx
43 svn update tools/docutils
44 svn update tools/pygments
46 build: checkout
47 mkdir -p build/$(BUILDER) build/doctrees
48 $(PYTHON) tools/sphinx-build.py $(ALLSPHINXOPTS)
49 @echo
51 html: BUILDER = html
52 html: build
53 @echo "Build finished. The HTML pages are in build/html."
55 web: BUILDER = web
56 web: build
57 @echo "Build finished; now you can run"
58 @echo " PYTHONPATH=tools $(PYTHON) -m sphinx.web build/web"
59 @echo "to start the server."
61 htmlhelp: BUILDER = htmlhelp
62 htmlhelp: build
63 @echo "Build finished; now you can run HTML Help Workshop with the" \
64 "build/htmlhelp/pydoc.hhp project file."
66 latex: BUILDER = latex
67 latex: build
68 @echo "Build finished; the LaTeX files are in build/latex."
69 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
70 "run these through (pdf)latex."
72 changes: BUILDER = changes
73 changes: build
74 @echo "The overview file is in build/changes."
76 linkcheck: BUILDER = linkcheck
77 linkcheck: build
78 @echo "Link check complete; look for any errors in the above output " \
79 "or in build/$(BUILDER)/output.txt"
81 coverage: BUILDER = coverage
82 coverage: build
83 @echo "Coverage finished; see c.txt and python.txt in build/coverage"
85 clean:
86 -rm -rf build/*
87 -rm -rf tools/sphinx