aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am5
-rw-r--r--Makefile.am.coverage25
2 files changed, 15 insertions, 15 deletions
diff --git a/Makefile.am b/Makefile.am
index 1e8aa57..6d4e4ee 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,10 +4,6 @@ SUBDIRS = \
data \
po
-if BUILD_TESTS
-SUBDIRS += test
-endif
-
DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall --enable-deprecations
dist-hook:
@@ -36,4 +32,5 @@ dist-hook:
echo Failed to generate AUTHORS: not a branch >&2; \
fi
+
include $(top_srcdir)/Makefile.am.coverage
diff --git a/Makefile.am.coverage b/Makefile.am.coverage
index b0a2f8c..9c59b95 100644
--- a/Makefile.am.coverage
+++ b/Makefile.am.coverage
@@ -1,39 +1,42 @@
# Coverage targets
+.PHONY: clean-gcda \
+ coverage-html generate-coverage-html clean-coverage-html \
+ coverage-gcovr generate-coverage-gcovr clean-coverage-gcovr
+
+clean-local: clean-coverage-html clean-coverage-gcovr
+
if HAVE_GCOV
- .PHONY: clean-gcda
- clean-gcda:
+clean-gcda:
@echo Removing old coverage results
-find -name '*.gcda' -print | xargs -r rm
- .PHONY: coverage-html generate-coverage-html clean-coverage-html
- coverage-html: clean-gcda
+coverage-html: clean-gcda
-$(MAKE) $(AM_MAKEFLAGS) -k check
$(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
- generate-coverage-html:
+generate-coverage-html:
@echo Collecting coverage data
$(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info
- clean-coverage-html: clean-gcda
+clean-coverage-html: clean-gcda
-$(LCOV) --directory $(top_builddir) -z
-rm -rf coverage.info coveragereport
-
+
if HAVE_GCOVR
- .PHONY: coverage-gcovr generate-coverage-gcovr clean-coverage-gcovr
- coverage-gcovr: clean-gcda
+coverage-gcovr: clean-gcda
-$(MAKE) $(AM_MAKEFLAGS) -k check
$(MAKE) $(AM_MAKEFLAGS) generate-coverage-gcovr
- generate-coverage-gcovr:
+generate-coverage-gcovr:
@echo Generating coverage GCOVR report
$(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.gcovr
- clean-coverage-gcovr: clean-gcda
+clean-coverage-gcovr: clean-gcda
-rm -rf $(top_builddir)/coverage.gcovr
endif # HAVE_GCOVR