ctdb-scripts: Quote some variable expansions
[nivanova/samba-autobuild/.git] / Makefile
1 # simple makefile wrapper to run waf
2
3 PYTHON?=python
4 WAF_BINARY=$(PYTHON) ./buildtools/bin/waf
5 WAF=WAF_MAKE=1 $(WAF_BINARY)
6
7 all:
8         $(WAF) build
9
10 install:
11         $(WAF) install
12
13 uninstall:
14         $(WAF) uninstall
15
16 test:
17         $(WAF) test $(TEST_OPTIONS)
18
19 help:
20         @echo NOTE: to run extended waf options use $(WAF_BINARY) or modify your PATH
21         $(WAF) --help
22
23 subunit-test:
24         $(WAF) test --filtered-subunit $(TEST_OPTIONS)
25
26 testenv:
27         $(WAF) test --testenv $(TEST_OPTIONS)
28
29 gdbtestenv:
30         $(WAF) test --testenv --gdbtest $(TEST_OPTIONS)
31
32 quicktest:
33         $(WAF) test --quick $(TEST_OPTIONS)
34
35 randomized-test:
36         $(WAF) test --random-order $(TEST_OPTIONS)
37
38 testlist:
39         $(WAF) test --list $(TEST_OPTIONS)
40
41 dist:
42         touch .tmplock
43         WAFLOCK=.tmplock $(WAF) dist
44
45 distcheck:
46         touch .tmplock
47         WAFLOCK=.tmplock $(WAF) distcheck
48
49 clean:
50         $(WAF) clean
51
52 distclean:
53         $(WAF) distclean
54
55 reconfigure: configure
56         $(WAF) reconfigure
57
58 show_waf_options:
59         $(WAF) --help
60
61 # some compatibility make targets
62 everything: all
63
64 testsuite: all
65
66 check: test
67
68 torture: all
69
70 # this should do an install as well, once install is finished
71 installcheck: test
72
73 etags:
74         $(WAF) etags
75
76 ctags:
77         $(WAF) ctags
78
79 pydoctor:
80         $(WAF) pydoctor
81
82 pep8:
83         $(WAF) pep8
84
85 # Adding force on the depencies will force the target to be always rebuild form the Make
86 # point of view forcing make to invoke waf
87
88 bin/smbd: FORCE
89         $(WAF) --targets=smbd/smbd
90
91 bin/winbindd: FORCE
92         $(WAF) --targets=winbindd/winbindd
93
94 bin/nmbd: FORCE
95         $(WAF) --targets=nmbd/nmbd
96
97 bin/smbclient: FORCE
98         $(WAF) --targets=client/smbclient
99
100 # this allows for things like "make bin/smbtorture"
101 # mainly for the binary that don't have a broken mode like smbd that must
102 # be build with smbd/smbd
103 bin/%: FORCE
104         $(WAF) --targets=$(subst bin/,,$@)
105
106 # Catch all rule to be able to call make service_repl in order to find the name
107 # of the submodule you want to build, look at the wscript
108 %:
109         $(WAF) --targets=$@
110
111 # This rule has to be the last one
112 FORCE:
113 # Having .NOTPARALLEL will force make to do target once at a time but still -j
114 # will be present in the MAKEFLAGS that are in turn interpreted by WAF
115 # so only 1 waf at a time will be called but it will still be able to do parralel builds if
116 # instructed to do so
117 .NOTPARALLEL: %
118 .PHONY: FORCE everything testsuite check torture