@@ -9,22 +9,23 @@ SVNROOT = http://svn.python.org/projects
99SPHINXOPTS =
1010PAPER =
1111SOURCES =
12+ DISTVERSION =
1213
1314ALLSPHINXOPTS = -b $(BUILDER ) -d build/doctrees -D latex_paper_size=$(PAPER ) \
1415 $(SPHINXOPTS ) . build/$(BUILDER ) $(SOURCES )
1516
16- .PHONY : help checkout update build html web htmlhelp clean coverage
17+ .PHONY : help checkout update build html htmlhelp clean coverage dist
1718
1819help :
1920 @echo " Please use \` make <target>' where <target> is one of"
2021 @echo " html to make standalone HTML files"
21- @echo " web to make file usable by Sphinx.web"
2222 @echo " htmlhelp to make HTML files and a HTML help project"
2323 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
2424 @echo " text to make plain text files"
2525 @echo " changes to make an overview over all changed/added/deprecated items"
2626 @echo " linkcheck to check all external links for integrity"
2727 @echo " coverage to check documentation coverage for library and C API"
28+ @echo " dist to create a \" dist\" directory with archived docs for download"
2829
2930checkout :
3031 @if [ ! -d tools/sphinx ]; then \
@@ -59,12 +60,6 @@ html: BUILDER = html
5960html : build
6061 @echo " Build finished. The HTML pages are in build/html."
6162
62- web : BUILDER = web
63- web : build
64- @echo " Build finished; now you can run"
65- @echo " PYTHONPATH=tools $( PYTHON) -m sphinx.web build/web"
66- @echo " to start the server."
67-
6863htmlhelp : BUILDER = htmlhelp
6964htmlhelp : build
7065 @echo " Build finished; now you can run HTML Help Workshop with the" \
@@ -105,6 +100,44 @@ pydoc-topics: build
105100
106101htmlview : html
107102 $(PYTHON ) -c " import webbrowser; webbrowser.open('build/html/index.html')"
103+
108104clean :
109105 -rm -rf build/*
110106 -rm -rf tools/sphinx
107+
108+ dist :
109+ -rm -rf dist
110+ mkdir -p dist
111+
112+ # archive the HTML
113+ make html
114+ cp -a build/html dist/python$(DISTVERSION)-docs-html
115+ tar -C dist -cf dist/python$(DISTVERSION)-docs-html.tar python$(DISTVERSION)-docs-html
116+ bzip2 -9 -k dist/python$(DISTVERSION)-docs-html.tar
117+ (cd dist; zip -q -r -9 python$(DISTVERSION)-docs-html.zip python$(DISTVERSION)-docs-html)
118+ rm -r dist/python$(DISTVERSION)-docs-html
119+ rm dist/python$(DISTVERSION)-docs-html.tar
120+
121+ # archive the text build
122+ make text
123+ cp -a build/text dist/python$(DISTVERSION)-docs-text
124+ tar -C dist -cf dist/python$(DISTVERSION)-docs-text.tar python$(DISTVERSION)-docs-text
125+ bzip2 -9 -k dist/python$(DISTVERSION)-docs-text.tar
126+ (cd dist; zip -q -r -9 python$(DISTVERSION)-docs-text.zip python$(DISTVERSION)-docs-text)
127+ rm -r dist/python$(DISTVERSION)-docs-text
128+ rm dist/python$(DISTVERSION)-docs-text.tar
129+
130+ # archive the A4 latex
131+ -rm -r build/latex
132+ make latex PAPER=a4
133+ (cd build/latex; make clean && make all-pdf && make FMT=pdf zip bz2)
134+ cp build/latex/docs-pdf.zip dist/python$(DISTVERSION)-docs-pdf-a4.zip
135+ cp build/latex/docs-pdf.tar.bz2 dist/python$(DISTVERSION)-docs-pdf-a4.tar.bz2
136+
137+ # archive the letter latex
138+ rm -r build/latex
139+ make latex PAPER=letter
140+ (cd build/latex; make clean && make all-pdf && make FMT=pdf zip bz2)
141+ cp build/latex/docs-pdf.zip dist/python$(DISTVERSION)-docs-pdf-letter.zip
142+ cp build/latex/docs-pdf.tar.bz2 dist/python$(DISTVERSION)-docs-pdf-letter.tar.bz2
143+
0 commit comments