Debian Codegraph @

doc/sphinx/Makefile

raw
1 # Makefile for Sphinx documentation
2 #
3
4 # You can set these variables from the command line.
5 PYTHON ?= python
6 SPHINXOPTS = -W --keep-going -n
7 SPHINXBUILD = $(PYTHON) -m sphinx
8 PAPER =
9 BUILDDIR = _build
10 ifdef ComSpec
11 RMDIR = rmdir /s/q
12 else
13 RMDIR = rm -rf
14 endif
15
16 # Internal variables.
17 PAPEROPT_a4 = -D latex_paper_size=a4
18 PAPEROPT_letter = -D latex_paper_size=letter
19 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
20
21 .PHONY: help api clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest build
22
23 help:
24 @echo "Please use \`make <target>' where <target> is one of"
25 @echo " html to make standalone HTML files"
26 @echo " dirhtml to make HTML files named index.html in directories"
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 " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
32 @echo " changes to make an overview of all changed/added/deprecated items"
33 @echo " linkcheck to check all external links for integrity"
34 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
35
36 clean:
37 -rm -rf _build build plots/*.pyc plots/*.png api __pycache__
38
39 api: genmods.py
40 -$(RMDIR) api
41 "$(PYTHON)" genmods.py
42
43 html: api
44 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
45 @echo
46 @echo "Build finished. The HTML pages are in _build/html."
47
48 dirhtml:
49 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
50 @echo
51 @echo "Build finished. The HTML pages are in _build/dirhtml."
52
53 pickle:
54 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
55 @echo
56 @echo "Build finished; now you can process the pickle files."
57
58 json:
59 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
60 @echo
61 @echo "Build finished; now you can process the JSON files."
62
63 htmlhelp:
64 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
65 @echo
66 @echo "Build finished; now you can run HTML Help Workshop with the" \
67 ".hhp project file in _build/htmlhelp."
68
69 qthelp:
70 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
71 @echo
72 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
73 ".qhcp project file in _build/qthelp, like this:"
74 @echo "# qcollectiongenerator _build/qthelp/Periodic Table.qhcp"
75 @echo "To view the help file:"
76 @echo "# assistant -collectionFile _build/qthelp/Periodic Table.qhc"
77
78 latex:
79 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
80 @echo
81 @echo "Build finished; the LaTeX files are in _build/latex."
82 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
83 "run these through (pdf)latex."
84
85 pdf: latex
86 $(MAKE) -C _build/latex all-pdf
87
88 changes:
89 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
90 @echo
91 @echo "The overview file is in _build/changes."
92
93 linkcheck:
94 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
95 @echo
96 @echo "Link check complete; look for any errors in the above output " \
97 "or in _build/linkcheck/output.txt."
98
99 doctest:
100 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
101 @echo "Testing of doctests in the sources finished, look at the " \
102 "results in _build/doctest/output.txt."