summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2009-09-26 21:58:39 +0200
committerJürg Billeter <j@bitron.ch>2009-09-26 23:19:36 +0200
commit331d4e8d2927eb912edd9b286568376149f60322 (patch)
tree48b7faf0bb769bdbde36318eea87caacc4a6c68b /Makefile.am
parent4d4176547022421e24fda56041862bdf129dbd3c (diff)
downloadvala-331d4e8d2927eb912edd9b286568376149f60322.tar.gz
Add support for coverage analysis using gcov and lcov
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index e603ea9c8..0dfaa2061 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,10 +36,30 @@ DIST_SUBDIRS = \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = vala-1.0.pc
+.PHONY: bootstrap
+bootstrap: all
+ find $(top_srcdir) -name "*.vala.stamp" | xargs rm -f
+ $(MAKE) $(AM_MAKEFLAGS) all VALAC=$(abs_top_builddir)/compiler/valac
+
.PHONY: test
test:
cd tests && $(MAKE) $(AM_MAKEFLAGS) check
+#if ENABLE_COVERAGE
+.PHONY: coverage coverage-report
+coverage:
+ find $(top_srcdir) -name "*.gcda" | xargs rm -f
+ $(MAKE) $(AM_MAKEFLAGS) bootstrap
+ $(MAKE) $(AM_MAKEFLAGS) test
+
+coverage-report: coverage
+ lcov --directory $(top_srcdir) --capture --output-file $(top_builddir)/lcov.info
+ lcov --directory $(top_srcdir) --output-file $(top_builddir)/lcov.info --remove $(top_builddir)/lcov.info "*.c" "*.h" "*.vapi"
+ rm -r $(top_builddir)/coverage
+ $(mkdir_p) $(top_builddir)/coverage
+ genhtml --title "@PACKAGE_STRING@" --output-directory $(top_builddir)/coverage $(top_builddir)/lcov.info
+#endif
+
dist-hook: gen-ChangeLog
gen_start_date = 2009-02-25