aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2012-02-14 19:29:13 +0100
committerSebastien Bacher <seb128@ubuntu.com>2012-02-14 19:29:13 +0100
commit302256286a5e443a67592b7addd02c0633531cfc (patch)
tree1623ee0440ce55bbfe49ea420363dd32d1833522 /Makefile.am
parentc157f744805b87d39eb49ee162645d9af25b05b5 (diff)
parentbd884a0a4b3a64c2f8d6757a0598993ee9297eef (diff)
downloadayatana-indicator-sound-302256286a5e443a67592b7addd02c0633531cfc.tar.gz
ayatana-indicator-sound-302256286a5e443a67592b7addd02c0633531cfc.tar.bz2
ayatana-indicator-sound-302256286a5e443a67592b7addd02c0633531cfc.zip
Import upstream version 0.8.1.0
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am35
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 1742c47..b523736 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,3 +11,38 @@ EXTRA_DIST = \
DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall
+
+# Coverage targets
+
+.PHONY: 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
+ -$(MAKE) $(AM_MAKEFLAGS) -k check
+ $(MAKE) $(AM_MAKEFLAGS) 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
+ -$(LCOV) --directory $(top_builddir) -z
+ -rm -rf coverage.info coveragereport
+
+.PHONY: coverage-xml generate-coverage-xml clean-coverage-xml
+coverage-xml: clean-gcda
+ -$(MAKE) $(AM_MAKEFLAGS) -k check
+ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-xml
+
+generate-coverage-xml:
+ @echo Generating coverage XML report
+ $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml
+
+clean-coverage-xml: clean-gcda
+ -rm -rf $(top_builddir)/coverage.xml
+
+clean-local: clean-coverage-html clean-coverage-xml