bzr branch
http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
|
0.140.47
by Jelmer Vernooij
Support translations. |
1 |
DEBUGGER ?= |
2 |
BZR ?= $(shell which bzr) |
|
3 |
PYTHON ?= $(shell which python) |
|
4 |
SETUP ?= ./setup.py |
|
5 |
CTAGS ?= ctags |
|
6 |
PYLINT ?= pylint |
|
7 |
TESTS ?= |
|
8 |
DESTDIR ?= |
|
9 |
||
10 |
all:: build |
|
11 |
||
12 |
build:: |
|
13 |
$(SETUP) build |
|
14 |
||
15 |
install:: |
|
16 |
ifneq ($(DESTDIR),)
|
|
17 |
$(SETUP) install --root "$(DESTDIR)" |
|
18 |
else
|
|
19 |
$(SETUP) install |
|
20 |
endif
|
|
21 |
||
22 |
clean:: |
|
23 |
$(SETUP) clean |
|
24 |
||
25 |
check:: |
|
26 |
BZR_PLUGINS_AT=stats@$(shell pwd) $(DEBUGGER) $(PYTHON) $(BZR) $(BZR_OPTIONS) selftest $(TEST_OPTIONS) --starting-with=bzrlib.plugins.stats $(TESTS) |
|
27 |
||
28 |
check-verbose:: |
|
29 |
$(MAKE) check TEST_OPTIONS=-v |
|
30 |
||
31 |
coverage:: |
|
32 |
$(MAKE) check BZR_OPTIONS="--coverage coverage" |
|
33 |
||
34 |
check-one:: |
|
35 |
$(MAKE) check TEST_OPTIONS=--one |
|
36 |
||
37 |
show-plugins:: |
|
38 |
BZR_PLUGINS_AT=stats@$(shell pwd) $(BZR) plugins -v |
|
39 |
||
40 |
lint:: |
|
41 |
$(PYLINT) -f parseable *.py */*.py |
|
42 |
||
43 |
tags:: |
|
44 |
$(CTAGS) -R . |
|
45 |
||
46 |
ctags:: tags |
|
47 |
||
48 |
||
49 |
||
50 |
.PHONY: update-pot po/bzr-stats.pot |
|
51 |
update-pot: po/bzr-stats.pot |
|
52 |
||
53 |
TRANSLATABLE_PYFILES:=$(shell find . -name '*.py' \ |
|
54 |
| grep -v 'tests/' \ |
|
55 |
) |
|
56 |
||
57 |
po/bzr-stats.pot: $(PYFILES) $(DOCFILES) |
|
58 |
BZR_PLUGINS_AT=stats@$(shell pwd) bzr export-pot \ |
|
59 |
--plugin=stats > po/bzr-stats.pot |
|
60 |
echo $(TRANSLATABLE_PYFILES) | xargs \ |
|
61 |
xgettext --package-name "bzr-stats" \ |
|
62 |
--msgid-bugs-address "<bazaar@lists.canonical.com>" \ |
|
63 |
--copyright-holder "Bazaar Developers <bazaar@lists.canonical.com>" \ |
|
64 |
--from-code ISO-8859-1 --sort-by-file --join --add-comments=i18n: \ |
|
65 |
-d bzr-stats -p po -o bzr-stats.pot |