annotate Doc/Makefile @ 65035:87f4b32905df 2.7

Cosmetic fix to use print function.
author Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
date Fri, 01 Oct 2010 10:48:47 +0000
parents 71ae523eba5b
children 5b55e8a9c107
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
42604
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
1 #
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
2 # Makefile for Python documentation
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
3 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
4 #
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
5
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
6 # You can set these variables from the command line.
42608
3cc2cc795765 Don't use "?=" which seems to be a GNUism.
Georg Brandl <georg@python.org>
parents: 42604
diff changeset
7 PYTHON = python
3cc2cc795765 Don't use "?=" which seems to be a GNUism.
Georg Brandl <georg@python.org>
parents: 42604
diff changeset
8 SVNROOT = http://svn.python.org/projects
3cc2cc795765 Don't use "?=" which seems to be a GNUism.
Georg Brandl <georg@python.org>
parents: 42604
diff changeset
9 SPHINXOPTS =
44323
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 44103
diff changeset
10 PAPER =
46002
24083305d1c7 Allow giving source names on the cmdline.
Georg Brandl <georg@python.org>
parents: 46001
diff changeset
11 SOURCES =
50305
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
12 DISTVERSION = $(shell $(PYTHON) tools/sphinxext/patchlevel.py)
42604
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
13
44323
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 44103
diff changeset
14 ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_paper_size=$(PAPER) \
46002
24083305d1c7 Allow giving source names on the cmdline.
Georg Brandl <georg@python.org>
parents: 46001
diff changeset
15 $(SPHINXOPTS) . build/$(BUILDER) $(SOURCES)
42604
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
16
59569
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
17 .PHONY: help checkout update build html htmlhelp latex text changes linkcheck \
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
18 suspicious coverage doctest pydoc-topics htmlview clean dist check serve \
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
19 autobuild-dev autobuild-stable
42604
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
20
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
21 help:
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
22 @echo "Please use \`make <target>' where <target> is one of"
59569
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
23 @echo " clean to remove build files"
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
24 @echo " update to update build tools"
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
25 @echo " html to make standalone HTML files"
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
26 @echo " htmlhelp to make HTML files and a HTML help project"
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
27 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
28 @echo " text to make plain text files"
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
29 @echo " changes to make an overview over all changed/added/deprecated items"
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
30 @echo " linkcheck to check all external links for integrity"
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
31 @echo " coverage to check documentation coverage for library and C API"
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
32 @echo " doctest to run doctests in the documentation"
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
33 @echo " pydoc-topics to regenerate the pydoc topics file"
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
34 @echo " dist to create a \"dist\" directory with archived docs for download"
50578
d41a86875332 Add "suspicious" builder which finds leftover markup in the HTML files.
Georg Brandl <georg@python.org>
parents: 50510
diff changeset
35 @echo " suspicious to check for suspicious markup in output text"
59569
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
36 @echo " check to run a check for frequent markup errors"
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
37 @echo " serve to serve the documentation on the localhost (8000)"
42604
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
38
53461
64110c0ad530 Move pydoc_topics module to its own subdirectory, so that no generated code is in Lib/.
Georg Brandl <georg@python.org>
parents: 53460
diff changeset
39 # Note: if you update versions here, do the same in make.bat and README.txt
42604
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
40 checkout:
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
41 @if [ ! -d tools/sphinx ]; then \
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
42 echo "Checking out Sphinx..."; \
59570
da94f1666da1 Bump externals versions for doc build.
Georg Brandl <georg@python.org>
parents: 59569
diff changeset
43 svn checkout $(SVNROOT)/external/Sphinx-0.6.5/sphinx tools/sphinx; \
42604
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
44 fi
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
45 @if [ ! -d tools/docutils ]; then \
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
46 echo "Checking out Docutils..."; \
59570
da94f1666da1 Bump externals versions for doc build.
Georg Brandl <georg@python.org>
parents: 59569
diff changeset
47 svn checkout $(SVNROOT)/external/docutils-0.6/docutils tools/docutils; \
42604
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
48 fi
50605
15c4c9e330e9 use Jinja 2.1.1
Benjamin Peterson <benjamin@python.org>
parents: 50578
diff changeset
49 @if [ ! -d tools/jinja2 ]; then \
46436
03d9c664a7bc Check out Jinja as a separate step now that it's not included in the Sphinx package anymore.
Georg Brandl <georg@python.org>
parents: 46002
diff changeset
50 echo "Checking out Jinja..."; \
59570
da94f1666da1 Bump externals versions for doc build.
Georg Brandl <georg@python.org>
parents: 59569
diff changeset
51 svn checkout $(SVNROOT)/external/Jinja-2.3.1/jinja2 tools/jinja2; \
46436
03d9c664a7bc Check out Jinja as a separate step now that it's not included in the Sphinx package anymore.
Georg Brandl <georg@python.org>
parents: 46002
diff changeset
52 fi
42604
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
53 @if [ ! -d tools/pygments ]; then \
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
54 echo "Checking out Pygments..."; \
59570
da94f1666da1 Bump externals versions for doc build.
Georg Brandl <georg@python.org>
parents: 59569
diff changeset
55 svn checkout $(SVNROOT)/external/Pygments-1.3.1/pygments tools/pygments; \
42604
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
56 fi
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
57
58012
7361ee2ddfdb #7602: improve "clean" and "checkout" targets now that all tools are in externals.
Georg Brandl <georg@python.org>
parents: 58005
diff changeset
58 update: clean checkout
42604
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
59
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
60 build: checkout
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
61 mkdir -p build/$(BUILDER) build/doctrees
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
62 $(PYTHON) tools/sphinx-build.py $(ALLSPHINXOPTS)
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
63 @echo
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
64
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
65 html: BUILDER = html
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
66 html: build
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
67 @echo "Build finished. The HTML pages are in build/html."
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
68
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
69 htmlhelp: BUILDER = htmlhelp
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
70 htmlhelp: build
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
71 @echo "Build finished; now you can run HTML Help Workshop with the" \
42609
d3362c495296 Fix a wrong path in the Makefile.
Georg Brandl <georg@python.org>
parents: 42608
diff changeset
72 "build/htmlhelp/pydoc.hhp project file."
42604
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
73
44103
1e266015cf5b Add more entries to the glossary.
Georg Brandl <georg@python.org>
parents: 43647
diff changeset
74 latex: BUILDER = latex
1e266015cf5b Add more entries to the glossary.
Georg Brandl <georg@python.org>
parents: 43647
diff changeset
75 latex: build
1e266015cf5b Add more entries to the glossary.
Georg Brandl <georg@python.org>
parents: 43647
diff changeset
76 @echo "Build finished; the LaTeX files are in build/latex."
44323
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 44103
diff changeset
77 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 44103
diff changeset
78 "run these through (pdf)latex."
44103
1e266015cf5b Add more entries to the glossary.
Georg Brandl <georg@python.org>
parents: 43647
diff changeset
79
47420
e8797e6e07a7 Add plain text make target.
Georg Brandl <georg@python.org>
parents: 46436
diff changeset
80 text: BUILDER = text
e8797e6e07a7 Add plain text make target.
Georg Brandl <georg@python.org>
parents: 46436
diff changeset
81 text: build
e8797e6e07a7 Add plain text make target.
Georg Brandl <georg@python.org>
parents: 46436
diff changeset
82 @echo "Build finished; the text files are in build/text."
e8797e6e07a7 Add plain text make target.
Georg Brandl <georg@python.org>
parents: 46436
diff changeset
83
44383
3625234bf3d2 Some cleanup in the docs.
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
84 changes: BUILDER = changes
3625234bf3d2 Some cleanup in the docs.
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
85 changes: build
3625234bf3d2 Some cleanup in the docs.
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
86 @echo "The overview file is in build/changes."
3625234bf3d2 Some cleanup in the docs.
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
87
45087
99ef248fb315 Add link checker builder, written for GHOP by Thomas Lamb.
Georg Brandl <georg@python.org>
parents: 44383
diff changeset
88 linkcheck: BUILDER = linkcheck
99ef248fb315 Add link checker builder, written for GHOP by Thomas Lamb.
Georg Brandl <georg@python.org>
parents: 44383
diff changeset
89 linkcheck: build
45472
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45091
diff changeset
90 @echo "Link check complete; look for any errors in the above output " \
45091
6492a78e93b4 Wording nit.
Georg Brandl <georg@python.org>
parents: 45087
diff changeset
91 "or in build/$(BUILDER)/output.txt"
45087
99ef248fb315 Add link checker builder, written for GHOP by Thomas Lamb.
Georg Brandl <georg@python.org>
parents: 44383
diff changeset
92
50578
d41a86875332 Add "suspicious" builder which finds leftover markup in the HTML files.
Georg Brandl <georg@python.org>
parents: 50510
diff changeset
93 suspicious: BUILDER = suspicious
d41a86875332 Add "suspicious" builder which finds leftover markup in the HTML files.
Georg Brandl <georg@python.org>
parents: 50510
diff changeset
94 suspicious: build
d41a86875332 Add "suspicious" builder which finds leftover markup in the HTML files.
Georg Brandl <georg@python.org>
parents: 50510
diff changeset
95 @echo "Suspicious check complete; look for any errors in the above output " \
d41a86875332 Add "suspicious" builder which finds leftover markup in the HTML files.
Georg Brandl <georg@python.org>
parents: 50510
diff changeset
96 "or in build/$(BUILDER)/suspicious.txt"
d41a86875332 Add "suspicious" builder which finds leftover markup in the HTML files.
Georg Brandl <georg@python.org>
parents: 50510
diff changeset
97
45472
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45091
diff changeset
98 coverage: BUILDER = coverage
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45091
diff changeset
99 coverage: build
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45091
diff changeset
100 @echo "Coverage finished; see c.txt and python.txt in build/coverage"
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45091
diff changeset
101
46001
a99ca1e575ed Activate the Sphinx doctest extension and convert howto/functional to use it.
Georg Brandl <georg@python.org>
parents: 45472
diff changeset
102 doctest: BUILDER = doctest
a99ca1e575ed Activate the Sphinx doctest extension and convert howto/functional to use it.
Georg Brandl <georg@python.org>
parents: 45472
diff changeset
103 doctest: build
a99ca1e575ed Activate the Sphinx doctest extension and convert howto/functional to use it.
Georg Brandl <georg@python.org>
parents: 45472
diff changeset
104 @echo "Testing of doctests in the sources finished, look at the " \
a99ca1e575ed Activate the Sphinx doctest extension and convert howto/functional to use it.
Georg Brandl <georg@python.org>
parents: 45472
diff changeset
105 "results in build/doctest/output.txt"
a99ca1e575ed Activate the Sphinx doctest extension and convert howto/functional to use it.
Georg Brandl <georg@python.org>
parents: 45472
diff changeset
106
47431
c0d616f0ad86 Generate pydoc's topic help from the reST docs via Sphinx'
Georg Brandl <georg@python.org>
parents: 47420
diff changeset
107 pydoc-topics: BUILDER = pydoc-topics
c0d616f0ad86 Generate pydoc's topic help from the reST docs via Sphinx'
Georg Brandl <georg@python.org>
parents: 47420
diff changeset
108 pydoc-topics: build
53461
64110c0ad530 Move pydoc_topics module to its own subdirectory, so that no generated code is in Lib/.
Georg Brandl <georg@python.org>
parents: 53460
diff changeset
109 @echo "Building finished; now copy build/pydoc-topics/topics.py " \
64110c0ad530 Move pydoc_topics module to its own subdirectory, so that no generated code is in Lib/.
Georg Brandl <georg@python.org>
parents: 53460
diff changeset
110 "to Lib/pydoc_data/topics.py"
47431
c0d616f0ad86 Generate pydoc's topic help from the reST docs via Sphinx'
Georg Brandl <georg@python.org>
parents: 47420
diff changeset
111
47832
723c0ff698b7 add a htmlview directive
Benjamin Peterson <benjamin@python.org>
parents: 47831
diff changeset
112 htmlview: html
723c0ff698b7 add a htmlview directive
Benjamin Peterson <benjamin@python.org>
parents: 47831
diff changeset
113 $(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"
49254
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
114
42604
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
115 clean:
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
116 -rm -rf build/*
9e1529bf0442 Move the 3k reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
117 -rm -rf tools/sphinx
58012
7361ee2ddfdb #7602: improve "clean" and "checkout" targets now that all tools are in externals.
Georg Brandl <georg@python.org>
parents: 58005
diff changeset
118 -rm -rf tools/pygments
7361ee2ddfdb #7602: improve "clean" and "checkout" targets now that all tools are in externals.
Georg Brandl <georg@python.org>
parents: 58005
diff changeset
119 -rm -rf tools/jinja2
7361ee2ddfdb #7602: improve "clean" and "checkout" targets now that all tools are in externals.
Georg Brandl <georg@python.org>
parents: 58005
diff changeset
120 -rm -rf tools/docutils
49254
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
121
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
122 dist:
63679
71ae523eba5b Merged revisions 83663 via svnmerge from
Georg Brandl <georg@python.org>
parents: 62948
diff changeset
123 rm -rf dist
49254
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
124 mkdir -p dist
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
125
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
126 # archive the HTML
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
127 make html
50305
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
128 cp -pPR build/html dist/python-$(DISTVERSION)-docs-html
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
129 tar -C dist -cf dist/python-$(DISTVERSION)-docs-html.tar python-$(DISTVERSION)-docs-html
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
130 bzip2 -9 -k dist/python-$(DISTVERSION)-docs-html.tar
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
131 (cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-html.zip python-$(DISTVERSION)-docs-html)
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
132 rm -r dist/python-$(DISTVERSION)-docs-html
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
133 rm dist/python-$(DISTVERSION)-docs-html.tar
49254
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
134
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
135 # archive the text build
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
136 make text
50305
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
137 cp -pPR build/text dist/python-$(DISTVERSION)-docs-text
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
138 tar -C dist -cf dist/python-$(DISTVERSION)-docs-text.tar python-$(DISTVERSION)-docs-text
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
139 bzip2 -9 -k dist/python-$(DISTVERSION)-docs-text.tar
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
140 (cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-text.zip python-$(DISTVERSION)-docs-text)
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
141 rm -r dist/python-$(DISTVERSION)-docs-text
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
142 rm dist/python-$(DISTVERSION)-docs-text.tar
53461
64110c0ad530 Move pydoc_topics module to its own subdirectory, so that no generated code is in Lib/.
Georg Brandl <georg@python.org>
parents: 53460
diff changeset
143
49254
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
144 # archive the A4 latex
63679
71ae523eba5b Merged revisions 83663 via svnmerge from
Georg Brandl <georg@python.org>
parents: 62948
diff changeset
145 rm -rf build/latex
49254
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
146 make latex PAPER=a4
62948
b915162427ab Merged revisions 82789 via svnmerge from
Georg Brandl <georg@python.org>
parents: 59581
diff changeset
147 -sed -i 's/makeindex/makeindex -q/' build/latex/Makefile
49254
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
148 (cd build/latex; make clean && make all-pdf && make FMT=pdf zip bz2)
50305
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
149 cp build/latex/docs-pdf.zip dist/python-$(DISTVERSION)-docs-pdf-a4.zip
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
150 cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-a4.tar.bz2
49254
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
151
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
152 # archive the letter latex
63679
71ae523eba5b Merged revisions 83663 via svnmerge from
Georg Brandl <georg@python.org>
parents: 62948
diff changeset
153 rm -rf build/latex
49254
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
154 make latex PAPER=letter
62948
b915162427ab Merged revisions 82789 via svnmerge from
Georg Brandl <georg@python.org>
parents: 59581
diff changeset
155 -sed -i 's/makeindex/makeindex -q/' build/latex/Makefile
49254
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
156 (cd build/latex; make clean && make all-pdf && make FMT=pdf zip bz2)
50305
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
157 cp build/latex/docs-pdf.zip dist/python-$(DISTVERSION)-docs-pdf-letter.zip
e673632e1885 Merged revisions 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49374
diff changeset
158 cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-letter.tar.bz2
49254
386a03ec1ff0 Add "dist" target.
Georg Brandl <georg@python.org>
parents: 49250
diff changeset
159
50505
c75720c3e16e Add rstlint, a little tool to find subtle markup problems and inconsistencies in the Doc sources.
Georg Brandl <georg@python.org>
parents: 50305
diff changeset
160 check:
50510
989314d7cc5e Disable the line length checker by default.
Georg Brandl <georg@python.org>
parents: 50505
diff changeset
161 $(PYTHON) tools/rstlint.py -i tools
59106
9ebbcb7a3989 Issue #8004: add a serve target to the Doc Makefile.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 58012
diff changeset
162
9ebbcb7a3989 Issue #8004: add a serve target to the Doc Makefile.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 58012
diff changeset
163 serve:
9ebbcb7a3989 Issue #8004: add a serve target to the Doc Makefile.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 58012
diff changeset
164 ../Tools/scripts/serve.py build/html
59569
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
165
59581
b878a0ad4d8c Change/fix handling of docs download location: for daily builds, put them right next to the HTML.
Georg Brandl <georg@python.org>
parents: 59570
diff changeset
166 # Targets for daily automated doc build
59569
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
167
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
168 # for development releases: always build
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
169 autobuild-dev:
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
170 make update
59581
b878a0ad4d8c Change/fix handling of docs download location: for daily builds, put them right next to the HTML.
Georg Brandl <georg@python.org>
parents: 59570
diff changeset
171 make dist SPHINXOPTS='-A daily=1'
59569
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
172
59581
b878a0ad4d8c Change/fix handling of docs download location: for daily builds, put them right next to the HTML.
Georg Brandl <georg@python.org>
parents: 59570
diff changeset
173 # for stable releases: only build if not in pre-release stage (alpha, beta, rc)
59569
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
174 autobuild-stable:
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
175 @case $(DISTVERSION) in *[abc]*) \
59581
b878a0ad4d8c Change/fix handling of docs download location: for daily builds, put them right next to the HTML.
Georg Brandl <georg@python.org>
parents: 59570
diff changeset
176 echo "Not building; $(DISTVERSION) is not a release version."; \
b878a0ad4d8c Change/fix handling of docs download location: for daily builds, put them right next to the HTML.
Georg Brandl <georg@python.org>
parents: 59570
diff changeset
177 exit 1;; \
59569
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
178 esac
f255a46b315a Add Makefile targets for automatic doc build. Add script that will be used for daily build.
Georg Brandl <georg@python.org>
parents: 59106
diff changeset
179 @make autobuild-dev