]> git.ipfire.org Git - people/ms/strongswan.git/blob - Makefile.am
Add --enable-coverage configure option
[people/ms/strongswan.git] / Makefile.am
1 SUBDIRS = src man init testing
2
3 if USE_SCRIPTS
4 SUBDIRS += scripts
5 endif
6
7 if USE_SILENT_RULES
8 AM_MAKEFLAGS = -s
9 endif
10
11 ACLOCAL_AMFLAGS = -I m4/config
12
13 EXTRA_DIST = Doxyfile.in LICENSE Android.common.mk.in Android.common.mk Android.mk
14 CLEANFILES = Doxyfile
15 BUILT_SOURCES = Android.common.mk
16 MAINTAINERCLEANFILES = Android.common.mk
17
18 if USE_DEV_HEADERS
19 config_includedir = $(ipseclibdir)/include
20 nodist_config_include_HEADERS = config.h
21 endif
22
23 Android.common.mk : Android.common.mk.in configure.in
24 $(AM_V_GEN) \
25 sed \
26 -e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
27 $(srcdir)/$@.in > $@
28
29 Doxyfile : Doxyfile.in
30 $(AM_V_GEN) \
31 sed \
32 -e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
33 -e "s:\@PACKAGE_NAME\@:$(PACKAGE_NAME):" \
34 -e "s:\@SRC_DIR\@:$(srcdir):" \
35 $(srcdir)/$@.in > $@
36
37 apidoc : Doxyfile
38 doxygen
39
40 if COVERAGE
41 cov-reset:
42 @rm -rf $(top_builddir)/coverage
43 @find $(top_builddir) -name "*.gcda" -delete
44 @lcov --zerocounters --directory $(top_builddir)
45
46 cov-report:
47 @mkdir $(top_builddir)/coverage
48 lcov -c -o $(top_builddir)/coverage/coverage.info -d $(top_builddir)
49 genhtml --num-spaces 4 --legend \
50 -t "$(PACKAGE_STRING)" \
51 -o $(top_builddir)/coverage/html \
52 -p `readlink -m $(abs_top_srcdir)`/src \
53 $(top_builddir)/coverage/coverage.info
54 @echo "Coverage Report at $(top_builddir)/coverage/html" >&2
55
56 coverage:
57 @$(MAKE) cov-reset
58 @$(MAKE) check
59 @$(MAKE) cov-report
60 else
61 cov-reset:
62
63 coverage:
64 @echo "reconfigure with --enable-coverage"
65 endif
66
67 clean-local:
68 @$(MAKE) cov-reset
69 rm -rf apidoc