|
5 | 5 | SPHINXOPTS =
|
6 | 6 | SPHINXBUILD = sphinx-build
|
7 | 7 | PAPER =
|
8 |
| -BUILDDIR = _build |
| 8 | +BUILDDIR = build |
| 9 | + |
| 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 |
9 | 14 |
|
10 | 15 | # Internal variables.
|
11 | 16 | PAPEROPT_a4 = -D latex_paper_size=a4
|
12 | 17 | PAPEROPT_letter = -D latex_paper_size=letter
|
13 | 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
14 | 19 | # the i18n builder cannot share the environment and doctrees with the others
|
15 |
| -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . |
| 20 | +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source |
16 | 21 |
|
17 | 22 | .PHONY: help
|
18 | 23 | help:
|
|
27 | 32 | @echo " applehelp to make an Apple Help Book"
|
28 | 33 | @echo " devhelp to make HTML files and a Devhelp project"
|
29 | 34 | @echo " epub to make an epub"
|
30 |
| - @echo " epub3 to make an epub3" |
31 | 35 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
32 | 36 | @echo " latexpdf to make LaTeX files and run them through pdflatex"
|
33 | 37 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
|
42 | 46 | @echo " linkcheck to check all external links for integrity"
|
43 | 47 | @echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
44 | 48 | @echo " coverage to run coverage check of the documentation (if enabled)"
|
45 |
| - @echo " dummy to check syntax errors of document sources" |
46 | 49 |
|
47 | 50 | .PHONY: clean
|
48 | 51 | clean:
|
@@ -120,12 +123,6 @@ epub:
|
120 | 123 | @echo
|
121 | 124 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
122 | 125 |
|
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 | 126 | .PHONY: latex
|
130 | 127 | latex:
|
131 | 128 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
@@ -217,9 +214,3 @@ pseudoxml:
|
217 | 214 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
218 | 215 | @echo
|
219 | 216 | @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