Debian Codegraph @

docs/Makefile

raw
1 # Makefile for Sphinx documentation
2 #
3
4 default:
5 sphinx-build . build/html/
6
7 # You can set these variables from the command line.
8 SPHINXOPTS =
9 SPHINXBUILD = sphinx-build
10 PAPER =
11 BUILDDIR = build
12
13 # User-friendly check for sphinx-build
14 ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
15 $(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 https://sphinx-doc.org/)
16 endif
17
18 # Internal variables.
19 PAPEROPT_a4 = -D latex_paper_size=a4
20 PAPEROPT_letter = -D latex_paper_size=letter
21 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
22 # the i18n builder cannot share the environment and doctrees with the others
23 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
24
25 .PHONY: help
26 help:
27 @echo "Please use \`make <target>' where <target> is one of"
28 @echo " html to make standalone HTML files"
29 @echo " dirhtml to make HTML files named index.html in directories"
30 @echo " changes to make an overview of all changed/added/deprecated items"
31 @echo " linkcheck to check all external links for integrity"
32 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
33 @echo " coverage to run coverage check of the documentation (if enabled)"
34
35 .PHONY: clean
36 clean:
37 rm -rf $(BUILDDIR)/*
38
39 .PHONY: html
40 html:
41 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
42 @echo
43 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
44
45 .PHONY: dirhtml
46 dirhtml:
47 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
48 @echo
49 @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
50
51 .PHONY: changes
52 changes:
53 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
54 @echo
55 @echo "The overview file is in $(BUILDDIR)/changes."
56
57 .PHONY: linkcheck
58 linkcheck:
59 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
60 @echo
61 @echo "Link check complete; look for any errors in the above output " \
62 "or in $(BUILDDIR)/linkcheck/output.txt."
63
64 .PHONY: doctest
65 doctest:
66 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
67 @echo "Testing of doctests in the sources finished, look at the " \
68 "results in $(BUILDDIR)/doctest/output.txt."
69
70 .PHONY: coverage
71 coverage:
72 $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
73 @echo "Testing of coverage in the sources finished, look at the " \
74 "results in $(BUILDDIR)/coverage/python.txt."