1
# Makefile for Sphinx documentation
4
# You can set these variables from the command line.
6
SPHINXBUILD = sphinx-build
10
PAPEROPT_a4 = -D latex_paper_size=a4
11
PAPEROPT_letter = -D latex_paper_size=letter
12
ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
14
# Note that this assumes name of the output dir is same as name of the rule.
15
define make_output_dirs
16
# Create output directory (only needed for sphinx < 0.5)
17
[ -d _build ] || mkdir _build
18
[ -d "_build/$@" ] || mkdir "_build/$@"
19
# Workaround for a bug in sphinx < 0.5 where it tries to delete
20
# nonexistent static dirs and does not catch the exception. This was
21
# fixed in svn+ssh://pythondev@svn.python.org/doctools/branches/0.4.x
22
# at r65551 and merged as 280b62246342 in hg branch released as 0.5.
23
[ -d "_build/$@/_static" ] || mkdir "_build/$@/_static"
24
for fn in _static/*; do \
25
[ ! -d "$$fn" ] && continue; \
26
[ -d "_build/$@/$$fn" ] || mkdir "_build/$@/$$fn"; \
30
.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
33
@echo "Please use \`make <target>' where <target> is one of"
34
@echo " html to make standalone HTML files"
35
@echo " dirhtml to make HTML files named index.html in directories"
36
@echo " pickle to make pickle files"
37
@echo " json to make JSON files"
38
@echo " htmlhelp to make HTML files and a HTML help project"
39
@echo " qthelp to make HTML files and a qthelp project"
40
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
41
@echo " changes to make an overview of all changed/added/deprecated items"
42
@echo " linkcheck to check all external links for integrity"
43
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
50
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
52
@echo "Build finished. The HTML pages are in _build/html."
56
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
58
@echo "Build finished. The HTML pages are in _build/dirhtml."
62
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
64
@echo "Build finished; now you can process the pickle files."
68
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
70
@echo "Build finished; now you can process the JSON files."
74
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
76
@echo "Build finished; now you can run HTML Help Workshop with the" \
77
".hhp project file in _build/htmlhelp."
81
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
83
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
84
".qhcp project file in _build/qthelp, like this:"
85
@echo "# qcollectiongenerator _build/qthelp/Bazaar.qhcp"
86
@echo "To view the help file:"
87
@echo "# assistant -collectionFile _build/qthelp/Bazaar.qhc"
91
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
93
@echo "Build finished; the LaTeX files are in _build/latex."
94
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
95
"run these through (pdf)latex."
99
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
101
@echo "The overview file is in _build/changes."
105
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
107
@echo "Link check complete; look for any errors in the above output " \
108
"or in _build/linkcheck/output.txt."
112
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
113
@echo "Testing of doctests in the sources finished, look at the " \
114
"results in _build/doctest/output.txt."
118
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) _build/texinfo
119
# Now build the info files using the Makefile provided by Sphinx
120
$(MAKE) -C _build/texinfo