root/Makefile

Revision 1029:e110322d9847, 2.3 kB (checked in by Alexander Solovyov <[email protected]…>, 5 months ago)

Makefile rule to open built sphinx doc in firefox

Line  
1 # Makefile for Sphinx documentation
2 #
3
4 # You can set these variables from the command line.
5 SPHINXOPTS    =
6 SPHINXBUILD   = sphinx-build
7 PAPER         =
8
9 # Internal variables.
10 PAPEROPT_a4     = -D latex_paper_size=a4
11 PAPEROPT_letter = -D latex_paper_size=letter
12 ALLSPHINXOPTS   = -d doc-build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) docs
13
14 .PHONY: help clean html web htmlhelp latex changes linkcheck
15
16 help:
17         @echo "Please use \`make <target>' where <target> is one of"
18         @echo "  html      to make standalone HTML files"
19         @echo "  web       to make files usable by Sphinx.web"
20         @echo "  htmlhelp  to make HTML files and a HTML help project"
21         @echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
22         @echo "  changes   to make an overview over all changed/added/deprecated items"
23         @echo "  linkcheck to check all external links for integrity"
24         @echo
25         @echo "  read      to open html version in firefox"
26
27 clean:
28         -rm -rf doc-build/*
29
30 html:
31         mkdir -p doc-build/html doc-build/doctrees
32         $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) doc-build/html
33         @echo
34         @echo "Build finished. The HTML pages are in doc-build/html."
35
36 read: html
37         firefox doc-build/html/index.html
38
39 web:
40         mkdir -p doc-build/web doc-build/doctrees
41         $(SPHINXBUILD) -b web $(ALLSPHINXOPTS) doc-build/web
42         @echo
43         @echo "Build finished; now you can run"
44         @echo "  python -m sphinx.web doc-build/web"
45         @echo "to start the server."
46
47 htmlhelp:
48         mkdir -p doc-build/htmlhelp doc-build/doctrees
49         $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) doc-build/htmlhelp
50         @echo
51         @echo "Build finished; now you can run HTML Help Workshop with the" \
52               ".hhp project file in doc-build/htmlhelp."
53
54 latex:
55         mkdir -p doc-build/latex doc-build/doctrees
56         $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) doc-build/latex
57         @echo
58         @echo "Build finished; the LaTeX files are in doc-build/latex."
59         @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
60               "run these through (pdf)latex."
61
62 changes:
63         mkdir -p doc-build/changes doc-build/doctrees
64         $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) doc-build/changes
65         @echo
66         @echo "The overview file is in doc-build/changes."
67
68 linkcheck:
69         mkdir -p doc-build/linkcheck doc-build/doctrees
70         $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) doc-build/linkcheck
71         @echo
72         @echo "Link check complete; look for any errors in the above output " \
73               "or in doc-build/linkcheck/output.txt."
Note: See TracBrowser for help on using the browser.