blob: 52d78d9efe62717d529631ab25b56494389c520a [file] [log] [blame]
Armin Ronacher083ae162008-04-27 21:42:57 +02001# Makefile for Sphinx documentation
2#
3
4# You can set these variables from the command line.
5SPHINXOPTS =
6SPHINXBUILD = sphinx-build
7PAPER =
Armin Ronacherd6a20032010-10-17 16:30:15 +02008BUILDDIR = _build
Armin Ronacher083ae162008-04-27 21:42:57 +02009
10# Internal variables.
11PAPEROPT_a4 = -D latex_paper_size=a4
12PAPEROPT_letter = -D latex_paper_size=letter
Armin Ronacherd6a20032010-10-17 16:30:15 +020013ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
Armin Ronacher083ae162008-04-27 21:42:57 +020014
Armin Ronacherd6a20032010-10-17 16:30:15 +020015.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp epub latex changes linkcheck doctest
Armin Ronacher083ae162008-04-27 21:42:57 +020016
17help:
18 @echo "Please use \`make <target>' where <target> is one of"
Armin Ronacherd6a20032010-10-17 16:30:15 +020019 @echo " html to make standalone HTML files"
20 @echo " dirhtml to make HTML files named index.html in directories"
21 @echo " singlehtml to make a single large HTML file"
22 @echo " pickle to make pickle files"
23 @echo " json to make JSON files"
24 @echo " htmlhelp to make HTML files and a HTML help project"
25 @echo " qthelp to make HTML files and a qthelp project"
26 @echo " devhelp to make HTML files and a Devhelp project"
27 @echo " epub to make an epub"
28 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
29 @echo " latexpdf to make LaTeX files and run them through pdflatex"
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)"
Armin Ronacher083ae162008-04-27 21:42:57 +020033
34clean:
Armin Ronacherd6a20032010-10-17 16:30:15 +020035 -rm -rf $(BUILDDIR)/*
Armin Ronacher083ae162008-04-27 21:42:57 +020036
37html:
Armin Ronacherd6a20032010-10-17 16:30:15 +020038 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
Armin Ronacher083ae162008-04-27 21:42:57 +020039 @echo
Armin Ronacherd6a20032010-10-17 16:30:15 +020040 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
41
42dirhtml:
43 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
44 @echo
45 @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
46
47singlehtml:
48 $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
49 @echo
50 @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
Armin Ronacher083ae162008-04-27 21:42:57 +020051
52pickle:
Armin Ronacherd6a20032010-10-17 16:30:15 +020053 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
Armin Ronacher083ae162008-04-27 21:42:57 +020054 @echo
Armin Ronacherd6a20032010-10-17 16:30:15 +020055 @echo "Build finished; now you can process the pickle files."
Armin Ronacherabd36572008-06-27 08:45:19 +020056
57json:
Armin Ronacherd6a20032010-10-17 16:30:15 +020058 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
Armin Ronacherabd36572008-06-27 08:45:19 +020059 @echo
Armin Ronacherd6a20032010-10-17 16:30:15 +020060 @echo "Build finished; now you can process the JSON files."
Armin Ronacher083ae162008-04-27 21:42:57 +020061
62htmlhelp:
Armin Ronacherd6a20032010-10-17 16:30:15 +020063 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
Armin Ronacher083ae162008-04-27 21:42:57 +020064 @echo
65 @echo "Build finished; now you can run HTML Help Workshop with the" \
Armin Ronacherd6a20032010-10-17 16:30:15 +020066 ".hhp project file in $(BUILDDIR)/htmlhelp."
67
68qthelp:
69 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
70 @echo
71 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
72 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
73 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Flask.qhcp"
74 @echo "To view the help file:"
75 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Flask.qhc"
76
77devhelp:
78 $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) _build/devhelp
79 @echo
80 @echo "Build finished."
81 @echo "To view the help file:"
82 @echo "# mkdir -p $$HOME/.local/share/devhelp/Flask"
83 @echo "# ln -s _build/devhelp $$HOME/.local/share/devhelp/Flask"
84 @echo "# devhelp"
85
86epub:
87 $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
88 @echo
89 @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
Armin Ronacher083ae162008-04-27 21:42:57 +020090
91latex:
Armin Ronacherd6a20032010-10-17 16:30:15 +020092 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
Armin Ronacher083ae162008-04-27 21:42:57 +020093 @echo
Armin Ronacherd6a20032010-10-17 16:30:15 +020094 @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
Armin Ronacher083ae162008-04-27 21:42:57 +020095 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
96 "run these through (pdf)latex."
97
Armin Ronacherd6a20032010-10-17 16:30:15 +020098latexpdf: latex
99 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
100 @echo "Running LaTeX files through pdflatex..."
101 make -C _build/latex all-pdf
102 @echo "pdflatex finished; the PDF files are in _build/latex."
103
Armin Ronacher083ae162008-04-27 21:42:57 +0200104changes:
Armin Ronacherd6a20032010-10-17 16:30:15 +0200105 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
Armin Ronacher083ae162008-04-27 21:42:57 +0200106 @echo
Armin Ronacherd6a20032010-10-17 16:30:15 +0200107 @echo "The overview file is in $(BUILDDIR)/changes."
Armin Ronacher083ae162008-04-27 21:42:57 +0200108
109linkcheck:
Armin Ronacherd6a20032010-10-17 16:30:15 +0200110 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
Armin Ronacher083ae162008-04-27 21:42:57 +0200111 @echo
112 @echo "Link check complete; look for any errors in the above output " \
Armin Ronacherd6a20032010-10-17 16:30:15 +0200113 "or in $(BUILDDIR)/linkcheck/output.txt."
114
115doctest:
116 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
117 @echo "Testing of doctests in the sources finished, look at the " \
118 "results in $(BUILDDIR)/doctest/output.txt."