1# Makefile for Sphinx documentation
2#
3
4# You can set these variables from the command line.
5SPHINXOPTS    =
6SPHINXBUILD   = sphinx-build
7PAPER         =
8
9# Internal variables.
10PAPEROPT_a4     = -D latex_paper_size=a4
11PAPEROPT_letter = -D latex_paper_size=letter
12ALLSPHINXOPTS   = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
13
14.PHONY: help clean html web pickle htmlhelp latex changes linkcheck
15
16help:
17	@echo "Please use \`make <target>' where <target> is one of"
18	@echo "  html      to make standalone HTML files"
19	@echo "  pickle    to make pickle files (usable by e.g. 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
25clean:
26	-rm -rf build/*
27
28html:
29	mkdir -p build/html build/doctrees
30	LD_LIBRARY_PATH=../../../.libs $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
31	@echo
32	@echo "Build finished. The HTML pages are in build/html."
33
34pickle:
35	mkdir -p build/pickle build/doctrees
36	LD_LIBRARY_PATH=../../../.libs $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
37	@echo
38	@echo "Build finished; now you can process the pickle files or run"
39	@echo "  sphinx-web build/pickle"
40	@echo "to start the sphinx-web server."
41
42web: pickle
43
44htmlhelp:
45	mkdir -p build/htmlhelp build/doctrees
46	LD_LIBRARY_PATH=../../../.libs $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
47	@echo
48	@echo "Build finished; now you can run HTML Help Workshop with the" \
49	      ".hhp project file in build/htmlhelp."
50
51latex:
52	mkdir -p build/latex build/doctrees
53	LD_LIBRARY_PATH=../../../.libs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
54	@echo
55	@echo "Build finished; the LaTeX files are in build/latex."
56	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
57	      "run these through (pdf)latex."
58
59changes:
60	mkdir -p build/changes build/doctrees
61	LD_LIBRARY_PATH=../../../.libs $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
62	@echo
63	@echo "The overview file is in build/changes."
64
65linkcheck:
66	mkdir -p build/linkcheck build/doctrees
67	LD_LIBRARY_PATH=../../../.libs $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
68	@echo
69	@echo "Link check complete; look for any errors in the above output " \
70	      "or in build/linkcheck/output.txt."
71