1
# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd
1
# Copyright (C) 2005-2010 Canonical Ltd
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
39
39
check: docs check-nodocs
41
41
check-nodocs: extensions
42
$(PYTHON) -Werror -O ./bzr selftest -1v $(tests)
42
# Generate a stream for PQM to watch.
43
$(PYTHON) -Werror -O ./bzr selftest --subunit $(tests) | tee selftest.log
44
# Check that there were no errors reported.
45
subunit-stats < selftest.log
44
47
# Run Python style checker (apt-get install pyflakes)
166
174
cd doc/en && make htmlhelp
167
175
cd doc/es && make htmlhelp
168
176
cd doc/ru && make htmlhelp
177
cd doc/ja && make htmlhelp
169
178
cd doc/developers && make htmlhelp
172
181
### Documentation Website ###
174
183
# Where to build the website
175
DOC_WEBSITE_BUILD := build_doc_website
184
DOC_WEBSITE_BUILD = build_doc_website
177
186
# Build and package docs into a website, complete with downloads.
178
187
doc-website: html-sphinx pdf-sphinx
179
188
$(PYTHON) tools/package_docs.py doc/en $(DOC_WEBSITE_BUILD)
180
189
$(PYTHON) tools/package_docs.py doc/es $(DOC_WEBSITE_BUILD)
181
190
$(PYTHON) tools/package_docs.py doc/ru $(DOC_WEBSITE_BUILD)
191
$(PYTHON) tools/package_docs.py doc/ja $(DOC_WEBSITE_BUILD)
182
192
$(PYTHON) tools/package_docs.py doc/developers $(DOC_WEBSITE_BUILD)
188
198
# support our "plain" html documentation so that Sphinx is not a hard
189
199
# dependency for packagers on older platforms.
191
rst2html := $(PYTHON) tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning
201
rst2html = $(PYTHON) tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning
193
203
# translate txt docs to html
194
derived_txt_files := \
195
doc/en/user-reference/bzr_man.txt \
204
derived_txt_files = \
196
205
doc/en/release-notes/NEWS.txt
198
207
doc/en/tutorials/tutorial.txt \
199
208
doc/en/tutorials/using_bazaar_with_launchpad.txt \
200
209
doc/en/tutorials/centralized_workflow.txt \
201
210
$(wildcard doc/es/tutorials/*.txt) \
202
$(wildcard doc/ru/tutorials/*.txt) \
211
$(wildcard doc/ru/tutorials/*.txt) \
212
doc/ja/tutorials/tutorial.txt \
213
doc/ja/tutorials/using_bazaar_with_launchpad.txt \
214
doc/ja/tutorials/centralized_workflow.txt \
203
215
$(wildcard doc/*/mini-tutorial/index.txt) \
204
216
$(wildcard doc/*/user-guide/index-plain.txt) \
217
doc/en/admin-guide/index-plain.txt \
205
218
$(wildcard doc/es/guia-usario/*.txt) \
206
219
$(derived_txt_files) \
207
220
doc/en/upgrade-guide/index.txt \
209
222
$(wildcard doc/index.*.txt)
211
224
doc/en/user-guide/index.txt \
212
225
doc/es/user-guide/index.txt \
213
doc/ru/user-guide/index.txt
214
txt_files := $(filter-out $(txt_nohtml), $(txt_all))
215
htm_files := $(patsubst %.txt, %.html, $(txt_files))
226
doc/ja/user-guide/index.txt \
227
doc/ru/user-guide/index.txt \
228
doc/en/admin-guide/index.txt
229
txt_files = $(filter-out $(txt_nohtml), $(txt_all))
230
htm_files = $(patsubst %.txt, %.html, $(txt_files))
218
233
doc/default.css \
219
234
$(wildcard doc/*/bzr-en-quick-reference.svg) \
220
235
$(wildcard doc/*/bzr-en-quick-reference.png) \
255
270
doc/developers/status.txt \
256
271
doc/developers/uncommit.txt
258
dev_txt_all := $(wildcard $(addsuffix /*.txt, doc/developers))
259
dev_txt_files := $(filter-out $(dev_txt_nohtml), $(dev_txt_all))
260
dev_htm_files := $(patsubst %.txt, %.html, $(dev_txt_files))
273
dev_txt_all = $(wildcard $(addsuffix /*.txt, doc/developers))
274
dev_txt_files = $(filter-out $(dev_txt_nohtml), $(dev_txt_all))
275
dev_htm_files = $(patsubst %.txt, %.html, $(dev_txt_files))
262
277
doc/en/user-guide/index-plain.html: $(wildcard $(addsuffix /*.txt, doc/en/user-guide))
263
278
$(rst2html) --stylesheet=../../default.css $(dir $@)index-plain.txt $@
268
283
#doc/ru/user-guide/index.html: $(wildcard $(addsuffix /*.txt, doc/ru/user-guide))
269
284
# $(rst2html) --stylesheet=../../default.css $(dir $@)index.txt $@
286
doc/en/admin-guide/index-plain.html: $(wildcard $(addsuffix /*.txt, doc/en/admin-guide))
287
$(rst2html) --stylesheet=../../default.css $(dir $@)index-plain.txt $@
271
289
doc/developers/%.html: doc/developers/%.txt
272
290
$(rst2html) --stylesheet=../default.css $< $@
281
299
$(rst2html) --stylesheet=../../default.css $< $@
283
doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)
284
$(PYTHON) tools/generate_docs.py -o $@ rstx
286
301
doc/en/release-notes/NEWS.txt: NEWS
287
302
$(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
325
340
# These are files that need to be copied into the build location to boostrap
326
341
# the build process.
327
342
# Note that the path is relative to tools/win32
328
BUILDOUT_FILES := buildout.cfg \
343
BUILDOUT_FILES = buildout.cfg \
329
344
buildout-templates/bin/build-installer.bat.in \
330
345
ostools.py bootstrap.py
422
437
tar Cxz $$tmpdir -f $$tarball && \
423
438
$(MAKE) -C $$tmpdir/bzr-$$version check && \
427
# upload previously built tarball to the download directory on bazaar-vcs.org,
428
# and verify that it can be downloaded ok.
429
dist-upload-escudero:
430
version=`./bzr version --short` && \
431
tarball=../bzr-$$version.tar.gz && \
432
scp $$tarball $$tarball.sig \
433
escudero.ubuntu.com:/srv/bazaar.canonical.com/www/releases/src \
435
echo verifying over http... && \
436
curl http://bazaar-vcs.org/releases/src/bzr-$$version.tar.gz \
437
| diff -s - $$tarball && \
438
curl http://bazaar-vcs.org/releases/src/bzr-$$version.tar.gz.sig \
439
| diff -s - $$tarball.sig