./setup.py bench now works correctly!
[sympy.git] / doc / Makefile
blob7c9e052b7598c8737acd72f57b68b6cb7c8c738e
1 # Makefile for Sphinx documentation
3 RST2HTML = rst2html
5 # You can set these variables from the command line.
6 SPHINXOPTS =
7 SPHINXVER = 0.4.1
8 SPHINXBUILDpy = sphinx/Sphinx-$(SPHINXVER)/sphinx-build.py
9 SPHINXBUILD = PYTHONPATH=.. python $(SPHINXBUILDpy)
10 PAPER =
12 ALLSPHINXOPTS = -d _build/doctrees -D latex_paper_size=$(PAPER) \
13 $(SPHINXOPTS) src
15 ALLSPHINXOPTSapi = -d _build/doctreesapi -D latex_paper_size=$(PAPER) \
16 $(SPHINXOPTS) api
18 .PHONY: help clean html web htmlhelp latex changes linkcheck
20 help:
21 @echo "Please use \`make <target>' where <target> is one of"
22 @echo " html to make standalone HTML files"
23 @echo " web to make files usable by Sphinx.web"
24 @echo " htmlhelp to make HTML files and a HTML help project"
25 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
26 @echo " changes to make an overview over all changed/added/deprecated items"
27 @echo " linkcheck to check all external links for integrity"
29 clean:
30 -rm -rf _build
31 -rm -rf sphinx
33 $(SPHINXBUILDpy):
34 rm -rf sphinx
35 mkdir sphinx
36 cd sphinx; wget http://pypi.python.org/packages/source/S/Sphinx/Sphinx-$(SPHINXVER).tar.gz;
37 cd sphinx; tar xzf Sphinx-$(SPHINXVER).tar.gz
39 html: $(SPHINXBUILDpy) spt-printable
40 mkdir -p src/.static
41 mkdir -p _build/html _build/doctrees
42 mkdir -p src/modules
43 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
44 cp -r src/pics _build/html/
45 cp -r src/figures _build/html/
46 cp -r src/spt-patches _build/html/
47 @echo
48 @echo "Build finished. The HTML pages are in _build/html."
50 spt-printable:
51 mkdir -p _build/html/
52 $(RST2HTML) src/sympy-patches-tutorial.txt > _build/html/spt-printable.html
54 htmlapi: $(SPHINXBUILDpy)
55 mkdir -p api/.static
56 mkdir -p api/modules
57 mkdir -p _build/api _build/doctreesapi
58 rm -f api/modules/sympy*.txt
59 ./generate_reference.py
60 $(SPHINXBUILD) -b html $(ALLSPHINXOPTSapi) _build/api
61 @echo
62 @echo "Build finished. The API docs pages are in _build/api."
64 web:
65 mkdir -p _build/web _build/doctrees
66 $(SPHINXBUILD) -b web $(ALLSPHINXOPTS) _build/web
67 @echo
68 @echo "Build finished; now you can run"
69 @echo " python -m sphinx.web _build/web"
70 @echo "to start the server."
72 htmlhelp:
73 mkdir -p _build/htmlhelp _build/doctrees
74 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
75 @echo
76 @echo "Build finished; now you can run HTML Help Workshop with the" \
77 ".hhp project file in _build/htmlhelp."
79 latex: $(SPHINXBUILDpy)
80 mkdir -p _build/latex _build/doctrees
81 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
82 @echo
83 @echo "Build finished; the LaTeX files are in _build/latex."
84 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
85 "run these through (pdf)latex."
87 changes:
88 mkdir -p _build/changes _build/doctrees
89 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
90 @echo
91 @echo "The overview file is in _build/changes."
93 linkcheck:
94 mkdir -p _build/linkcheck _build/doctrees
95 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
96 @echo
97 @echo "Link check complete; look for any errors in the above output " \
98 "or in _build/linkcheck/output.txt."