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