summaryrefslogtreecommitdiff
path: root/tools/lcov.am
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lcov.am')
-rw-r--r--tools/lcov.am25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/lcov.am b/tools/lcov.am
new file mode 100644
index 00000000..1455f834
--- /dev/null
+++ b/tools/lcov.am
@@ -0,0 +1,25 @@
+lcov-reset:
+ lcov --directory @top_srcdir@ --zerocounters
+
+lcov-report:
+ lcov --directory @top_srcdir@ --capture \
+ --output-file @top_builddir@/lcov.info.tmp
+ lcov --directory @top_srcdir@ --output-file @top_builddir@/lcov.info \
+ --remove @top_builddir@/lcov.info.tmp \
+ 'doc/reference/*/*-scan.c'
+ rm @top_builddir@/lcov.info.tmp
+ $(mkdir_p) @top_builddir@/lcov.html
+ git_commit=`GIT_DIR=@top_srcdir@/.git git log -1 --pretty=format:%h 2>/dev/null`;\
+ genhtml --title "@PACKAGE_STRING@ $$git_commit" \
+ --output-directory @top_builddir@/lcov.html lcov.info
+ @echo
+ @echo 'lcov report can be found in:'
+ @echo 'file://@abs_top_builddir@/lcov.html/index.html'
+ @echo
+
+lcov-check:
+ $(MAKE) lcov-reset
+ $(MAKE) check
+ $(MAKE) lcov-report
+
+## vim:set ft=automake: