/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: Martin
  • Date: 2010-05-25 17:27:52 UTC
  • mfrom: (5254 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5257.
  • Revision ID: gzlist@googlemail.com-20100525172752-amm089xcikv968sw
Merge bzr.dev to unite with similar changes already made

Show diffs side-by-side

added added

removed removed

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