1 #----------------------------------------------------------------------
3 #----------------------------------------------------------------------
4 CONCURRENCY_LEVEL ?= $(shell grep process /proc/cpuinfo | wc -l)
7 SCONS_ARGS += "final="$(final)
10 SCONS_ARGS += "debug="$(debug)
13 SCONS_ARGS += "profile="$(profile)
16 SCONS=scons -j $(CONCURRENCY_LEVEL) $(SCONS_ARGS)
25 find ./ -name \*.gcno | xargs rm -f
26 find ./ -name \*.gcda | xargs rm -f
27 find ./ -name \*.gcov | xargs rm -f
28 rm -f test_coverage.info
29 rm -rf /doc/test_coverage
31 all_docs all_tests all:
41 #----------------------------------------------------------------------
43 #----------------------------------------------------------------------
45 $(SCONS) debug=1 EXTRA_CCFLAGS="-fprofile-arcs -ftest-coverage" EXTRA_LIBS="gcov" all_tests
46 ln -s ../../boost/ include/senf/ # ugly work-around
47 lcov --directory . --capture --output-file /tmp/test_coverage.info --base-directory .
48 # lcov --output-file /tmp/test_coverage.info.tmp --extract test_coverage.info \*/senf/\*
49 lcov --output-file test_coverage.info --remove /tmp/test_coverage.info \*/include/\*
50 genhtml --output-directory doc/test_coverage --title "all_tests" test_coverage.info
51 rm /tmp/test_coverage.info
54 #----------------------------------------------------------------------
56 #----------------------------------------------------------------------
60 #----------------------------------------------------------------------
61 # Building SENF requires some debian packages
62 #----------------------------------------------------------------------
63 DEB_BASE = build-essential
65 # This line parses the 'Build-Depends' entry from debian/control
66 DEB_SENF = $(shell perl -an -F'[:,]' -e ' \
69 map {s/\(.*\)//} @F; \
71 if (/^Build-Depends:/) { print @F[1..$$\#F]; $$P=1 }' \
72 debian/control | xargs echo)
75 aptitude install $(DEB_BASE) $(DEB_SENF)