1 # Makefile for Sphinx documentation
4 # You can set these variables from the command line.
6 SPHINXBUILD = sphinx-build
12 PAPEROPT_a4 = -D latex_paper_size=a4
13 PAPEROPT_letter = -D latex_paper_size=letter
14 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
15 # the i18n builder cannot share the environment and doctrees with the others
16 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
20 @echo "Please use \`make <target>' where <target> is one of"
21 @echo " html to make standalone HTML files"
22 @echo " dirhtml to make HTML files named index.html in directories"
23 @echo " singlehtml to make a single large HTML file"
24 @echo " pickle to make pickle files"
25 @echo " json to make JSON files"
26 @echo " htmlhelp to make HTML files and a HTML help project"
27 @echo " qthelp to make HTML files and a qthelp project"
28 @echo " applehelp to make an Apple Help Book"
29 @echo " devhelp to make HTML files and a Devhelp project"
30 @echo " epub to make an epub"
31 @echo " epub3 to make an epub3"
32 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
33 @echo " latexpdf to make LaTeX files and run them through pdflatex"
34 @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
35 @echo " text to make text files"
36 @echo " man to make manual pages"
37 @echo " texinfo to make Texinfo files"
38 @echo " info to make Texinfo files and run them through makeinfo"
39 @echo " gettext to make PO message catalogs"
40 @echo " changes to make an overview of all changed/added/deprecated items"
41 @echo " xml to make Docutils-native XML files"
42 @echo " pseudoxml to make pseudoxml-XML files for display purposes"
43 @echo " linkcheck to check all external links for integrity"
44 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
45 @echo " coverage to run coverage check of the documentation (if enabled)"
46 @echo " dummy to check syntax errors of document sources"
47 @echo " spelling to check spelling errors of document sources"
55 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
57 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
61 for l in $$(echo "en `ls locales`"); \
63 make -e SPHINXOPTS="-q -D language='$$l' -d build/doctrees" BUILDDIR="build/$$l" html ; \
65 @echo "Build finished. The HTML pages are in $(BUILDDIR)/LANG/html."
69 for l in $$(echo "en `ls locales`"); \
71 make -e SPHINXOPTS="-q -D language='$$l' -d build/doctrees" BUILDDIR="build/$$l" epub ; \
73 @echo "Build finished. The epub files are in $(BUILDDIR)/LANG/epub."
77 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
79 @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
83 $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
85 @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
89 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
91 @echo "Build finished; now you can process the pickle files."
95 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
97 @echo "Build finished; now you can process the JSON files."
101 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
103 @echo "Build finished; now you can run HTML Help Workshop with the" \
104 ".hhp project file in $(BUILDDIR)/htmlhelp."
108 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
110 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
111 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
112 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/KohaManual.qhcp"
113 @echo "To view the help file:"
114 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/KohaManual.qhc"
118 $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
120 @echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
121 @echo "N.B. You won't be able to view it unless you put it in" \
122 "~/Library/Documentation/Help or install it in your application" \
127 $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
129 @echo "Build finished."
130 @echo "To view the help file:"
131 @echo "# mkdir -p $$HOME/.local/share/devhelp/KohaManual"
132 @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/KohaManual"
137 $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
139 @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
143 $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
145 @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
149 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
151 @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
152 @echo "Run \`make' in that directory to run these through (pdf)latex" \
153 "(use \`make latexpdf' here to do that automatically)."
157 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
158 @echo "Running LaTeX files through pdflatex..."
159 $(MAKE) -C $(BUILDDIR)/latex all-pdf
160 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
164 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
165 @echo "Running LaTeX files through platex and dvipdfmx..."
166 $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
167 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
171 $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
173 @echo "Build finished. The text files are in $(BUILDDIR)/text."
177 $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
179 @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
183 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
185 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
186 @echo "Run \`make' in that directory to run these through makeinfo" \
187 "(use \`make info' here to do that automatically)."
191 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
192 @echo "Running Texinfo files through makeinfo..."
193 make -C $(BUILDDIR)/texinfo info
194 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
198 $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
200 @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
204 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
206 @echo "The overview file is in $(BUILDDIR)/changes."
210 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
212 @echo "Link check complete; look for any errors in the above output " \
213 "or in $(BUILDDIR)/linkcheck/output.txt."
217 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
218 @echo "Testing of doctests in the sources finished, look at the " \
219 "results in $(BUILDDIR)/doctest/output.txt."
223 $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
224 @echo "Testing of coverage in the sources finished, look at the " \
225 "results in $(BUILDDIR)/coverage/python.txt."
229 $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
231 @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
235 $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
237 @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
241 $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
243 @echo "Build finished. Dummy builder generates no files."
247 $(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling
249 @echo "Spell check complete; look for any errors in $(BUILDDIR)/spelling/output.txt."