Debian Codegraph @

doc/Makefile

raw
1 # Makefile for Sphinx documentation
2 #
3
4 # You can set these variables from the command line.
5 SPHINXOPTS =
6 SPHINXBUILD = sphinx-build
7 PAPER =
8 BUILDDIR = _build
9
10 # Internal variables.
11 PAPEROPT_a4 = -D latex_paper_size=a4
12 PAPEROPT_letter = -D latex_paper_size=letter
13 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
14 # the i18n builder cannot share the environment and doctrees with the others
15 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
16
17 .PHONY: help
18 help:
19 @echo "Please use \`make <target>' where <target> is one of"
20 @echo " html to make standalone HTML files"
21 @echo " dirhtml to make HTML files named index.html in directories"
22 @echo " singlehtml to make a single large HTML file"
23 @echo " pickle to make pickle files"
24 @echo " json to make JSON files"
25 @echo " htmlhelp to make HTML files and a HTML help project"
26 @echo " qthelp to make HTML files and a qthelp project"
27 @echo " applehelp to make an Apple Help Book"
28 @echo " devhelp to make HTML files and a Devhelp project"
29 @echo " epub to make an epub"
30 @echo " epub3 to make an epub3"
31 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
32 @echo " latexpdf to make LaTeX files and run them through pdflatex"
33 @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
34 @echo " text to make text files"
35 @echo " man to make manual pages"
36 @echo " texinfo to make Texinfo files"
37 @echo " info to make Texinfo files and run them through makeinfo"
38 @echo " gettext to make PO message catalogs"
39 @echo " changes to make an overview of all changed/added/deprecated items"
40 @echo " xml to make Docutils-native XML files"
41 @echo " pseudoxml to make pseudoxml-XML files for display purposes"
42 @echo " linkcheck to check all external links for integrity"
43 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
44 @echo " coverage to run coverage check of the documentation (if enabled)"
45 @echo " dummy to check syntax errors of document sources"
46
47 .PHONY: clean
48 clean:
49 rm -rf $(BUILDDIR)/*
50
51 .PHONY: html
52 html:
53 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
54 bash sphinx-html-hack.bash
55 @echo
56 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
57
58 .PHONY: dirhtml
59 dirhtml:
60 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
61 @echo
62 @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
63
64 .PHONY: singlehtml
65 singlehtml:
66 $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
67 @echo
68 @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
69
70 .PHONY: pickle
71 pickle:
72 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
73 @echo
74 @echo "Build finished; now you can process the pickle files."
75
76 .PHONY: json
77 json:
78 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
79 @echo
80 @echo "Build finished; now you can process the JSON files."
81
82 .PHONY: htmlhelp
83 htmlhelp:
84 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
85 @echo
86 @echo "Build finished; now you can run HTML Help Workshop with the" \
87 ".hhp project file in $(BUILDDIR)/htmlhelp."
88
89 .PHONY: qthelp
90 qthelp:
91 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
92 @echo
93 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
94 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
95 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/lager.qhcp"
96 @echo "To view the help file:"
97 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/lager.qhc"
98
99 .PHONY: applehelp
100 applehelp:
101 $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
102 @echo
103 @echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
104 @echo "N.B. You won't be able to view it unless you put it in" \
105 "~/Library/Documentation/Help or install it in your application" \
106 "bundle."
107
108 .PHONY: devhelp
109 devhelp:
110 $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
111 @echo
112 @echo "Build finished."
113 @echo "To view the help file:"
114 @echo "# mkdir -p $$HOME/.local/share/devhelp/lager"
115 @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/lager"
116 @echo "# devhelp"
117
118 .PHONY: epub
119 epub:
120 $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
121 @echo
122 @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
123
124 .PHONY: epub3
125 epub3:
126 $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
127 @echo
128 @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
129
130 .PHONY: latex
131 latex:
132 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
133 @echo
134 @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
135 @echo "Run \`make' in that directory to run these through (pdf)latex" \
136 "(use \`make latexpdf' here to do that automatically)."
137
138 .PHONY: latexpdf
139 latexpdf:
140 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
141 @echo "Running LaTeX files through pdflatex..."
142 $(MAKE) -C $(BUILDDIR)/latex all-pdf
143 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
144
145 .PHONY: latexpdfja
146 latexpdfja:
147 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
148 @echo "Running LaTeX files through platex and dvipdfmx..."
149 $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
150 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
151
152 .PHONY: text
153 text:
154 $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
155 @echo
156 @echo "Build finished. The text files are in $(BUILDDIR)/text."
157
158 .PHONY: man
159 man:
160 $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
161 @echo
162 @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
163
164 .PHONY: texinfo
165 texinfo:
166 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
167 @echo
168 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
169 @echo "Run \`make' in that directory to run these through makeinfo" \
170 "(use \`make info' here to do that automatically)."
171
172 .PHONY: info
173 info:
174 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
175 @echo "Running Texinfo files through makeinfo..."
176 make -C $(BUILDDIR)/texinfo info
177 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
178
179 .PHONY: gettext
180 gettext:
181 $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
182 @echo
183 @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
184
185 .PHONY: changes
186 changes:
187 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
188 @echo
189 @echo "The overview file is in $(BUILDDIR)/changes."
190
191 .PHONY: linkcheck
192 linkcheck:
193 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
194 @echo
195 @echo "Link check complete; look for any errors in the above output " \
196 "or in $(BUILDDIR)/linkcheck/output.txt."
197
198 .PHONY: doctest
199 doctest:
200 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
201 @echo "Testing of doctests in the sources finished, look at the " \
202 "results in $(BUILDDIR)/doctest/output.txt."
203
204 .PHONY: coverage
205 coverage:
206 $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
207 @echo "Testing of coverage in the sources finished, look at the " \
208 "results in $(BUILDDIR)/coverage/python.txt."
209
210 .PHONY: xml
211 xml:
212 $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
213 @echo
214 @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
215
216 .PHONY: pseudoxml
217 pseudoxml:
218 $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
219 @echo
220 @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
221
222 .PHONY: dummy
223 dummy:
224 $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
225 @echo
226 @echo "Build finished. Dummy builder generates no files."