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
25 @echo "Please use \`make <target>' where <target> is one of"
26 @echo " html to make standalone HTML files"
27 @echo " singlehtml to make a single large HTML file"
28 @echo " pickle to make pickle files"
29 @echo " json to make JSON files"
30 @echo " htmlhelp to make HTML files and a HTML help project"
31 @echo " qthelp to make HTML files and a qthelp project"
32 @echo " devhelp to make HTML files and a Devhelp project"
33 @echo " epub to make an epub"
34 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
35 @echo " latexpdf to make LaTeX files and run them through pdflatex"
36 @echo " text to make text files"
37 @echo " man to make manual pages"
38 @echo " changes to make an overview of all changed/added/deprecated items"
39 @echo " linkcheck to check all external links for integrity"
40 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
42 install-html-local: html-local
43 @$(MKDIR_P) $(htmldir)/html
44 @cp -r ${top_builddir}/html $(htmldir)/
46 html-local: docs/conf.py
47 @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) ${top_builddir}/html
49 singlehtml: html-local
50 @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/singlehtml
53 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/pickle
55 @echo "Build finished; now you can process the pickle files."
58 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/json
60 @echo "Build finished; now you can process the JSON files."
62 htmlhelp: docs/conf.py
63 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/htmlhelp
65 @echo "Build finished; now you can run HTML Help Workshop with the" \
66 ".hhp project file in $(SPHINX_BUILDDIR)/htmlhelp."
69 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/epub
71 @echo "Build finished. The epub file is in $(SPHINX_BUILDDIR)/epub."
74 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex
76 @echo "Build finished; the LaTeX files are in $(SPHINX_BUILDDIR)/latex."
77 @echo "Run \`make' in that directory to run these through (pdf)latex" \
78 "(use \`make latexpdf' here to do that automatically)."
81 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex
82 @echo "Running LaTeX files through pdflatex..."
83 make -C $(SPHINX_BUILDDIR)/latex all-pdf
84 @echo "pdflatex finished; the PDF files are in $(SPHINX_BUILDDIR)/latex."
87 @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/text
91 @PYTHONPATH=$(SPHINX_BUILDDIR)/docs $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) ${top_builddir}/man
100 @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/changes
102 linkcheck: docs/conf.py
103 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/linkcheck
105 doctest: docs/conf.py
106 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/doctest
107 @echo "Testing of doctests in the sources finished, look at the " \
108 "results in $(SPHINX_BUILDDIR)/doctest/output.txt."