2 # Makefile for Python documentation
3 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 # You can set these variables from the command line.
8 SVNROOT
= http
://svn.python.org
/projects
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
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"
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
; \
42 svn update tools
/sphinx
43 svn update tools
/docutils
44 svn update tools
/pygments
47 mkdir
-p build
/$(BUILDER
) build
/doctrees
48 $(PYTHON
) tools
/sphinx-build.py
$(ALLSPHINXOPTS
)
53 @echo
"Build finished. The HTML pages are in build/html."
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
63 @echo
"Build finished; now you can run HTML Help Workshop with the" \
64 "build/htmlhelp/pydoc.hhp project file."
66 latex
: BUILDER
= latex
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
74 @echo
"The overview file is in build/changes."
76 linkcheck
: BUILDER
= linkcheck
78 @echo
"Link check complete; look for any errors in the above output " \
79 "or in build/$(BUILDER)/output.txt"
81 coverage
: BUILDER
= coverage
83 @echo
"Coverage finished; see c.txt and python.txt in build/coverage"