2
# included from Top Level Makefile.am
3
# All paths should be given relative to the root
5
# Makefile for Sphinx documentation
8
SPHINXOPTS = ${SPHINX_WARNINGS} -q
10
SPHINX_BUILDDIR = ${abs_top_builddir}/docs
13
PAPEROPT_a4 = -D latex_paper_size=a4
14
PAPEROPT_letter = -D latex_paper_size=letter
15
ALLSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SPHINX_BUILDDIR)
17
.PHONY: clean-docs-check
19
-rm -rf docs/_build docs/doctrees man/.doctrees/
21
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
24
@echo "Please use \`make <target>' where <target> is one of"
25
@echo " html to make standalone HTML files"
26
@echo " singlehtml to make a single large HTML file"
27
@echo " pickle to make pickle files"
28
@echo " json to make JSON files"
29
@echo " htmlhelp to make HTML files and a HTML help project"
30
@echo " qthelp to make HTML files and a qthelp project"
31
@echo " devhelp to make HTML files and a Devhelp project"
32
@echo " epub to make an epub"
33
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
34
@echo " latexpdf to make LaTeX files and run them through pdflatex"
35
@echo " text to make text files"
36
@echo " man to make manual pages"
37
@echo " changes to make an overview of all changed/added/deprecated items"
38
@echo " linkcheck to check all external links for integrity"
39
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
41
install-html-local: html-local
42
@$(MKDIR_P) $(htmldir)/html
43
@cp -r ${top_builddir}/html $(htmldir)/
45
html-local: docs/conf.py
46
@PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) ${top_builddir}/html
48
singlehtml: html-local
49
@PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/singlehtml
52
PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/pickle
54
@echo "Build finished; now you can process the pickle files."
57
PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/json
59
@echo "Build finished; now you can process the JSON files."
61
htmlhelp: docs/conf.py
62
PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/htmlhelp
64
@echo "Build finished; now you can run HTML Help Workshop with the" \
65
".hhp project file in $(SPHINX_BUILDDIR)/htmlhelp."
68
PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/epub
70
@echo "Build finished. The epub file is in $(SPHINX_BUILDDIR)/epub."
73
PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex
75
@echo "Build finished; the LaTeX files are in $(SPHINX_BUILDDIR)/latex."
76
@echo "Run \`make' in that directory to run these through (pdf)latex" \
77
"(use \`make latexpdf' here to do that automatically)."
80
PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex
81
@echo "Running LaTeX files through pdflatex..."
82
make -C $(SPHINX_BUILDDIR)/latex all-pdf
83
@echo "pdflatex finished; the PDF files are in $(SPHINX_BUILDDIR)/latex."
86
@PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/text
89
@PYTHONPATH=$(SPHINX_BUILDDIR)/docs $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) ${top_builddir}/man
93
@PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/changes
95
linkcheck: docs/conf.py
96
PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/linkcheck
99
PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/doctest
100
@echo "Testing of doctests in the sources finished, look at the " \
101
"results in $(SPHINX_BUILDDIR)/doctest/output.txt."