1# Makefile for Sphinx documentation
2#
3
4# You can set these variables from the command line.
5SPHINXOPTS    =
6SPHINXBUILD   = sphinx-build
7PAPER         =
8BUILDDIR      = _build
9
10# Internal variables.
11PAPEROPT_a4     = -D latex_paper_size=a4
12PAPEROPT_letter = -D latex_paper_size=letter
13ALLSPHINXOPTS   = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
14
15.PHONY: help clean html web pickle htmlhelp latex changes linkcheck default
16
17default: html
18
19help:
20	@echo "Please use \`make <target>' where <target> is one of"
21	@echo "  html      to make standalone HTML files"
22	@echo "  pickle    to make pickle files (usable by e.g. sphinx-web)"
23	@echo "  htmlhelp  to make HTML files and a HTML help project"
24	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
25	@echo "  changes   to make an overview over all changed/added/deprecated items"
26	@echo "  linkcheck to check all external links for integrity"
27
28clean:
29	-rm -rf _build/*
30
31html:
32	mkdir -p _build/html _build/doctrees
33	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
34	rm -f \
35		_build/html/.buildinfo \
36		_build/html/_static/jquery-3.2.1.js \
37		_build/html/_static/underscore-1.3.1.js \
38		_build/html/_static/websupport.js \
39		_build/html/objects.inv \
40		_build/html/searchindex.js
41	@echo
42	@echo "Build finished. The HTML pages are in _build/html."
43
44pickle:
45	mkdir -p _build/pickle _build/doctrees
46	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
47	@echo
48	@echo "Build finished; now you can process the pickle files or run"
49	@echo "  sphinx-web _build/pickle"
50	@echo "to start the sphinx-web server."
51
52web: pickle
53
54htmlhelp:
55	mkdir -p _build/htmlhelp _build/doctrees
56	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
57	@echo
58	@echo "Build finished; now you can run HTML Help Workshop with the" \
59	      ".hhp project file in _build/htmlhelp."
60
61latex:
62	mkdir -p _build/latex _build/doctrees
63	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
64	@echo
65	@echo "Build finished; the LaTeX files are in _build/latex."
66	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
67	      "run these through (pdf)latex."
68
69changes:
70	mkdir -p _build/changes _build/doctrees
71	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
72	@echo
73	@echo "The overview file is in _build/changes."
74
75linkcheck:
76	mkdir -p _build/linkcheck _build/doctrees
77	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
78	@echo
79	@echo "Link check complete; look for any errors in the above output " \
80	      "or in _build/linkcheck/output.txt."
81
82doctest:
83	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
84	@echo "Testing of doctests in the sources finished, look at the " \
85	      "results in $(BUILDDIR)/doctest/output.txt."
86
87sync: html
88	cp -r _build/html/. ~/rhodesmill.org/pyephem
89