~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/en/Makefile

  • Committer: Aaron Bentley
  • Date: 2010-05-10 11:34:20 UTC
  • mfrom: (5218 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5221.
  • Revision ID: aaron@aaronbentley.com-20100510113420-toh2d5yioobb5uq1
Merged bzr.dev into transform-commit-full.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
PAPEROPT_letter = -D latex_paper_size=letter
12
12
ALLSPHINXOPTS   = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
13
13
 
 
14
# Note that this assumes name of the output dir is same as name of the rule.
 
15
define make_output_dirs
 
16
# Create output directory (only needed for sphinx < 0.5)
 
17
[ -d _build ] || mkdir _build
 
18
[ -d "_build/$@" ] || mkdir "_build/$@"
 
19
# Workaround for a bug in sphinx < 0.5 where it tries to delete
 
20
# nonexistent static dirs and does not catch the exception.  This was
 
21
# fixed in svn+ssh://pythondev@svn.python.org/doctools/branches/0.4.x
 
22
# at r65551 and merged as 280b62246342 in hg branch released as 0.5.
 
23
[ -d "_build/$@/_static" ] || mkdir "_build/$@/_static"
 
24
for fn in _static/*; do \
 
25
    [ ! -d "$$fn" ] && continue; \
 
26
    [ -d "_build/$@/$$fn" ] || mkdir "_build/$@/$$fn"; \
 
27
done
 
28
endef
 
29
 
14
30
.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
15
31
 
16
32
help:
30
46
        -rm -rf _build/*
31
47
 
32
48
html:
 
49
        $(make_output_dirs)
33
50
        $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
34
51
        @echo
35
52
        @echo "Build finished. The HTML pages are in _build/html."
36
53
 
37
54
dirhtml:
 
55
        $(make_output_dirs)
38
56
        $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
39
57
        @echo
40
58
        @echo "Build finished. The HTML pages are in _build/dirhtml."
41
59
 
42
60
pickle:
 
61
        $(make_output_dirs)
43
62
        $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
44
63
        @echo
45
64
        @echo "Build finished; now you can process the pickle files."
46
65
 
47
66
json:
 
67
        $(make_output_dirs)
48
68
        $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
49
69
        @echo
50
70
        @echo "Build finished; now you can process the JSON files."
51
71
 
52
72
htmlhelp:
 
73
        $(make_output_dirs)
53
74
        $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
54
75
        @echo
55
76
        @echo "Build finished; now you can run HTML Help Workshop with the" \
56
77
              ".hhp project file in _build/htmlhelp."
57
78
 
58
79
qthelp:
 
80
        $(make_output_dirs)
59
81
        $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
60
82
        @echo
61
83
        @echo "Build finished; now you can run "qcollectiongenerator" with the" \
65
87
        @echo "# assistant -collectionFile _build/qthelp/Bazaar.qhc"
66
88
 
67
89
latex:
 
90
        $(make_output_dirs)
68
91
        $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
69
92
        @echo
70
93
        @echo "Build finished; the LaTeX files are in _build/latex."
72
95
              "run these through (pdf)latex."
73
96
 
74
97
changes:
 
98
        $(make_output_dirs)
75
99
        $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
76
100
        @echo
77
101
        @echo "The overview file is in _build/changes."
78
102
 
79
103
linkcheck:
 
104
        $(make_output_dirs)
80
105
        $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
81
106
        @echo
82
107
        @echo "Link check complete; look for any errors in the above output " \
83
108
              "or in _build/linkcheck/output.txt."
84
109
 
85
110
doctest:
 
111
        $(make_output_dirs)
86
112
        $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
87
113
        @echo "Testing of doctests in the sources finished, look at the " \
88
114
              "results in _build/doctest/output.txt."