~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to Makefile

(vila) Fix bzrlib.tests.test_gpg.TestVerify.test_verify_revoked_signature
 with recent versions of gpg. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 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
28
28
PLUGIN_TARGET=plugin-release
29
29
PYTHON_BUILDFLAGS=
30
30
 
31
 
.PHONY: all clean extensions pyflakes api-docs check-nodocs check
 
31
.PHONY: all clean realclean extensions pyflakes api-docs check-nodocs check
32
32
 
33
33
all: extensions
34
34
 
42
42
        set -e
43
43
        # Generate a stream for PQM to watch.
44
44
        -$(RM) -f selftest.log
45
 
        $(PYTHON) -Werror -O ./bzr selftest --subunit $(tests) | tee selftest.log
 
45
        echo `date` ": selftest starts" 1>&2
 
46
        $(PYTHON) -Werror -Wignore::ImportWarning -O ./bzr selftest -Oselftest.timeout=120 \
 
47
          --subunit $(tests) | tee selftest.log
 
48
        echo `date` ": selftest ends" 1>&2
46
49
        # An empty log file should catch errors in the $(PYTHON)
47
50
        # command above (the '|' swallow any errors since 'make'
48
51
        # sees the 'tee' exit code for the whole line
66
69
        $(PYTHON) setup.py clean
67
70
        -find . -name "*.pyc" -o -name "*.pyo" -o -name "*.so" | xargs rm -f
68
71
 
 
72
realclean: clean
 
73
        # Remove files which are autogenerated but included by the tarball.
 
74
        rm -f bzrlib/*_pyx.c
 
75
        rm -f bzrlib/_simple_set_pyx.h bzrlib/_simple_set_pyx_api.h
 
76
 
69
77
# Build API documentation
70
78
docfiles = bzr bzrlib
71
79
api-docs:
72
80
        mkdir -p api/html
73
 
        PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --html -o api/html --docformat 'restructuredtext en' $(docfiles)
74
 
check-api-docs:
75
 
        PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
 
81
        pydoctor --make-html --docformat='restructuredtext' --html-output=api/html $(docfiles)
76
82
 
77
83
# build tags for emacs and vim
78
84
TAGS:
139
145
        doc/developers/Makefile \
140
146
        doc/developers/make.bat
141
147
 
 
148
NEWS_FILES = $(wildcard doc/en/release-notes/bzr-*.txt)
 
149
 
142
150
doc/en/user-reference/index.txt: $(MAN_DEPENDENCIES)
143
151
        $(PYTHON) tools/generate_docs.py -o $@ rstx
144
152
 
145
 
doc/en/release-notes/index.txt: NEWS tools/generate_release_notes.py
146
 
        $(PYTHON) tools/generate_release_notes.py NEWS $@
 
153
doc/en/release-notes/index.txt: $(NEWS_FILES) tools/generate_release_notes.py
 
154
        $(PYTHON) tools/generate_release_notes.py $@ $(NEWS_FILES)
147
155
 
148
156
doc/%/Makefile: doc/en/Makefile
149
157
        $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
184
192
        cd doc/developers && make htmlhelp
185
193
 
186
194
 
 
195
# Build the texinfo files using Sphinx.
 
196
texinfo-sphinx: $(SPHINX_DEPENDENCIES)
 
197
        cd doc/en && make texinfo
 
198
        cd doc/es && make texinfo
 
199
        cd doc/ru && make texinfo
 
200
        cd doc/ja && make texinfo
 
201
        cd doc/developers && make texinfo
 
202
 
187
203
### Documentation Website ###
188
204
 
189
205
# Where to build the website
302
318
        $(rst2html) --stylesheet=default.css $< $@
303
319
 
304
320
%.html: %.txt
305
 
        $(rst2html) --stylesheet=../../default.css $< $@
 
321
        $(rst2html) --stylesheet=../../default.css $< "$@"
306
322
 
307
 
doc/en/release-notes/NEWS.txt: NEWS
308
 
        $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
 
323
doc/en/release-notes/NEWS.txt: $(NEWS_FILES) tools/generate_release_notes.py
 
324
        $(PYTHON) tools/generate_release_notes.py "$@" $(NEWS_FILES)
309
325
 
310
326
upgrade_guide_dependencies =  $(wildcard $(addsuffix /*.txt, doc/en/upgrade-guide)) 
311
327
 
413
429
        $(PYTHON) tools/win32/ostools.py remove dist
414
430
 
415
431
 
 
432
# i18n targets
 
433
 
 
434
.PHONY: update-pot po/bzr.pot
 
435
update-pot: po/bzr.pot
 
436
 
 
437
TRANSLATABLE_PYFILES:=$(shell find bzrlib -name '*.py' \
 
438
                | grep -v 'bzrlib/tests/' \
 
439
                | grep -v 'bzrlib/doc' \
 
440
                )
 
441
 
 
442
po/bzr.pot: $(PYFILES) $(DOCFILES)
 
443
        $(PYTHON) ./bzr export-pot --include-duplicates > po/bzr.pot
 
444
        echo $(TRANSLATABLE_PYFILES) | xargs \
 
445
          xgettext --package-name "bzr" \
 
446
          --msgid-bugs-address "<bazaar@canonical.com>" \
 
447
          --copyright-holder "Canonical" \
 
448
          --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
 
449
          -d bzr -p po -o bzr.pot
 
450
 
 
451
 
416
452
### Packaging Targets ###
417
453
 
418
454
.PHONY: dist check-dist-tarball