Skip to content

Commit e5bb8a6

Browse files
author
Jesse Roberts
committed
newer sphinx, some docs
1 parent 315895b commit e5bb8a6

File tree

4 files changed

+142
-216
lines changed

4 files changed

+142
-216
lines changed

docs/Makefile

+7-55
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@ SPHINXBUILD = sphinx-build
77
PAPER =
88
BUILDDIR = _build
99

10+
# User-friendly check for sphinx-build
11+
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12+
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
13+
endif
14+
1015
# Internal variables.
1116
PAPEROPT_a4 = -D latex_paper_size=a4
1217
PAPEROPT_letter = -D latex_paper_size=letter
1318
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
1419
# the i18n builder cannot share the environment and doctrees with the others
1520
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
1621

17-
.PHONY: help
22+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
23+
1824
help:
1925
@echo "Please use \`make <target>' where <target> is one of"
2026
@echo " html to make standalone HTML files"
@@ -24,10 +30,8 @@ help:
2430
@echo " json to make JSON files"
2531
@echo " htmlhelp to make HTML files and a HTML help project"
2632
@echo " qthelp to make HTML files and a qthelp project"
27-
@echo " applehelp to make an Apple Help Book"
2833
@echo " devhelp to make HTML files and a Devhelp project"
2934
@echo " epub to make an epub"
30-
@echo " epub3 to make an epub3"
3135
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
3236
@echo " latexpdf to make LaTeX files and run them through pdflatex"
3337
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@@ -41,51 +45,41 @@ help:
4145
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
4246
@echo " linkcheck to check all external links for integrity"
4347
@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"
4648

47-
.PHONY: clean
4849
clean:
4950
rm -rf $(BUILDDIR)/*
5051

51-
.PHONY: html
5252
html:
5353
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
5454
@echo
5555
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
5656

57-
.PHONY: dirhtml
5857
dirhtml:
5958
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
6059
@echo
6160
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
6261

63-
.PHONY: singlehtml
6462
singlehtml:
6563
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
6664
@echo
6765
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
6866

69-
.PHONY: pickle
7067
pickle:
7168
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
7269
@echo
7370
@echo "Build finished; now you can process the pickle files."
7471

75-
.PHONY: json
7672
json:
7773
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
7874
@echo
7975
@echo "Build finished; now you can process the JSON files."
8076

81-
.PHONY: htmlhelp
8277
htmlhelp:
8378
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
8479
@echo
8580
@echo "Build finished; now you can run HTML Help Workshop with the" \
8681
".hhp project file in $(BUILDDIR)/htmlhelp."
8782

88-
.PHONY: qthelp
8983
qthelp:
9084
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
9185
@echo
@@ -95,16 +89,6 @@ qthelp:
9589
@echo "To view the help file:"
9690
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/YACT.qhc"
9791

98-
.PHONY: applehelp
99-
applehelp:
100-
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
101-
@echo
102-
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
103-
@echo "N.B. You won't be able to view it unless you put it in" \
104-
"~/Library/Documentation/Help or install it in your application" \
105-
"bundle."
106-
107-
.PHONY: devhelp
10892
devhelp:
10993
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
11094
@echo
@@ -114,112 +98,80 @@ devhelp:
11498
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/YACT"
11599
@echo "# devhelp"
116100

117-
.PHONY: epub
118101
epub:
119102
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
120103
@echo
121104
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
122105

123-
.PHONY: epub3
124-
epub3:
125-
$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
126-
@echo
127-
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
128-
129-
.PHONY: latex
130106
latex:
131107
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
132108
@echo
133109
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
134110
@echo "Run \`make' in that directory to run these through (pdf)latex" \
135111
"(use \`make latexpdf' here to do that automatically)."
136112

137-
.PHONY: latexpdf
138113
latexpdf:
139114
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
140115
@echo "Running LaTeX files through pdflatex..."
141116
$(MAKE) -C $(BUILDDIR)/latex all-pdf
142117
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
143118

144-
.PHONY: latexpdfja
145119
latexpdfja:
146120
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
147121
@echo "Running LaTeX files through platex and dvipdfmx..."
148122
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
149123
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
150124

151-
.PHONY: text
152125
text:
153126
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
154127
@echo
155128
@echo "Build finished. The text files are in $(BUILDDIR)/text."
156129

157-
.PHONY: man
158130
man:
159131
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
160132
@echo
161133
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
162134

163-
.PHONY: texinfo
164135
texinfo:
165136
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
166137
@echo
167138
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
168139
@echo "Run \`make' in that directory to run these through makeinfo" \
169140
"(use \`make info' here to do that automatically)."
170141

171-
.PHONY: info
172142
info:
173143
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
174144
@echo "Running Texinfo files through makeinfo..."
175145
make -C $(BUILDDIR)/texinfo info
176146
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
177147

178-
.PHONY: gettext
179148
gettext:
180149
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
181150
@echo
182151
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
183152

184-
.PHONY: changes
185153
changes:
186154
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
187155
@echo
188156
@echo "The overview file is in $(BUILDDIR)/changes."
189157

190-
.PHONY: linkcheck
191158
linkcheck:
192159
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
193160
@echo
194161
@echo "Link check complete; look for any errors in the above output " \
195162
"or in $(BUILDDIR)/linkcheck/output.txt."
196163

197-
.PHONY: doctest
198164
doctest:
199165
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
200166
@echo "Testing of doctests in the sources finished, look at the " \
201167
"results in $(BUILDDIR)/doctest/output.txt."
202168

203-
.PHONY: coverage
204-
coverage:
205-
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
206-
@echo "Testing of coverage in the sources finished, look at the " \
207-
"results in $(BUILDDIR)/coverage/python.txt."
208-
209-
.PHONY: xml
210169
xml:
211170
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
212171
@echo
213172
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
214173

215-
.PHONY: pseudoxml
216174
pseudoxml:
217175
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
218176
@echo
219177
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
220-
221-
.PHONY: dummy
222-
dummy:
223-
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
224-
@echo
225-
@echo "Build finished. Dummy builder generates no files."

0 commit comments

Comments
 (0)