Debian Codegraph @

doc/Makefile

raw
1 # Makefile for Sphinx documentation
2 #
3
4 # The Python executable to be used
5 #
6 PYTHON ?= python
7
8 # You can set these variables from the command line.
9 SPHINXOPTS =
10 SPHINXBUILD = sphinx-build
11 PAPER =
12
13
14 # Internal variables.
15 BUILDROOT = ../build
16 PAPEROPT_a4 = -D latex_paper_size=a4
17 PAPEROPT_letter = -D latex_paper_size=letter
18 ALLSPHINXOPTS = -d $(BUILDROOT)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
19
20 # API generation
21 API_DIR = source/reference
22 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck
23
24 help:
25 @echo "Please use \`make <target>' where <target> is one of"
26 @echo " html to make standalone HTML files"
27 @echo " api to make the auto-generated API files"
28 @echo " pickle to make pickle files (usable by e.g. sphinx-web)"
29 @echo " htmlhelp to make HTML files and a HTML help project"
30 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
31 @echo " changes to make an overview over all changed/added/deprecated items"
32 @echo " linkcheck to check all external links for integrity"
33 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
34 @echo " gitwash-update update git workflow from source repo"
35
36 clean: api-clean
37 -rm -rf $(BUILDROOT)/*
38 -rm *-stamp
39
40 api-clean:
41 rm -rf $(API_DIR)/*.rst
42
43 api: api-stamp
44 api-stamp:
45 @mkdir -p $(API_DIR)
46 $(PYTHON) tools/build_modref_templates.py nibabel $(API_DIR) False
47 @echo "Build API docs...done."
48 @touch $@
49
50 html-only:
51 mkdir -p $(BUILDROOT)/html $(BUILDROOT)/doctrees
52 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDROOT)/html
53 @echo
54 @echo "Build finished. The HTML pages are in $(BUILDROOT)/html."
55
56 html: api-stamp html-only
57
58 pickle:
59 mkdir -p $(BUILDROOT)/pickle $(BUILDROOT)/doctrees
60 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDROOT)/pickle
61 @echo
62 @echo "Build finished; now you can process the pickle files or run"
63 @echo " sphinx-web $(BUILDROOT)/pickle"
64 @echo "to start the sphinx-web server."
65
66 web: pickle
67
68 htmlhelp:
69 mkdir -p $(BUILDROOT)/htmlhelp $(BUILDROOT)/doctrees
70 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDROOT)/htmlhelp
71 @echo
72 @echo "Build finished; now you can run HTML Help Workshop with the" \
73 ".hhp project file in $(BUILDROOT)/htmlhelp."
74
75 latex:
76 mkdir -p $(BUILDROOT)/latex $(BUILDROOT)/doctrees
77 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDROOT)/latex
78 @echo
79 @echo "Build finished; the LaTeX files are in $(BUILDROOT)/latex."
80 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
81 "run these through (pdf)latex."
82
83 changes:
84 mkdir -p $(BUILDROOT)/changes $(BUILDROOT)/doctrees
85 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDROOT)/changes
86 @echo
87 @echo "The overview file is in $(BUILDROOT)/changes."
88
89 linkcheck:
90 mkdir -p $(BUILDROOT)/linkcheck $(BUILDROOT)/doctrees
91 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDROOT)/linkcheck
92 @echo
93 @echo "Link check complete; look for any errors in the above output " \
94 "or in $(BUILDROOT)/linkcheck/output.txt."
95
96 doctest: api-clean
97 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDROOT)/doctest
98 @echo "Testing of doctests in the sources finished, look at the " \
99 "results in _build/doctest/output.txt."
100
101 gitwash-update:
102 python ../tools/gitwash_dumper.py source nibabel --github-user=nipy \
103 --project-url=http://nipy.org/nibabel \
104 --project-ml-url=https://mail.python.org/mailman/listinfo/neuroimaging