File: coverage.mk

package info (click to toggle)
libcmis 0.5.1%2Bgit20160603-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 3,088 kB
  • ctags: 2,704
  • sloc: cpp: 23,427; xml: 4,499; makefile: 486; sh: 216; ansic: 111
file content (22 lines) | stat: -rw-r--r-- 738 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.PHONY: coverage genlcov coverage-clean

coverage:
	-$(MAKE) $(AM_MAKEFLAGS) -k check
	$(MAKE) $(AM_MAKEFLAGS) genlcov

infos = libcmis-lcov.info libcmis-c-lcov.info
$(infos): %-lcov.info:
	$(LCOV) --directory $(top_builddir)/src/$* \
		    --base-directory $(top_builddir)/src/$* \
			--capture \
			--output-file $@ \
			--no-external \
		   	--compat-libtool
genlcov: $(infos)
	LANG=C $(GENHTML) --output-directory libcmis-lcov --title "Libcmis Code Coverage" --legend --show-details $^
	@echo "file://$(abs_top_builddir)/libcmis-lcov/index.html"

coverage-clean:
	-$(LCOV) --directory $(top_builddir) -z
	-rm -rf $(infos) libcmis-lcov
	-find $(top_builddir) -type f -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" -exec rm "{}" \;