Debian Codegraph @

docs/Makefile

raw
1 # Makefile for Sphinx documentation
2 #
3
4 # You can set these variables from the command line.
5 SPHINXOPTS = -W
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
15 .PHONY: help clean html text web pickle htmlhelp latex latexpdf xelatexpdf changes linkcheck epub doctest
16
17 help:
18 @echo "Please use \`make <target>' where <target> is one of"
19 @echo " html to make standalone HTML files"
20 @echo " text to make text files"
21 @echo " pickle to make pickle files (usable by e.g. sphinx-web)"
22 @echo " htmlhelp to make HTML files and a HTML help project"
23 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
24 @echo " latexpdf to make LaTeX files and run them through pdflatex"
25 @echo " xelatexpdf to make LaTeX files and run them through xelatex"
26 @echo " changes to make an overview over all changed/added/deprecated items"
27 @echo " linkcheck to check all external links for integrity"
28 @echo " epub to make an epub"
29 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
30
31 clean:
32 -rm -rf $(BUILDDIR)/*
33
34 xelatexpdf:
35 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
36 @echo "Running LaTeX files through xelatex..."
37 $(MAKE) PDFLATEX=xelatex -C $(BUILDDIR)/latex all-pdf
38 @echo "xelatex finished; the PDF files are in $(BUILDDIR)/latex."
39
40 html:
41 mkdir -p $(BUILDDIR)/html $(BUILDDIR)/doctrees
42 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
43 @echo
44 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
45
46 text:
47 mkdir -p $(BUILDDIR)/text $(BUILDDIR)/doctrees
48 $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
49 @echo
50 @echo "Build finished. The HTML pages are in $(BUILDDIR)/text."
51
52 pickle:
53 mkdir -p $(BUILDDIR)/pickle $(BUILDDIR)/doctrees
54 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
55 @echo
56 @echo "Build finished; now you can process the pickle files or run"
57 @echo " sphinx-web $(BUILDDIR)/pickle"
58 @echo "to start the sphinx-web server."
59
60 web: pickle
61
62 htmlhelp:
63 mkdir -p $(BUILDDIR)/htmlhelp $(BUILDDIR)/doctrees
64 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
65 @echo
66 @echo "Build finished; now you can run HTML Help Workshop with the" \
67 ".hhp project file in $(BUILDDIR)/htmlhelp."
68
69 latex:
70 mkdir -p $(BUILDDIR)/latex $(BUILDDIR)/doctrees
71 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
72 cp _static/*.png $(BUILDDIR)/latex
73 ./convert_images.sh
74 cp _static/latex-warning.png $(BUILDDIR)/latex
75 cp _static/latex-note.png $(BUILDDIR)/latex
76 @echo
77 @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
78 @echo "Run \`make xelatexpdf' to build a PDF file from them."
79
80 latexpdf:
81 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
82 @echo "Running LaTeX files through pdflatex..."
83 $(MAKE) -C $(BUILDDIR)/latex all-pdf
84 @echo "pdflatex finished; the PDF file is in $(BUILDDIR)/latex."
85
86 changes:
87 mkdir -p $(BUILDDIR)/changes $(BUILDDIR)/doctrees
88 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
89 @echo
90 @echo "The overview file is in $(BUILDDIR)/changes."
91
92 linkcheck:
93 mkdir -p $(BUILDDIR)/linkcheck $(BUILDDIR)/doctrees
94 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
95 @echo
96 @echo "Link check complete; look for any errors in the above output " \
97 "or in $(BUILDDIR)/linkcheck/output.txt."
98
99 epub:
100 $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
101 @echo
102 @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
103
104 doctest:
105 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
106 @echo "Testing of doctests in the sources finished, look at the " \
107 "results in $(BUILDDIR)/doctest/output.txt."