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