Django

Code

root/django/trunk/docs/Makefile

Revision 7370, 2.1 kB (checked in by jacob, 3 months ago)

Added the basics needed to build Django's docs using Sphinx. If you've got Sphinx installed (the latest version) along with docutils, you should be able to easily build the docs locally using sphinx-build or the included Makefile. This use a basic (and pretty crappy) index for the documentation and the built-in Sphinx styles (which are actually quite nice).

Line 
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 web htmlhelp latex changes linkcheck
15
16 help:
17         @echo "Please use \`make <target>' where <target> is one of"
18         @echo "  html      to make standalone HTML files"
19         @echo "  web       to make files usable by Sphinx.web"
20         @echo "  htmlhelp  to make HTML files and a HTML help project"
21         @echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
22         @echo "  changes   to make an overview over all changed/added/deprecated items"
23         @echo "  linkcheck to check all external links for integrity"
24
25 clean:
26         -rm -rf _build/*
27
28 html:
29         mkdir -p _build/html _build/doctrees
30         $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
31         @echo
32         @echo "Build finished. The HTML pages are in _build/html."
33
34 web:
35         mkdir -p _build/web _build/doctrees
36         $(SPHINXBUILD) -b web $(ALLSPHINXOPTS) _build/web
37         @echo
38         @echo "Build finished; now you can run"
39         @echo "  python -m sphinx.web _build/web"
40         @echo "to start the server."
41
42 htmlhelp:
43         mkdir -p _build/htmlhelp _build/doctrees
44         $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
45         @echo
46         @echo "Build finished; now you can run HTML Help Workshop with the" \
47               ".hhp project file in _build/htmlhelp."
48
49 latex:
50         mkdir -p _build/latex _build/doctrees
51         $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
52         @echo
53         @echo "Build finished; the LaTeX files are in _build/latex."
54         @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
55               "run these through (pdf)latex."
56
57 changes:
58         mkdir -p _build/changes _build/doctrees
59         $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
60         @echo
61         @echo "The overview file is in _build/changes."
62
63 linkcheck:
64         mkdir -p _build/linkcheck _build/doctrees
65         $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
66         @echo
67         @echo "Link check complete; look for any errors in the above output " \
68               "or in _build/linkcheck/output.txt."
Note: See TracBrowser for help on using the browser.