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