| 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 _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . |
| 13 |
|
| 14 |
.PHONY: help clean html api htmlonly latex changes linkcheck doctest |
| 15 |
|
| 16 |
help: |
| 17 |
@echo "Please use \`make <target>' where <target> is one of" |
| 18 |
@echo " html make the HTML documentation" |
| 19 |
@echo " api make API documents only" |
| 20 |
@echo " latex make the LaTeX, you can set PAPER=a4 or PAPER=letter" |
| 21 |
@echo " pdf make <latex> and run the PDF generation" |
| 22 |
@echo " changes make an overview of all changed/added/deprecated" \ |
| 23 |
"items (ChangeLog)" |
| 24 |
@echo " linkcheck check all external links for integrity" |
| 25 |
@echo " doctest run all doctests embedded in the documentation" |
| 26 |
@echo " upload Upload the docs to github pages website" |
| 27 |
|
| 28 |
clean: |
| 29 |
-rm -rf _build/* *~ api/generated |
| 30 |
-rm -rf build/* |
| 31 |
-rm examples/fig/* |
| 32 |
-rm examples/*.rst |
| 33 |
|
| 34 |
htmlonly: |
| 35 |
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html |
| 36 |
@echo |
| 37 |
@echo "Build finished. The HTML pages are in _build/html." |
| 38 |
|
| 39 |
api: |
| •40 |
python3 ../tools/build_modref_templates.py |
| 41 |
@echo "Build API docs finished." |
| 42 |
|
| 43 |
html: rstexamples api htmlonly |
| 44 |
@echo "Build HTML and API finished." |
| 45 |
|
| 46 |
html-no-exec: rstexamples-no-exec api htmlonly |
| 47 |
@echo "Build HTML and API finished." |
| 48 |
|
| 49 |
latex: api |
| 50 |
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex |
| 51 |
@echo |
| 52 |
@echo "Build finished; the LaTeX files are in _build/latex." |
| 53 |
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ |
| 54 |
"run these through (pdf)latex." |
| 55 |
pdf: latex |
| 56 |
cd _build/latex && make all-pdf |
| 57 |
|
| 58 |
all: html pdf |
| 59 |
|
| 60 |
changes: |
| 61 |
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes |
| 62 |
@echo |
| 63 |
@echo "The overview file is in _build/changes." |
| 64 |
|
| 65 |
linkcheck: |
| 66 |
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck |
| 67 |
@echo |
| 68 |
@echo "Link check complete; look for any errors in the above output " \ |
| 69 |
"or in _build/linkcheck/output.txt." |
| 70 |
|
| 71 |
doctest: |
| 72 |
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest |
| 73 |
@echo "Testing of doctests in the sources finished, look at the " \ |
| 74 |
"results in _build/doctest/output.txt." |
| 75 |
|
| 76 |
|
| 77 |
rstexamples: |
| 78 |
../tools/make_examples.py |
| 79 |
|
| 80 |
rstexamples-no-exec: |
| 81 |
../tools/make_examples.py --no-exec |
| 82 |
|
| 83 |
|
| 84 |
upload: html |
| 85 |
./upload-gh-pages.sh _build/html/ nitime nipy |