1
# Makefile for Sphinx documentation
4
# You can set these variables from the command line.
6
SPHINXBUILD = LANG=C sphinx-build
10
PAPEROPT_a4 = -D latex_paper_size=a4
11
PAPEROPT_letter = -D latex_paper_size=letter
12
ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
14
.PHONY: help clean html web pickle htmlhelp latex changes linkcheck
17
@echo "Please use \`make <target>' where <target> is one of"
18
@echo " dist to make a distribution-ready tree"
19
@echo " html to make standalone HTML files"
20
@echo " pickle to make pickle files (usable by e.g. sphinx-web)"
21
@echo " htmlhelp to make HTML files and a HTML help project"
22
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
23
@echo " changes to make an overview over all changed/added/deprecated items"
24
@echo " linkcheck to check all external links for integrity"
27
-rm -rf build/* source/reference/generated
30
test -d build/latex || make latex
31
make -C build/latex all-pdf
33
cp -r build/html build/dist
34
perl -pi -e 's#^\s*(<li><a href=".*?">NumPy.*?Manual.*?»</li>)#<li><a href="/">Numpy and Scipy Documentation</a> »</li>#;' build/dist/*.html build/dist/*/*.html build/dist/*/*/*.html
35
cd build/html && zip -9r ../dist/numpy-html.zip .
36
cp build/latex/*.pdf build/dist
37
cd build/dist && tar czf ../dist.tar.gz *
39
generate: build/generate-stamp
40
build/generate-stamp: $(wildcard source/reference/*.rst) ext
42
./ext/autosummary_generate.py source/reference/*.rst \
43
-p dump.xml -o source/reference/generated
44
touch build/generate-stamp
47
svn co http://sphinx.googlecode.com/svn/contrib/trunk/numpyext ext
50
mkdir -p build/html build/doctrees
51
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
52
python postprocess.py html build/html/*.html
54
@echo "Build finished. The HTML pages are in build/html."
57
mkdir -p build/pickle build/doctrees
58
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
60
@echo "Build finished; now you can process the pickle files or run"
61
@echo " sphinx-web build/pickle"
62
@echo "to start the sphinx-web server."
67
mkdir -p build/htmlhelp build/doctrees
68
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
70
@echo "Build finished; now you can run HTML Help Workshop with the" \
71
".hhp project file in build/htmlhelp."
74
mkdir -p build/latex build/doctrees
75
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
76
python postprocess.py tex build/latex/*.tex
78
@echo "Build finished; the LaTeX files are in build/latex."
79
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
80
"run these through (pdf)latex."
83
mkdir -p build/coverage build/doctrees
84
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) build/coverage
85
@echo "Coverage finished; see c.txt and python.txt in build/coverage"
88
mkdir -p build/changes build/doctrees
89
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
91
@echo "The overview file is in build/changes."
94
mkdir -p build/linkcheck build/doctrees
95
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
97
@echo "Link check complete; look for any errors in the above output " \
98
"or in build/linkcheck/output.txt."