Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.1.X] Fixed #13484 -- Added some newly available targets to the doc…

…umentation makefile. Thanks to Alex for the patch.

Backport of r13126 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@13136 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e8e87e09b90dca37c1da064e0472e7e2cc43ad88 1 parent 176f1c1
Russell Keith-Magee authored May 08, 2010

Showing 1 changed file with 45 additions and 26 deletions. Show diff stats Hide diff stats

  1. 71  docs/Makefile
71  docs/Makefile
@@ -5,66 +5,85 @@
5 5
 SPHINXOPTS    =
6 6
 SPHINXBUILD   = sphinx-build
7 7
 PAPER         =
  8
+BUILDDIR      = _build
8 9
 
9 10
 # Internal variables.
10 11
 PAPEROPT_a4     = -D latex_paper_size=a4
11 12
 PAPEROPT_letter = -D latex_paper_size=letter
12  
-ALLSPHINXOPTS   = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
  13
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
13 14
 
14  
-.PHONY: help clean html web pickle htmlhelp latex changes linkcheck
  15
+.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
15 16
 
16 17
 help:
17 18
 	@echo "Please use \`make <target>' where <target> is one of"
18 19
 	@echo "  html      to make standalone HTML files"
19  
-	@echo "  pickle    to make pickle files (usable by e.g. sphinx-web)"
  20
+	@echo "  dirhtml   to make HTML files named index.html in directories"
  21
+	@echo "  pickle    to make pickle files"
  22
+	@echo "  json      to make JSON files"
20 23
 	@echo "  htmlhelp  to make HTML files and a HTML help project"
  24
+	@echo "  qthelp    to make HTML files and a qthelp project"
21 25
 	@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"
  26
+	@echo "  changes   to make an overview of all changed/added/deprecated items"
23 27
 	@echo "  linkcheck to check all external links for integrity"
  28
+	@echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
24 29
 
25 30
 clean:
26  
-	-rm -rf _build/*
  31
+	-rm -rf $(BUILDDIR)/*
27 32
 
28 33
 html:
29  
-	mkdir -p _build/html _build/doctrees
30  
-	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
  34
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
31 35
 	@echo
32  
-	@echo "Build finished. The HTML pages are in _build/html."
  36
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
  37
+
  38
+dirhtml:
  39
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
  40
+	@echo
  41
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
33 42
 
34 43
 pickle:
35  
-	mkdir -p _build/pickle _build/doctrees
36  
-	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
  44
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
37 45
 	@echo
38  
-	@echo "Build finished; now you can process the pickle files or run"
39  
-	@echo "  sphinx-web _build/pickle"
40  
-	@echo "to start the sphinx-web server."
  46
+	@echo "Build finished; now you can process the pickle files."
41 47
 
42  
-web: pickle
  48
+json:
  49
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
  50
+	@echo
  51
+	@echo "Build finished; now you can process the JSON files."
43 52
 
44 53
 htmlhelp:
45  
-	mkdir -p _build/htmlhelp _build/doctrees
46  
-	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
  54
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
47 55
 	@echo
48 56
 	@echo "Build finished; now you can run HTML Help Workshop with the" \
49  
-	      ".hhp project file in _build/htmlhelp."
  57
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
  58
+
  59
+qthelp:
  60
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
  61
+	@echo
  62
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
  63
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
  64
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/django.qhcp"
  65
+	@echo "To view the help file:"
  66
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/django.qhc"
50 67
 
51 68
 latex:
52  
-	mkdir -p _build/latex _build/doctrees
53  
-	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
  69
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
54 70
 	@echo
55  
-	@echo "Build finished; the LaTeX files are in _build/latex."
  71
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
56 72
 	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
57 73
 	      "run these through (pdf)latex."
58 74
 
59 75
 changes:
60  
-	mkdir -p _build/changes _build/doctrees
61  
-	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
  76
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
62 77
 	@echo
63  
-	@echo "The overview file is in _build/changes."
  78
+	@echo "The overview file is in $(BUILDDIR)/changes."
64 79
 
65 80
 linkcheck:
66  
-	mkdir -p _build/linkcheck _build/doctrees
67  
-	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
  81
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
68 82
 	@echo
69 83
 	@echo "Link check complete; look for any errors in the above output " \
70  
-	      "or in _build/linkcheck/output.txt."
  84
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
  85
+
  86
+doctest:
  87
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
  88
+	@echo "Testing of doctests in the sources finished, look at the " \
  89
+	      "results in $(BUILDDIR)/doctest/output.txt."

0 notes on commit e8e87e0

Please sign in to comment.
Something went wrong with that request. Please try again.