Debian Codegraph @

docs/Makefile

raw
1 # Makefile for Sphinx documentation
2 #
3
4 # You can set these variables from the command line.
5 SPHINXOPTS =
6 SPHINXBUILD = ../bin/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 # the i18n builder cannot share the environment and doctrees with the others
15 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
16
17 .PHONY: help
18 help:
19 @echo "Please use \`make <target>' where <target> is one of"
20 @egrep '^\.PHONY: [a-zA-Z_-]+ .*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = "(: |##)"}; {printf "\033[36m%-30s\033[0m %s\n", $$2, $$3}'
21
22 .PHONY: clean
23 clean:
24 -rm -rf $(BUILDDIR)/*
25
26 .PHONY: html ## to make standalone HTML files
27 html:
28 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
29 @echo
30 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
31
32 .PHONY: dirhtml ## to make HTML files named index.html in directories
33 dirhtml:
34 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
35 @echo
36 @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
37
38 .PHONY: singlehtml ## to make a single large HTML file
39 singlehtml:
40 $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
41 @echo
42 @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
43
44 .PHONY: pickle ## to make pickle files
45 pickle:
46 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
47 @echo
48 @echo "Build finished; now you can process the pickle files."
49
50 .PHONY: json ## to make JSON files
51 json:
52 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
53 @echo
54 @echo "Build finished; now you can process the JSON files."
55
56 .PHONY: htmlhelp ## to make HTML files and a HTML help project
57 htmlhelp:
58 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
59 @echo
60 @echo "Build finished; now you can run HTML Help Workshop with the" \
61 ".hhp project file in $(BUILDDIR)/htmlhelp."
62
63 .PHONY: qthelp ## to make HTML files and a qthelp project
64 qthelp:
65 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
66 @echo
67 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
68 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
69 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/kazoo.qhcp"
70 @echo "To view the help file:"
71 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/kazoo.qhc"
72
73 .PHONY: devhelp ## to make HTML files and a Devhelp project
74 devhelp:
75 $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
76 @echo
77 @echo "Build finished."
78 @echo "To view the help file:"
79 @echo "# mkdir -p $$HOME/.local/share/devhelp/kazoo"
80 @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/kazoo"
81 @echo "# devhelp"
82
83 .PHONY: epub ## to make an epub
84 epub:
85 $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
86 @echo
87 @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
88
89 .PHONY: latex ## to make LaTeX files, you can set PAPER=a4 or PAPER=letter
90 latex:
91 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
92 @echo
93 @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
94 @echo "Run \`make' in that directory to run these through (pdf)latex" \
95 "(use \`make latexpdf' here to do that automatically)."
96
97 .PHONY: latexpdf ## to make LaTeX files and run them through pdflatex
98 latexpdf:
99 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
100 @echo "Running LaTeX files through pdflatex..."
101 $(MAKE) -C $(BUILDDIR)/latex all-pdf
102 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
103
104 .PHONY: text ## to make text files
105 text:
106 $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
107 @echo
108 @echo "Build finished. The text files are in $(BUILDDIR)/text."
109
110 .PHONY: man ## to make manual pages
111 man:
112 $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
113 @echo
114 @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
115
116 .PHONY: texinfo ## to make Texinfo files
117 texinfo:
118 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
119 @echo
120 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
121 @echo "Run \`make' in that directory to run these through makeinfo" \
122 "(use \`make info' here to do that automatically)."
123
124 .PHONY: info ## to make Texinfo files and run them through makeinfo
125 info:
126 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
127 @echo "Running Texinfo files through makeinfo..."
128 make -C $(BUILDDIR)/texinfo info
129 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
130
131 .PHONY: gettext ## to make PO message catalogs
132 gettext:
133 $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
134 @echo
135 @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
136
137 .PHONY: changes ## to make an overview of all changed/added/deprecated items
138 changes:
139 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
140 @echo
141 @echo "The overview file is in $(BUILDDIR)/changes."
142
143 .PHONY: linkcheck ## to check all external links for integrity
144 linkcheck:
145 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
146 @echo
147 @echo "Link check complete; look for any errors in the above output " \
148 "or in $(BUILDDIR)/linkcheck/output.txt."
149
150 .PHONY: doctest ## to run all doctests embedded in the documentation (if enabled)
151 doctest:
152 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
153 @echo "Testing of doctests in the sources finished, look at the " \
154 "results in $(BUILDDIR)/doctest/output.txt."