~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-08-17 18:13:57 UTC
  • mfrom: (5268.7.29 transport-segments)
  • Revision ID: pqm@pqm.ubuntu.com-20110817181357-y5q5eth1hk8bl3om
(jelmer) Allow specifying the colocated branch to use in the branch URL,
 and retrieving the branch name using ControlDir._get_selected_branch.
 (Jelmer Vernooij)

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
 
39
39
check: docs check-nodocs
40
40
 
41
41
check-nodocs: extensions
42
 
        $(PYTHON) -Werror -O ./bzr selftest -1v $(tests)
 
42
        set -e
 
43
        # Generate a stream for PQM to watch.
 
44
        -$(RM) -f selftest.log
 
45
        $(PYTHON) -Werror -Wignore::ImportWarning -O ./bzr selftest --subunit $(tests) | tee selftest.log
 
46
        # An empty log file should catch errors in the $(PYTHON)
 
47
        # command above (the '|' swallow any errors since 'make'
 
48
        # sees the 'tee' exit code for the whole line
 
49
        if [ ! -s selftest.log ] ; then exit 1 ; fi
 
50
        # Check that there were no errors reported.
 
51
        subunit-stats < selftest.log
43
52
 
44
53
# Run Python style checker (apt-get install pyflakes)
45
54
#
57
66
        $(PYTHON) setup.py clean
58
67
        -find . -name "*.pyc" -o -name "*.pyo" -o -name "*.so" | xargs rm -f
59
68
 
 
69
realclean: clean
 
70
        # Remove files which are autogenerated but included by the tarball.
 
71
        rm -f bzrlib/*_pyx.c
 
72
        rm -f bzrlib/_simple_set_pyx.h bzrlib/_simple_set_pyx_api.h
 
73
 
60
74
# Build API documentation
61
75
docfiles = bzr bzrlib
62
76
api-docs:
63
77
        mkdir -p api/html
64
 
        PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --html -o api/html --docformat 'restructuredtext en' $(docfiles)
65
 
check-api-docs:
66
 
        PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
 
78
        pydoctor --make-html --docformat='restructuredtext' --html-output=api/html $(docfiles)
67
79
 
68
80
# build tags for emacs and vim
69
81
TAGS:
130
142
        doc/developers/Makefile \
131
143
        doc/developers/make.bat
132
144
 
 
145
NEWS_FILES = $(wildcard doc/en/release-notes/bzr-*.txt)
 
146
 
133
147
doc/en/user-reference/index.txt: $(MAN_DEPENDENCIES)
134
148
        $(PYTHON) tools/generate_docs.py -o $@ rstx
135
149
 
136
 
doc/en/release-notes/index.txt: NEWS tools/generate_release_notes.py
137
 
        $(PYTHON) tools/generate_release_notes.py NEWS $@
 
150
doc/en/release-notes/index.txt: $(NEWS_FILES) tools/generate_release_notes.py
 
151
        $(PYTHON) tools/generate_release_notes.py $@ $(NEWS_FILES)
138
152
 
139
153
doc/%/Makefile: doc/en/Makefile
140
154
        $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
293
307
        $(rst2html) --stylesheet=default.css $< $@
294
308
 
295
309
%.html: %.txt
296
 
        $(rst2html) --stylesheet=../../default.css $< $@
 
310
        $(rst2html) --stylesheet=../../default.css $< "$@"
297
311
 
298
 
doc/en/release-notes/NEWS.txt: NEWS
299
 
        $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
 
312
doc/en/release-notes/NEWS.txt: $(NEWS_FILES) tools/generate_release_notes.py
 
313
        $(PYTHON) tools/generate_release_notes.py "$@" $(NEWS_FILES)
300
314
 
301
315
upgrade_guide_dependencies =  $(wildcard $(addsuffix /*.txt, doc/en/upgrade-guide)) 
302
316
 
404
418
        $(PYTHON) tools/win32/ostools.py remove dist
405
419
 
406
420
 
 
421
# i18n targets
 
422
 
 
423
.PHONY: update-pot po/bzr.pot
 
424
update-pot: po/bzr.pot
 
425
 
 
426
TRANSLATABLE_PYFILES:=$(shell find bzrlib -name '*.py' \
 
427
                | grep -v 'bzrlib/tests/' \
 
428
                | grep -v 'bzrlib/doc' \
 
429
                )
 
430
 
 
431
po/bzr.pot: $(PYFILES) $(DOCFILES)
 
432
        $(PYTHON) ./bzr export-pot > po/bzr.pot
 
433
        echo $(TRANSLATABLE_PYFILES) | xargs \
 
434
          xgettext --package-name "bzr" \
 
435
          --msgid-bugs-address "<bazaar@canonical.com>" \
 
436
          --copyright-holder "Canonical" \
 
437
          --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
 
438
          -d bzr -p po -o bzr.pot
 
439
 
 
440
 
407
441
### Packaging Targets ###
408
442
 
409
443
.PHONY: dist check-dist-tarball