bzr branch
http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
|
0.44.3
by Parth Malwankar
added Makefile |
1 |
# Copyright (C) 2010 Canonical Ltd
|
2 |
#
|
|
3 |
# This program is free software; you can redistribute it and/or modify
|
|
4 |
# it under the terms of the GNU General Public License as published by
|
|
5 |
# the Free Software Foundation; either version 2 of the License, or
|
|
6 |
# (at your option) any later version.
|
|
7 |
#
|
|
8 |
# This program is distributed in the hope that it will be useful,
|
|
9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11 |
# GNU General Public License for more details.
|
|
12 |
#
|
|
13 |
# You should have received a copy of the GNU General Public License
|
|
14 |
# along with this program; if not, write to the Free Software
|
|
15 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
16 |
||
17 |
# Makefile based on the Makefile from bzr-hg plugin
|
|
18 |
||
19 |
DEBUGGER ?= |
|
20 |
BZR ?= $(shell which bzr) |
|
21 |
PYTHON ?= $(shell which python) |
|
22 |
SETUP ?= ./setup.py |
|
23 |
PYDOCTOR ?= pydoctor |
|
24 |
CTAGS ?= ctags |
|
25 |
PYLINT ?= pylint |
|
26 |
RST2HTML ?= rst2html |
|
27 |
TESTS ?= bzrlib.plugins.grep |
|
28 |
TMP_PLUGINS_DIR = $(shell pwd)/.plugins |
|
29 |
||
30 |
||
31 |
all:: build |
|
32 |
||
33 |
build:: |
|
34 |
$(SETUP) build |
|
35 |
||
36 |
build-inplace:: |
|
37 |
||
38 |
install:: |
|
39 |
$(SETUP) install |
|
40 |
||
41 |
clean:: |
|
42 |
$(SETUP) clean |
|
43 |
rm -f *.so |
|
44 |
rm -rf $(TMP_PLUGINS_DIR) |
|
45 |
rm -rf build |
|
46 |
||
47 |
$(TMP_PLUGINS_DIR): |
|
48 |
mkdir -p $@ |
|
49 |
||
50 |
$(TMP_PLUGINS_DIR)/grep: $(TMP_PLUGINS_DIR) |
|
51 |
ln -sf .. $@ |
|
52 |
||
53 |
check:: build-inplace $(TMP_PLUGINS_DIR)/grep |
|
54 |
BZR_PLUGIN_PATH=$(TMP_PLUGINS_DIR) $(DEBUGGER) $(PYTHON) $(PYTHON_OPTIONS) $(BZR) $(BZR_OPTIONS) selftest $(TEST_OPTIONS) $(TESTS) |
|
55 |
||
56 |
check-verbose:: |
|
57 |
$(MAKE) check TEST_OPTIONS=-v |
|
58 |
||
59 |
check-one:: |
|
60 |
$(MAKE) check TEST_OPTIONS=--one |
|
61 |
||
62 |
check-random:: |
|
63 |
$(MAKE) check TEST_OPTIONS="--random=now --verbose --one" |
|
64 |
||
65 |
show-plugins:: |
|
66 |
BZR_PLUGIN_PATH=$(TMP_PLUGINS_DIR) $(BZR) plugins |
|
67 |
||
68 |
lint:: |
|
69 |
$(PYLINT) -f parseable *.py */*.py |
|
70 |
||
71 |
tags:: |
|
72 |
$(CTAGS) -R . |
|
73 |
||
74 |
ctags:: tags |
|
75 |
||
76 |
coverage:: |
|
77 |
$(MAKE) check BZR_OPTIONS="--coverage ,coverage" |
|
78 |