Merge error improvements.
[jelmer/subvertpy.git] / Makefile
1 DEBUGGER ?= 
2 BZR ?= $(shell which bzr)
3 PYTHON ?= $(shell which python)
4 SETUP ?= ./setup.py
5 PYDOCTOR ?= pydoctor
6 CTAGS ?= ctags
7 PYLINT ?= pylint
8 RST2HTML ?= rst2html
9 TESTS ?= 
10
11 all:: build build-inplace README.html FAQ.html AUTHORS.html
12
13 build::
14         $(SETUP) build
15
16 build-inplace::
17         $(SETUP) build_ext --inplace
18
19 install::
20         $(SETUP) install
21
22 clean::
23         $(SETUP) clean
24         rm -f *.so
25
26 TMP_PLUGINS_DIR = $(shell pwd)/.plugins
27
28 $(TMP_PLUGINS_DIR):
29         mkdir -p $@
30
31 $(TMP_PLUGINS_DIR)/svn: $(TMP_PLUGINS_DIR)
32         ln -sf .. $@
33
34 check:: build-inplace $(TMP_PLUGINS_DIR)/svn 
35         BZR_PLUGIN_PATH=$(TMP_PLUGINS_DIR) $(DEBUGGER) $(PYTHON) $(PYTHON_OPTIONS) $(BZR) selftest $(TEST_OPTIONS) --starting-with=bzrlib.plugins.svn $(TESTS)
36
37 check-verbose::
38         $(MAKE) check TEST_OPTIONS=-v
39
40 check-one::
41         $(MAKE) check TEST_OPTIONS=--one
42
43 check-random::
44         $(MAKE) check TEST_OPTIONS="--random=now --verbose --one"
45
46 valgrind-check:: 
47         $(MAKE) check DEBUGGER="valgrind --suppressions=/usr/lib/valgrind/python.supp $(VALGRIND_OPTIONS)"
48
49 gdb-check::
50         $(MAKE) check DEBUGGER="gdb --args $(GDB_OPTIONS)"
51
52 show-plugins::
53         BZR_PLUGIN_PATH=$(TMP_PLUGINS_DIR) $(BZR) plugins
54
55 lint::
56         $(PYLINT) -f parseable *.py */*.py
57
58 pydoctor::
59         $(PYDOCTOR) --make-html -c bzr-svn.cfg
60
61 FAQ.html README.html AUTHORS.html: %.html: %
62         $(RST2HTML) $< > $@
63
64 tags::
65         $(CTAGS) -R .
66
67 ctags:: tags