summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2013-08-25 15:37:27 +0200
committerYves-Alexis Perez <corsac@debian.org>2013-08-25 15:37:27 +0200
commitc7307e752d8f47c68f834e22ee2ce0a14a70e695 (patch)
treefbb442a20ab54aad511b46a070e65b8d09c22791 /Makefile.am
parentf74c6d77c3efb529e7403eeef0613c061eb895b3 (diff)
parent6b99c8d9cff7b3e8ae8f3204b99e7ea40f791349 (diff)
downloadvyos-strongswan-c7307e752d8f47c68f834e22ee2ce0a14a70e695.tar.gz
vyos-strongswan-c7307e752d8f47c68f834e22ee2ce0a14a70e695.zip
Merge tag 'upstream/5.1.0'
Upstream version 5.1.0
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am44
1 files changed, 41 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 8a558c150..0e08794c1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,6 +4,10 @@ if USE_SCRIPTS
SUBDIRS += scripts
endif
+if USE_SILENT_RULES
+ AM_MAKEFLAGS = -s
+endif
+
ACLOCAL_AMFLAGS = -I m4/config
EXTRA_DIST = Doxyfile.in LICENSE Android.common.mk.in Android.common.mk Android.mk
@@ -16,12 +20,14 @@ config_includedir = $(ipseclibdir)/include
nodist_config_include_HEADERS = config.h
endif
-Android.common.mk : Android.common.mk.in configure.in
+Android.common.mk : Android.common.mk.in configure.ac
+ $(AM_V_GEN) \
sed \
-e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
$(srcdir)/$@.in > $@
Doxyfile : Doxyfile.in
+ $(AM_V_GEN) \
sed \
-e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
-e "s:\@PACKAGE_NAME\@:$(PACKAGE_NAME):" \
@@ -31,5 +37,37 @@ Doxyfile : Doxyfile.in
apidoc : Doxyfile
doxygen
-clean-local:
- rm -rf apidoc
+cov-reset-common:
+ @rm -rf $(top_builddir)/coverage
+ @find $(top_builddir)/{src,scripts} -name "*.gcda" -delete
+
+if COVERAGE
+cov-reset: cov-reset-common
+ @lcov --zerocounters --directory $(top_builddir)
+
+cov-report:
+ @mkdir $(top_builddir)/coverage
+ lcov -c -o $(top_builddir)/coverage/coverage.info -d $(top_builddir)
+ lcov -r $(top_builddir)/coverage/coverage.info '*/tests/*' \
+ -o $(top_builddir)/coverage/coverage.cleaned.info
+ genhtml --num-spaces 4 --legend \
+ -t "$(PACKAGE_STRING)" \
+ -o $(top_builddir)/coverage/html \
+ -p `readlink -m $(abs_top_srcdir)`/src \
+ $(top_builddir)/coverage/coverage.cleaned.info
+ @echo "Coverage Report at $(top_builddir)/coverage/html" >&2
+
+coverage:
+ @$(MAKE) cov-reset
+ @$(MAKE) check
+ @$(MAKE) cov-report
+else
+coverage:
+ @echo "reconfigure with --enable-coverage"
+endif
+
+clean-local: cov-reset-common
+ @find $(top_builddir)/{src,scripts} -name "*.gcno" -delete
+ @rm -rf apidoc
+
+.PHONY: cov-reset-common cov-reset cov-report coverage