1
# Copyright (C) 2005-2010 Canonical Ltd
1
# Copyright (C) 2005, 2006, 2007, 2008, 2009 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
# 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
42
$(PYTHON) -Werror -O ./bzr selftest -1v $(tests)
47
44
# Run Python style checker (apt-get install pyflakes)
174
166
cd doc/en && make htmlhelp
175
167
cd doc/es && make htmlhelp
176
168
cd doc/ru && make htmlhelp
177
cd doc/ja && make htmlhelp
178
169
cd doc/developers && make htmlhelp
181
172
### Documentation Website ###
183
174
# Where to build the website
184
DOC_WEBSITE_BUILD = build_doc_website
175
DOC_WEBSITE_BUILD := build_doc_website
186
177
# Build and package docs into a website, complete with downloads.
187
178
doc-website: html-sphinx pdf-sphinx
188
179
$(PYTHON) tools/package_docs.py doc/en $(DOC_WEBSITE_BUILD)
189
180
$(PYTHON) tools/package_docs.py doc/es $(DOC_WEBSITE_BUILD)
190
181
$(PYTHON) tools/package_docs.py doc/ru $(DOC_WEBSITE_BUILD)
191
$(PYTHON) tools/package_docs.py doc/ja $(DOC_WEBSITE_BUILD)
192
182
$(PYTHON) tools/package_docs.py doc/developers $(DOC_WEBSITE_BUILD)
198
188
# support our "plain" html documentation so that Sphinx is not a hard
199
189
# dependency for packagers on older platforms.
201
rst2html = $(PYTHON) tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning
191
rst2html := $(PYTHON) tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning
203
193
# translate txt docs to html
204
derived_txt_files = \
194
derived_txt_files := \
195
doc/en/user-reference/bzr_man.txt \
205
196
doc/en/release-notes/NEWS.txt
207
198
doc/en/tutorials/tutorial.txt \
208
199
doc/en/tutorials/using_bazaar_with_launchpad.txt \
209
200
doc/en/tutorials/centralized_workflow.txt \
210
201
$(wildcard doc/es/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 \
202
$(wildcard doc/ru/tutorials/*.txt) \
215
203
$(wildcard doc/*/mini-tutorial/index.txt) \
216
204
$(wildcard doc/*/user-guide/index-plain.txt) \
217
doc/en/admin-guide/index-plain.txt \
218
205
$(wildcard doc/es/guia-usario/*.txt) \
219
206
$(derived_txt_files) \
220
207
doc/en/upgrade-guide/index.txt \
222
209
$(wildcard doc/index.*.txt)
224
211
doc/en/user-guide/index.txt \
225
212
doc/es/user-guide/index.txt \
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))
213
doc/ru/user-guide/index.txt
214
txt_files := $(filter-out $(txt_nohtml), $(txt_all))
215
htm_files := $(patsubst %.txt, %.html, $(txt_files))
233
218
doc/default.css \
234
219
$(wildcard doc/*/bzr-en-quick-reference.svg) \
235
220
$(wildcard doc/*/bzr-en-quick-reference.png) \
270
255
doc/developers/status.txt \
271
256
doc/developers/uncommit.txt
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))
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))
277
262
doc/en/user-guide/index-plain.html: $(wildcard $(addsuffix /*.txt, doc/en/user-guide))
278
263
$(rst2html) --stylesheet=../../default.css $(dir $@)index-plain.txt $@
283
268
#doc/ru/user-guide/index.html: $(wildcard $(addsuffix /*.txt, doc/ru/user-guide))
284
269
# $(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 $@
289
271
doc/developers/%.html: doc/developers/%.txt
290
272
$(rst2html) --stylesheet=../default.css $< $@
299
281
$(rst2html) --stylesheet=../../default.css $< $@
283
doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)
284
$(PYTHON) tools/generate_docs.py -o $@ rstx
301
286
doc/en/release-notes/NEWS.txt: NEWS
302
287
$(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
340
325
# These are files that need to be copied into the build location to boostrap
341
326
# the build process.
342
327
# Note that the path is relative to tools/win32
343
BUILDOUT_FILES = buildout.cfg \
328
BUILDOUT_FILES := buildout.cfg \
344
329
buildout-templates/bin/build-installer.bat.in \
345
330
ostools.py bootstrap.py
437
422
tar Cxz $$tmpdir -f $$tarball && \
438
423
$(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