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 telepathy-glib-scan.c
	rm @top_builddir@/lcov.info.tmp
	$(mkdir_p) @top_builddir@/lcov.html
	genhtml --title telepathy-glib \
		--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: