Move dnspython to third_party.
[bbaumbach/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 dist:
36         touch .tmplock
37         WAFLOCK=.tmplock $(WAF) dist
38
39 distcheck:
40         touch .tmplock
41         WAFLOCK=.tmplock $(WAF) distcheck
42
43 clean:
44         $(WAF) clean
45
46 distclean:
47         $(WAF) distclean
48
49 reconfigure: configure
50         $(WAF) reconfigure
51
52 show_waf_options:
53         $(WAF) --help
54
55 # some compatibility make targets
56 everything: all
57
58 testsuite: all
59
60 check: test
61
62 torture: all
63
64 # this should do an install as well, once install is finished
65 installcheck: test
66
67 etags:
68         $(WAF) etags
69
70 ctags:
71         $(WAF) ctags
72
73 pydoctor:
74         $(WAF) pydoctor
75
76 pep8:
77         $(WAF) pep8
78
79 # Adding force on the depencies will force the target to be always rebuild form the Make
80 # point of view forcing make to invoke waf
81
82 bin/smbd: FORCE
83         $(WAF) --targets=smbd/smbd
84
85 bin/winbindd: FORCE
86         $(WAF) --targets=winbindd/winbindd
87
88 bin/nmbd: FORCE
89         $(WAF) --targets=nmbd/nmbd
90
91 bin/smbclient: FORCE
92         $(WAF) --targets=client/smbclient
93
94 # this allows for things like "make bin/smbtorture"
95 # mainly for the binary that don't have a broken mode like smbd that must
96 # be build with smbd/smbd
97 bin/%: FORCE
98         $(WAF) --targets=$(subst bin/,,$@)
99
100 # Catch all rule to be able to call make service_repl in order to find the name
101 # of the submodule you want to build, look at the wscript
102 %:
103         $(WAF) --targets=$@
104
105 # This rule has to be the last one
106 FORCE:
107 # Having .NOTPARALLEL will force make to do target once at a time but still -j
108 # will be present in the MAKEFLAGS that are in turn interpreted by WAF
109 # so only 1 waf at a time will be called but it will still be able to do parralel builds if
110 # instructed to do so
111 .NOTPARALLEL: %
112 .PHONY: FORCE everything testsuite check torture