lcov-reset:
	lcov --directory @top_srcdir@ --zerocounters
	find @top_srcdir@ -name '*.gcda' -exec rm -f '{}' ';'

lcov-report:
	lcov --directory @top_srcdir@ --capture \
		--output-file @top_builddir@/lcov.info
	$(mkdir_p) @top_builddir@/lcov.html
	genhtml --title @PACKAGE@ \
		--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:
