2011-02-03 05:08:37 +03:00
# simple makefile wrapper to run waf
2012-11-07 01:29:07 +04:00
WAF_BINARY = $( PYTHON) ./buildtools/bin/waf
2018-12-13 03:06:48 +03:00
WAF = PYTHONHASHSEED = 1 WAF_MAKE = 1 $( WAF_BINARY)
2011-02-03 05:08:37 +03:00
all :
$( WAF) build
install :
$( WAF) install
uninstall :
$( WAF) uninstall
test :
2011-11-09 06:08:37 +04:00
$( WAF) test $( TEST_OPTIONS)
2011-02-03 05:08:37 +03:00
2020-11-23 12:38:49 +03:00
testonly :
$( WAF) testonly $( TEST_OPTIONS)
2016-08-17 01:56:50 +03:00
perftest :
$( WAF) test --perf-test $( TEST_OPTIONS)
2011-02-03 05:08:37 +03:00
help :
@echo NOTE: to run extended waf options use $( WAF_BINARY) or modify your PATH
$( WAF) --help
subunit-test :
2011-11-09 06:08:37 +04:00
$( WAF) test --filtered-subunit $( TEST_OPTIONS)
2011-02-03 05:08:37 +03:00
testenv :
2011-11-09 06:08:37 +04:00
$( WAF) test --testenv $( TEST_OPTIONS)
2011-02-03 05:08:37 +03:00
2019-05-16 05:38:25 +03:00
lcov :
@echo usage:
@echo ""
@echo ./configure --enable-coverage
@echo make -j
@echo make test TESTS = mytest
@echo make lcov
@echo ""
rm -f lcov.info
lcov --capture --directory . --output-file lcov.info && \
genhtml lcov.info --output-directory public --prefix= $$ ( pwd ) && \
echo Please open public/index.html in browser to view the coverage report
2014-07-01 17:05:21 +04:00
gdbtestenv :
$( WAF) test --testenv --gdbtest $( TEST_OPTIONS)
2011-02-03 05:08:37 +03:00
quicktest :
2011-11-09 06:08:37 +04:00
$( WAF) test --quick $( TEST_OPTIONS)
2011-02-03 05:08:37 +03:00
2014-11-16 18:44:33 +03:00
randomized-test :
$( WAF) test --random-order $( TEST_OPTIONS)
2015-09-15 17:20:48 +03:00
testlist :
$( WAF) test --list $( TEST_OPTIONS)
2019-02-18 02:52:41 +03:00
test-nopython :
$( WAF) test --no-subunit-filter --test-list= selftest/no-python-tests.txt $( TEST_OPTIONS)
2011-02-03 05:08:37 +03:00
dist :
touch .tmplock
WAFLOCK = .tmplock $( WAF) dist
distcheck :
touch .tmplock
WAFLOCK = .tmplock $( WAF) distcheck
2013-09-13 03:11:34 +04:00
printversion :
touch .tmplock
WAFLOCK = .tmplock $( WAF) printversion
2011-02-03 05:08:37 +03:00
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
2011-12-09 01:14:55 +04:00
pep8 :
$( WAF) pep8
2014-09-26 10:32:50 +04:00
2023-08-21 05:23:25 +03:00
# Adding force on the dependencies will force the target to be always rebuilt from the Make
2014-09-26 10:32:50 +04:00
# 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
2023-08-21 05:23:25 +03:00
# be built with smbd/smbd
2014-09-26 10:32:50 +04:00
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 :
2023-08-21 05:23:25 +03:00
# Having .NOTPARALLEL will force make to do targets one at a time but still -j
2014-09-26 10:32:50 +04:00
# will be present in the MAKEFLAGS that are in turn interpreted by WAF
2023-04-06 16:43:10 +03:00
# so only 1 waf at a time will be called but it will still be able to do parallel builds if
2014-09-26 10:32:50 +04:00
# instructed to do so
.NOTPARALLEL : %
2014-09-26 20:34:26 +04:00
.PHONY : FORCE everything testsuite check torture