2 # Makefile for Python documentation
3 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 # You can set these variables from the command line.
8 SVNROOT
= http
://svn.python.org
/projects
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
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"
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
; \
47 svn update tools
/sphinx
48 svn update tools
/docutils
49 svn update tools
/jinja
50 svn update tools
/pygments
53 mkdir
-p build
/$(BUILDER
) build
/doctrees
54 $(PYTHON
) tools
/sphinx-build.py
$(ALLSPHINXOPTS
)
59 @echo
"Build finished. The HTML pages are in build/html."
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
69 @echo
"Build finished; now you can run HTML Help Workshop with the" \
70 "build/htmlhelp/pydoc.hhp project file."
72 latex
: BUILDER
= latex
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
80 @echo
"The overview file is in build/changes."
82 linkcheck
: BUILDER
= linkcheck
84 @echo
"Link check complete; look for any errors in the above output " \
85 "or in build/$(BUILDER)/output.txt"
87 coverage
: BUILDER
= coverage
89 @echo
"Coverage finished; see c.txt and python.txt in build/coverage"
91 doctest
: BUILDER
= doctest
93 @echo
"Testing of doctests in the sources finished, look at the " \
94 "results in build/doctest/output.txt"