1- # Makefile for Sphinx documentation
1+ # Minimal makefile for Sphinx documentation
22#
33
4- # You can set these variables from the command line.
5- SPHINXOPTS =
6- SPHINXBUILD = sphinx-build
7- PAPER =
4+ # You can set these variables from the command line, and also
5+ # from the environment for the first two.
6+ SPHINXOPTS ?=
7+ SPHINXBUILD ?= sphinx-build
8+ SOURCEDIR = .
89BUILDDIR = _build
910
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-
15- .PHONY : help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
16-
11+ # Put it first so that "make" without argument is like "make help".
1712help :
18- @echo " Please use \` make <target>' where <target> is one of"
19- @echo " html to make standalone HTML files"
20- @echo " dirhtml to make HTML files named index.html in directories"
21- @echo " pickle to make pickle files"
22- @echo " json to make JSON files"
23- @echo " htmlhelp to make HTML files and a HTML help project"
24- @echo " qthelp to make HTML files and a qthelp project"
25- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
26- @echo " changes to make an overview of all changed/added/deprecated items"
27- @echo " linkcheck to check all external links for integrity"
28- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
29-
30- clean :
31- -rm -rf $(BUILDDIR ) /*
32-
33- html :
34- $(SPHINXBUILD ) -b html $(ALLSPHINXOPTS ) $(BUILDDIR ) /html
35- @echo
36- @echo " Build finished. The HTML pages are in $( BUILDDIR) /html."
37-
38- dirhtml :
39- $(SPHINXBUILD ) -b dirhtml $(ALLSPHINXOPTS ) $(BUILDDIR ) /dirhtml
40- @echo
41- @echo " Build finished. The HTML pages are in $( BUILDDIR) /dirhtml."
42-
43- pickle :
44- $(SPHINXBUILD ) -b pickle $(ALLSPHINXOPTS ) $(BUILDDIR ) /pickle
45- @echo
46- @echo " Build finished; now you can process the pickle files."
47-
48- json :
49- $(SPHINXBUILD ) -b json $(ALLSPHINXOPTS ) $(BUILDDIR ) /json
50- @echo
51- @echo " Build finished; now you can process the JSON files."
52-
53- htmlhelp :
54- $(SPHINXBUILD ) -b htmlhelp $(ALLSPHINXOPTS ) $(BUILDDIR ) /htmlhelp
55- @echo
56- @echo " Build finished; now you can run HTML Help Workshop with the" \
57- " .hhp project file in $( BUILDDIR) /htmlhelp."
58-
59- qthelp :
60- $(SPHINXBUILD ) -b qthelp $(ALLSPHINXOPTS ) $(BUILDDIR ) /qthelp
61- @echo
62- @echo " Build finished; now you can run " qcollectiongenerator" with the" \
63- " .qhcp project file in $( BUILDDIR) /qthelp, like this:"
64- @echo " # qcollectiongenerator $( BUILDDIR) /qthelp/MAppleT.qhcp"
65- @echo " To view the help file:"
66- @echo " # assistant -collectionFile $( BUILDDIR) /qthelp/MAppleT.qhc"
67-
68- latex :
69- $(SPHINXBUILD ) -b latex $(ALLSPHINXOPTS ) $(BUILDDIR ) /latex
70- @echo
71- @echo " Build finished; the LaTeX files are in $( BUILDDIR) /latex."
72- @echo " Run \` make all-pdf' or \` make all-ps' in that directory to" \
73- " run these through (pdf)latex."
74-
75- pdf : latex
76- cd $(BUILDDIR ) /latex;
77- make all-ps
78- cd ../..
79-
80- changes :
81- $(SPHINXBUILD ) -b changes $(ALLSPHINXOPTS ) $(BUILDDIR ) /changes
82- @echo
83- @echo " The overview file is in $( BUILDDIR) /changes."
84-
85- linkcheck :
86- $(SPHINXBUILD ) -b linkcheck $(ALLSPHINXOPTS ) $(BUILDDIR ) /linkcheck
87- @echo
88- @echo " Link check complete; look for any errors in the above output " \
89- " or in $( BUILDDIR) /linkcheck/output.txt."
13+ @$(SPHINXBUILD ) -M help " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
9014
91- doctest :
92- $(SPHINXBUILD ) -b doctest $(ALLSPHINXOPTS ) $(BUILDDIR ) /doctest
93- @echo " Testing of doctests in the sources finished, look at the " \
94- " results in $( BUILDDIR) /doctest/output.txt."
15+ .PHONY : help Makefile
9516
96- coverage :
97- $( SPHINXBUILD ) -b coverage $( ALLSPHINXOPTS ) $( BUILDDIR ) /coverage
98- @echo " Testing of coverage in the sources finished, look at the " \
99- " results in $( BUILDDIR) /coverage "
17+ # Catch-all target: route all unknown targets to Sphinx using the new
18+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+ % : Makefile
20+ @ $( SPHINXBUILD ) -M $@ " $( SOURCEDIR ) " " $( BUILDDIR) " $( SPHINXOPTS ) $( O )
0 commit comments