/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: John Arbash Meinel
  • Date: 2009-09-24 19:26:45 UTC
  • mto: (4634.52.3 2.0)
  • mto: This revision was merged to the branch mainline in revision 4716.
  • Revision ID: john@arbash-meinel.com-20090924192645-hyy1ycnnk6u3j5j6
Catch a corner case that we were missing.
The CHKInventory tests were passing, but failed for test_inv because
we were passing None to _getitems(). That only failed for InternalNodes,
but we were using a structure that didn't have internal nodes.
So now the test is parameterized on a small CHKInventory page size
to force those things out into the open.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd
2
2
#
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
40
40
 
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)
 
43
        @echo "Running all tests with no locale."
 
44
        LC_CTYPE= LANG=C LC_ALL= ./bzr selftest -1v $(tests) 2>&1 | sed -e 's/^/[ascii] /'
46
45
 
47
46
# Run Python style checker (apt-get install pyflakes)
48
47
#
117
116
clean-sphinx:
118
117
        cd doc/en && make clean
119
118
        cd doc/es && make clean
120
 
        cd doc/ja && make clean
121
119
        cd doc/ru && make clean
122
120
        cd doc/developers && make clean
123
121
 
126
124
        doc/en/user-reference/index.txt \
127
125
        doc/es/Makefile \
128
126
        doc/es/make.bat \
129
 
        doc/ja/Makefile \
130
 
        doc/ja/make.bat \
131
127
        doc/ru/Makefile \
132
128
        doc/ru/make.bat \
133
129
        doc/developers/Makefile \
150
146
        cd doc/en && make html
151
147
        cd doc/es && make html
152
148
        cd doc/ru && make html
153
 
        cd doc/ja && make html
154
149
        cd doc/developers && make html
155
150
 
156
151
# Build the PDF docs using Sphinx. This requires numerous LaTeX
161
156
pdf-sphinx: $(SPHINX_DEPENDENCIES)
162
157
        cd doc/en && make latex
163
158
        cd doc/es && make latex
164
 
        cd doc/ja && make latex
165
159
        cd doc/developers && make latex
166
160
        cd doc/en/_build/latex && make all-pdf
167
161
        cd doc/es/_build/latex && make all-pdf
174
168
        cd doc/en && make htmlhelp
175
169
        cd doc/es && make htmlhelp
176
170
        cd doc/ru && make htmlhelp
177
 
        cd doc/ja && make htmlhelp
178
171
        cd doc/developers && make htmlhelp
179
172
 
180
173
 
181
174
### Documentation Website ###
182
175
 
183
176
# Where to build the website
184
 
DOC_WEBSITE_BUILD = build_doc_website
 
177
DOC_WEBSITE_BUILD := build_doc_website
185
178
 
186
179
# Build and package docs into a website, complete with downloads.
187
180
doc-website: html-sphinx pdf-sphinx
188
181
        $(PYTHON) tools/package_docs.py doc/en $(DOC_WEBSITE_BUILD)
189
182
        $(PYTHON) tools/package_docs.py doc/es $(DOC_WEBSITE_BUILD)
190
183
        $(PYTHON) tools/package_docs.py doc/ru $(DOC_WEBSITE_BUILD)
191
 
        $(PYTHON) tools/package_docs.py doc/ja $(DOC_WEBSITE_BUILD)
192
184
        $(PYTHON) tools/package_docs.py doc/developers $(DOC_WEBSITE_BUILD)
193
185
 
194
186
 
198
190
# support our "plain" html documentation so that Sphinx is not a hard
199
191
# dependency for packagers on older platforms.
200
192
 
201
 
rst2html = $(PYTHON) tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning
 
193
rst2html := $(PYTHON) tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning
202
194
 
203
195
# translate txt docs to html
204
 
derived_txt_files = \
 
196
derived_txt_files := \
 
197
        doc/en/user-reference/bzr_man.txt \
205
198
        doc/en/release-notes/NEWS.txt
206
 
txt_all = \
 
199
txt_all := \
207
200
        doc/en/tutorials/tutorial.txt \
208
201
        doc/en/tutorials/using_bazaar_with_launchpad.txt \
209
202
        doc/en/tutorials/centralized_workflow.txt \
210
203
        $(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 \
 
204
        $(wildcard doc/ru/tutorials/*.txt) \
215
205
        $(wildcard doc/*/mini-tutorial/index.txt) \
216
206
        $(wildcard doc/*/user-guide/index-plain.txt) \
217
 
        doc/en/admin-guide/index-plain.txt \
218
207
        $(wildcard doc/es/guia-usario/*.txt) \
219
208
        $(derived_txt_files) \
220
209
        doc/en/upgrade-guide/index.txt \
221
210
        doc/index.txt \
222
211
        $(wildcard doc/index.*.txt)
223
 
txt_nohtml = \
 
212
txt_nohtml := \
224
213
        doc/en/user-guide/index.txt \
225
214
        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)) 
 
215
        doc/ru/user-guide/index.txt
 
216
txt_files := $(filter-out $(txt_nohtml), $(txt_all))
 
217
htm_files := $(patsubst %.txt, %.html, $(txt_files)) 
231
218
 
232
 
non_txt_files = \
 
219
non_txt_files := \
233
220
       doc/default.css \
234
221
       $(wildcard doc/*/bzr-en-quick-reference.svg) \
235
222
       $(wildcard doc/*/bzr-en-quick-reference.png) \
244
231
 
245
232
# doc/developers/*.txt files that should *not* be individually
246
233
# converted to HTML
247
 
dev_txt_nohtml = \
 
234
dev_txt_nohtml := \
248
235
        doc/developers/add.txt \
249
236
        doc/developers/annotate.txt \
250
237
        doc/developers/bundle-creation.txt \
270
257
        doc/developers/status.txt \
271
258
        doc/developers/uncommit.txt
272
259
 
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)) 
 
260
dev_txt_all := $(wildcard $(addsuffix /*.txt, doc/developers))
 
261
dev_txt_files := $(filter-out $(dev_txt_nohtml), $(dev_txt_all))
 
262
dev_htm_files := $(patsubst %.txt, %.html, $(dev_txt_files)) 
276
263
 
277
264
doc/en/user-guide/index-plain.html: $(wildcard $(addsuffix /*.txt, doc/en/user-guide)) 
278
265
        $(rst2html) --stylesheet=../../default.css $(dir $@)index-plain.txt $@
283
270
#doc/ru/user-guide/index.html: $(wildcard $(addsuffix /*.txt, doc/ru/user-guide)) 
284
271
#       $(rst2html) --stylesheet=../../default.css $(dir $@)index.txt $@
285
272
#
286
 
doc/en/admin-guide/index-plain.html: $(wildcard $(addsuffix /*.txt, doc/en/admin-guide)) 
287
 
        $(rst2html) --stylesheet=../../default.css $(dir $@)index-plain.txt $@
288
 
 
289
273
doc/developers/%.html: doc/developers/%.txt
290
274
        $(rst2html) --stylesheet=../default.css $< $@
291
275
 
298
282
%.html: %.txt
299
283
        $(rst2html) --stylesheet=../../default.css $< $@
300
284
 
 
285
doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)
 
286
        $(PYTHON) tools/generate_docs.py -o $@ rstx
 
287
 
301
288
doc/en/release-notes/NEWS.txt: NEWS
302
289
        $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
303
290
 
314
301
docs-plain: $(ALL_DOCS)
315
302
 
316
303
# produce a tree containing just the final docs, ready for uploading to the web
317
 
HTMLDIR = html_docs
 
304
HTMLDIR := html_docs
318
305
html-plain: docs-plain
319
306
        $(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) $(HTMLDIR)
320
307
 
340
327
# These are files that need to be copied into the build location to boostrap
341
328
# the build process.
342
329
# Note that the path is relative to tools/win32
343
 
BUILDOUT_FILES = buildout.cfg \
 
330
BUILDOUT_FILES := buildout.cfg \
344
331
        buildout-templates/bin/build-installer.bat.in \
345
332
        ostools.py bootstrap.py
346
333
 
409
396
 
410
397
### Packaging Targets ###
411
398
 
412
 
.PHONY: dist check-dist-tarball
 
399
.PHONY: dist dist-upload-escudero check-dist-tarball
413
400
 
414
 
# build a distribution source tarball
 
401
# build a distribution tarball and zip file.
415
402
#
416
403
# this method of copying the pyrex generated files is a bit ugly; it would be
417
404
# nicer to generate it from distutils.
421
408
        expbasedir=`mktemp -t -d tmp_bzr_dist.XXXXXXXXXX` && \
422
409
        expdir=$$expbasedir/bzr-$$version && \
423
410
        tarball=$$PWD/../bzr-$$version.tar.gz && \
 
411
        zipball=$$PWD/../bzr-$$version.zip && \
424
412
        $(MAKE) clean && \
425
413
        $(MAKE) && \
426
414
        bzr export $$expdir && \
427
 
        cp bzrlib/*.c bzrlib/*.h $$expdir/bzrlib/. && \
 
415
        cp bzrlib/*.c $$expdir/bzrlib/. && \
428
416
        tar cfz $$tarball -C $$expbasedir bzr-$$version && \
 
417
        (cd $$expbasedir && zip -r $$zipball bzr-$$version) && \
429
418
        gpg --detach-sign $$tarball && \
 
419
        gpg --detach-sign $$zipball && \
430
420
        rm -rf $$expbasedir
431
421
 
432
422
# run all tests in a previously built tarball
437
427
        tar Cxz $$tmpdir -f $$tarball && \
438
428
        $(MAKE) -C $$tmpdir/bzr-$$version check && \
439
429
        rm -rf $$tmpdir
 
430
 
 
431
 
 
432
# upload previously built tarball to the download directory on bazaar-vcs.org,
 
433
# and verify that it can be downloaded ok.
 
434
dist-upload-escudero:
 
435
        version=`./bzr version --short` && \
 
436
        tarball=../bzr-$$version.tar.gz && \
 
437
        zipball=../bzr-$$version.zip && \
 
438
        scp $$zipball $$zipball.sig $$tarball $$tarball.sig \
 
439
            escudero.ubuntu.com:/srv/bazaar.canonical.com/www/releases/src \
 
440
                && \
 
441
        echo verifying over http... && \
 
442
        curl http://bazaar-vcs.org/releases/src/bzr-$$version.zip \
 
443
                | diff -s - $$zipball && \
 
444
        curl http://bazaar-vcs.org/releases/src/bzr-$$version.zip.sig \
 
445
                | diff -s - $$zipball.sig 
 
446
        curl http://bazaar-vcs.org/releases/src/bzr-$$version.tar.gz \
 
447
                | diff -s - $$tarball && \
 
448
        curl http://bazaar-vcs.org/releases/src/bzr-$$version.tar.gz.sig \
 
449
                | diff -s - $$tarball.sig