summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: aa532b65bb44df0beed44f03b3655dc7b7663501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# simple makefile wrapper to run waf

PYTHON?=python
WAF_BINARY=$(PYTHON) ./buildtools/bin/waf
WAF=WAF_MAKE=1 $(WAF_BINARY)

all:
	$(WAF) build

install:
	$(WAF) install

uninstall:
	$(WAF) uninstall

test:
	$(WAF) test $(TEST_OPTIONS)

help:
	@echo NOTE: to run extended waf options use $(WAF_BINARY) or modify your PATH
	$(WAF) --help

subunit-test:
	$(WAF) test --filtered-subunit $(TEST_OPTIONS)

testenv:
	$(WAF) test --testenv $(TEST_OPTIONS)

gdbtestenv:
	$(WAF) test --testenv --gdbtest $(TEST_OPTIONS)

quicktest:
	$(WAF) test --quick $(TEST_OPTIONS)

randomized-test:
	$(WAF) test --random-order $(TEST_OPTIONS)

dist:
	touch .tmplock
	WAFLOCK=.tmplock $(WAF) dist

distcheck:
	touch .tmplock
	WAFLOCK=.tmplock $(WAF) distcheck

clean:
	$(WAF) clean

distclean:
	$(WAF) distclean

reconfigure: configure
	$(WAF) reconfigure

show_waf_options:
	$(WAF) --help

# some compatibility make targets
everything: all

testsuite: all

check: test

torture: all

# this should do an install as well, once install is finished
installcheck: test

etags:
	$(WAF) etags

ctags:
	$(WAF) ctags

pydoctor:
	$(WAF) pydoctor

pep8:
	$(WAF) pep8

# Adding force on the depencies will force the target to be always rebuild form the Make
# point of view forcing make to invoke waf

bin/smbd: FORCE
	$(WAF) --targets=smbd/smbd

bin/winbindd: FORCE
	$(WAF) --targets=winbindd/winbindd

bin/nmbd: FORCE
	$(WAF) --targets=nmbd/nmbd

bin/smbclient: FORCE
	$(WAF) --targets=client/smbclient

# this allows for things like "make bin/smbtorture"
# mainly for the binary that don't have a broken mode like smbd that must
# be build with smbd/smbd
bin/%: FORCE
	$(WAF) --targets=$(subst bin/,,$@)

# Catch all rule to be able to call make service_repl in order to find the name
# of the submodule you want to build, look at the wscript
%:
	$(WAF) --targets=$@

# This rule has to be the last one
FORCE:
# Having .NOTPARALLEL will force make to do target once at a time but still -j
# will be present in the MAKEFLAGS that are in turn interpreted by WAF
# so only 1 waf at a time will be called but it will still be able to do parralel builds if
# instructed to do so
.NOTPARALLEL: %
.PHONY: FORCE everything testsuite check torture