aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-01-24 10:07:33 -0600
committerTed Gould <ted@gould.cx>2012-01-24 10:07:33 -0600
commite81d0ecfe1899acc60fb50a5fbc03823a132139d (patch)
tree5cc88f8d0aaca8690e7323fad06448fb6bf2403f /Makefile.am
parente36cd22ea84365df4797fc2588fe639ffda4daf6 (diff)
parentdbccdd5fd7c0850af8ffd411f906dc43785e599b (diff)
downloadlibayatana-indicator-e81d0ecfe1899acc60fb50a5fbc03823a132139d.tar.gz
libayatana-indicator-e81d0ecfe1899acc60fb50a5fbc03823a132139d.tar.bz2
libayatana-indicator-e81d0ecfe1899acc60fb50a5fbc03823a132139d.zip
Import upstream version 0.4.90
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am45
1 files changed, 42 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 3bd312e..182cb2d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,13 +2,17 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
SUBDIRS = \
libindicator \
- tests \
tools
-tests: libindicator
-
tools: libindicator
+if WANT_TESTS
+SUBDIRS += \
+ tests
+
+tests: libindicator
+endif
+
DISTCHECK_CONFIGURE_FLAGS = --disable-deprecations
DISTCLEANFILES = \
@@ -40,3 +44,38 @@ dist-hook:
echo Failed to generate AUTHORS: not a branch >&2; \
fi
+
+# 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