Docstring typo
[python.git] / Doc / Makefile
blob9c421cdbfb23437acd8e90c330653eeba49e8517
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 " text to make plain text files"
25 @echo " changes to make an overview over all changed/added/deprecated items"
26 @echo " linkcheck to check all external links for integrity"
27 @echo " coverage to check documentation coverage for library and C API"
29 checkout:
30 @if [ ! -d tools/sphinx ]; then \
31 echo "Checking out Sphinx..."; \
32 svn checkout $(SVNROOT)/doctools/trunk/sphinx tools/sphinx; \
34 @if [ ! -d tools/docutils ]; then \
35 echo "Checking out Docutils..."; \
36 svn checkout $(SVNROOT)/external/docutils-0.5/docutils tools/docutils; \
38 @if [ ! -d tools/jinja ]; then \
39 echo "Checking out Jinja..."; \
40 svn checkout $(SVNROOT)/external/Jinja-1.2/jinja tools/jinja; \
42 @if [ ! -d tools/pygments ]; then \
43 echo "Checking out Pygments..."; \
44 svn checkout $(SVNROOT)/external/Pygments-0.10/pygments tools/pygments; \
47 update: checkout
48 svn update tools/sphinx
49 svn update tools/docutils
50 svn update tools/jinja
51 svn update tools/pygments
53 build: checkout
54 mkdir -p build/$(BUILDER) build/doctrees
55 $(PYTHON) tools/sphinx-build.py $(ALLSPHINXOPTS)
56 @echo
58 html: BUILDER = html
59 html: build
60 @echo "Build finished. The HTML pages are in build/html."
62 web: BUILDER = web
63 web: build
64 @echo "Build finished; now you can run"
65 @echo " PYTHONPATH=tools $(PYTHON) -m sphinx.web build/web"
66 @echo "to start the server."
68 htmlhelp: BUILDER = htmlhelp
69 htmlhelp: build
70 @echo "Build finished; now you can run HTML Help Workshop with the" \
71 "build/htmlhelp/pydoc.hhp project file."
73 latex: BUILDER = latex
74 latex: build
75 @echo "Build finished; the LaTeX files are in build/latex."
76 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
77 "run these through (pdf)latex."
79 text: BUILDER = text
80 text: build
81 @echo "Build finished; the text files are in build/text."
83 changes: BUILDER = changes
84 changes: build
85 @echo "The overview file is in build/changes."
87 linkcheck: BUILDER = linkcheck
88 linkcheck: build
89 @echo "Link check complete; look for any errors in the above output " \
90 "or in build/$(BUILDER)/output.txt"
92 coverage: BUILDER = coverage
93 coverage: build
94 @echo "Coverage finished; see c.txt and python.txt in build/coverage"
96 doctest: BUILDER = doctest
97 doctest: build
98 @echo "Testing of doctests in the sources finished, look at the " \
99 "results in build/doctest/output.txt"
101 pydoc-topics: BUILDER = pydoc-topics
102 pydoc-topics: build
103 @echo "Building finished; now copy build/pydoc-topics/pydoc_topics.py " \
104 "into the Lib/ directory"
106 htmlview: html
107 $(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"
108 clean:
109 -rm -rf build/*
110 -rm -rf tools/sphinx