1 ## SPDX-License-Identifier: GPL-2.0-only
2 # Makefile for Sphinx documentation
5 # You can set these variables from the command line.
7 SPHINXBUILD = sphinx-build
8 SPHINXAUTOBUILD = sphinx-autobuild
13 PAPEROPT_a4 = -D latex_paper_size=a4
14 PAPEROPT_letter = -D latex_paper_size=letter
15 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
16 # the i18n builder cannot share the environment and doctrees with the others
17 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
21 @echo "Please use \`make <target>' where <target> is one of"
22 @echo " html to make standalone HTML files"
23 @echo " dirhtml to make HTML files named index.html in directories"
24 @echo " singlehtml to make a single large HTML file"
25 @echo " pickle to make pickle files"
26 @echo " json to make JSON files"
27 @echo " htmlhelp to make HTML files and a HTML help project"
28 @echo " qthelp to make HTML files and a qthelp project"
29 @echo " applehelp to make an Apple Help Book"
30 @echo " devhelp to make HTML files and a Devhelp project"
31 @echo " epub to make an epub"
32 @echo " epub3 to make an epub3"
33 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
34 @echo " latexpdf to make LaTeX files and run them through pdflatex"
35 @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
36 @echo " text to make text files"
37 @echo " man to make manual pages"
38 @echo " texinfo to make Texinfo files"
39 @echo " info to make Texinfo files and run them through makeinfo"
40 @echo " gettext to make PO message catalogs"
41 @echo " changes to make an overview of all changed/added/deprecated items"
42 @echo " xml to make Docutils-native XML files"
43 @echo " pseudoxml to make pseudoxml-XML files for display purposes"
44 @echo " linkcheck to check all external links for integrity"
45 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
46 @echo " coverage to run coverage check of the documentation (if enabled)"
47 @echo " dummy to check syntax errors of document sources"
55 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
57 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
61 @echo "Starting sphinx-autobuild. The HTML pages are in $(BUILDDIR)."
62 @echo "Press Ctrl-C to stop."
64 $(SPHINXAUTOBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)
68 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
70 @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
74 $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
76 @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
80 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
82 @echo "Build finished; now you can process the pickle files."
86 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
88 @echo "Build finished; now you can process the JSON files."
92 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
94 @echo "Build finished; now you can run HTML Help Workshop with the" \
95 ".hhp project file in $(BUILDDIR)/htmlhelp."
99 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
101 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
102 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
103 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/coreboot.qhcp"
104 @echo "To view the help file:"
105 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/coreboot.qhc"
109 $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
111 @echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
112 @echo "N.B. You won't be able to view it unless you put it in" \
113 "~/Library/Documentation/Help or install it in your application" \
118 $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
120 @echo "Build finished."
121 @echo "To view the help file:"
122 @echo "# mkdir -p $$HOME/.local/share/devhelp/coreboot"
123 @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/coreboot"
128 $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
130 @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
134 $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
136 @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
140 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
142 @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
143 @echo "Run \`make' in that directory to run these through (pdf)latex" \
144 "(use \`make latexpdf' here to do that automatically)."
148 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
149 @echo "Running LaTeX files through pdflatex..."
150 $(MAKE) -C $(BUILDDIR)/latex all-pdf
151 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
155 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
156 @echo "Running LaTeX files through platex and dvipdfmx..."
157 $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
158 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
162 $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
164 @echo "Build finished. The text files are in $(BUILDDIR)/text."
168 $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
170 @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
174 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
176 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
177 @echo "Run \`make' in that directory to run these through makeinfo" \
178 "(use \`make info' here to do that automatically)."
182 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
183 @echo "Running Texinfo files through makeinfo..."
184 make -C $(BUILDDIR)/texinfo info
185 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
189 $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
191 @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
195 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
197 @echo "The overview file is in $(BUILDDIR)/changes."
201 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
203 @echo "Link check complete; look for any errors in the above output " \
204 "or in $(BUILDDIR)/linkcheck/output.txt."
208 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
209 @echo "Testing of doctests in the sources finished, look at the " \
210 "results in $(BUILDDIR)/doctest/output.txt."
214 $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
215 @echo "Testing of coverage in the sources finished, look at the " \
216 "results in $(BUILDDIR)/coverage/python.txt."
220 $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
222 @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
226 $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
228 @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
232 $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
234 @echo "Build finished. Dummy builder generates no files."