~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-09-23 06:54:14 UTC
  • mfrom: (4695.5.9 remove-logging)
  • Revision ID: pqm@pqm.ubuntu.com-20090923065414-vue8c7speunw9wbq
(mbp) deprecate trace.info, error, show_error

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)
46
43
 
47
44
# Run Python style checker (apt-get install pyflakes)
48
45
#
117
114
clean-sphinx:
118
115
        cd doc/en && make clean
119
116
        cd doc/es && make clean
120
 
        cd doc/ja && make clean
121
117
        cd doc/ru && make clean
122
118
        cd doc/developers && make clean
123
119
 
126
122
        doc/en/user-reference/index.txt \
127
123
        doc/es/Makefile \
128
124
        doc/es/make.bat \
129
 
        doc/ja/Makefile \
130
 
        doc/ja/make.bat \
131
125
        doc/ru/Makefile \
132
126
        doc/ru/make.bat \
133
127
        doc/developers/Makefile \
150
144
        cd doc/en && make html
151
145
        cd doc/es && make html
152
146
        cd doc/ru && make html
153
 
        cd doc/ja && make html
154
147
        cd doc/developers && make html
155
148
 
156
149
# Build the PDF docs using Sphinx. This requires numerous LaTeX
161
154
pdf-sphinx: $(SPHINX_DEPENDENCIES)
162
155
        cd doc/en && make latex
163
156
        cd doc/es && make latex
164
 
        cd doc/ja && make latex
165
157
        cd doc/developers && make latex
166
158
        cd doc/en/_build/latex && make all-pdf
167
159
        cd doc/es/_build/latex && make all-pdf
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
179
170
 
180
171
 
181
172
### Documentation Website ###
182
173
 
183
174
# Where to build the website
184
 
DOC_WEBSITE_BUILD = build_doc_website
 
175
DOC_WEBSITE_BUILD := build_doc_website
185
176
 
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)
193
183
 
194
184
 
198
188
# support our "plain" html documentation so that Sphinx is not a hard
199
189
# dependency for packagers on older platforms.
200
190
 
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
202
192
 
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
206
 
txt_all = \
 
197
txt_all := \
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 \
221
208
        doc/index.txt \
222
209
        $(wildcard doc/index.*.txt)
223
 
txt_nohtml = \
 
210
txt_nohtml := \
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)) 
231
216
 
232
 
non_txt_files = \
 
217
non_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) \
244
229
 
245
230
# doc/developers/*.txt files that should *not* be individually
246
231
# converted to HTML
247
 
dev_txt_nohtml = \
 
232
dev_txt_nohtml := \
248
233
        doc/developers/add.txt \
249
234
        doc/developers/annotate.txt \
250
235
        doc/developers/bundle-creation.txt \
270
255
        doc/developers/status.txt \
271
256
        doc/developers/uncommit.txt
272
257
 
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)) 
276
261
 
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 $@
285
270
#
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
271
doc/developers/%.html: doc/developers/%.txt
290
272
        $(rst2html) --stylesheet=../default.css $< $@
291
273
 
298
280
%.html: %.txt
299
281
        $(rst2html) --stylesheet=../../default.css $< $@
300
282
 
 
283
doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)
 
284
        $(PYTHON) tools/generate_docs.py -o $@ rstx
 
285
 
301
286
doc/en/release-notes/NEWS.txt: NEWS
302
287
        $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
303
288
 
314
299
docs-plain: $(ALL_DOCS)
315
300
 
316
301
# produce a tree containing just the final docs, ready for uploading to the web
317
 
HTMLDIR = html_docs
 
302
HTMLDIR := html_docs
318
303
html-plain: docs-plain
319
304
        $(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) $(HTMLDIR)
320
305
 
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
346
331
 
409
394
 
410
395
### Packaging Targets ###
411
396
 
412
 
.PHONY: dist check-dist-tarball
 
397
.PHONY: dist dist-upload-escudero check-dist-tarball
413
398
 
414
399
# build a distribution source tarball
415
400
#
424
409
        $(MAKE) clean && \
425
410
        $(MAKE) && \
426
411
        bzr export $$expdir && \
427
 
        cp bzrlib/*.c bzrlib/*.h $$expdir/bzrlib/. && \
 
412
        cp bzrlib/*.c $$expdir/bzrlib/. && \
428
413
        tar cfz $$tarball -C $$expbasedir bzr-$$version && \
429
414
        gpg --detach-sign $$tarball && \
430
415
        rm -rf $$expbasedir
437
422
        tar Cxz $$tmpdir -f $$tarball && \
438
423
        $(MAKE) -C $$tmpdir/bzr-$$version check && \
439
424
        rm -rf $$tmpdir
 
425
 
 
426
 
 
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 \
 
434
                && \
 
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