1 #----------------------------------------------------------------------
3 #----------------------------------------------------------------------
8 SCONS_ARGS += "final="$(final)
11 SCONS_ARGS += "debug="$(debug)
14 SCONS_ARGS += "profile="$(profile)
17 SCONS=scons -j $(CONCURRENCY_LEVEL) $(SCONS_ARGS)
26 find ./ -name \*.gcno | xargs rm -f
27 find ./ -name \*.gcda | xargs rm -f
28 find ./ -name \*.gcov | xargs rm -f
29 rm -f test_coverage.info
30 rm -rf /doc/test_coverage
32 all_docs all_tests all:
42 #----------------------------------------------------------------------
44 #----------------------------------------------------------------------
46 $(SCONS) debug=1 EXTRA_CCFLAGS="-fprofile-arcs -ftest-coverage" EXTRA_LIBS="gcov" all_tests
47 ln -s ../../boost/ include/senf/ # ugly work-around
48 lcov --directory . --capture --output-file test_coverage.info --base-directory .
50 lcov --output-file /tmp/test_coverage.info.tmp --extract test_coverage.info \*/senf/\*
51 lcov --output-file test_coverage.info --remove /tmp/test_coverage.info.tmp \*/senf/include/\*
52 rm /tmp/test_coverage.info.tmp
53 genhtml --output-directory doc/test_coverage --title "all_tests" test_coverage.info
55 #----------------------------------------------------------------------
57 #----------------------------------------------------------------------
61 #----------------------------------------------------------------------
62 # Building SENF requires some debian packages
63 #----------------------------------------------------------------------
64 DEB_BASE = build-essential
66 # This line parses the 'Build-Depends' entry from debian/control
67 DEB_SENF = $(shell perl -an -F'[:,]' -e ' \
70 map {s/\(.*\)//} @F; \
72 if (/^Build-Depends:/) { print @F[1..$$\#F]; $$P=1 }' \
73 debian/control | xargs echo)
76 aptitude install $(DEB_BASE) $(DEB_SENF)