From df10c24e9a28821744dcda454519612dee22fd7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 10 Nov 2016 12:45:39 +0100 Subject: build: add Makefile target for code coverage via gcov --- .gitignore | 3 +++ Makefile | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bc25dcb..7537446 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ README.html *.swo *.swp *.o +*.gcov +*.gcda +*.gcno /vis /vis-menu /dependency diff --git a/Makefile b/Makefile index 586667a..e221b67 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,9 @@ debug: clean profile: clean @$(MAKE) CFLAGS_DEBUG='${CFLAGS_DEBUG_ENABLE} -pg' +coverage: clean + @$(MAKE) CFLAGS_DEBUG='--coverage' + test-update: git submodule init git submodule update --remote --rebase @@ -68,7 +71,7 @@ test: clean: @echo cleaning - @rm -f vis vis-menu vis-${VERSION}.tar.gz + @rm -f vis vis-menu vis-${VERSION}.tar.gz *.gcov *.gcda *.gcno dist: clean @echo creating dist tarball @@ -116,4 +119,4 @@ uninstall: @echo removing support files from ${DESTDIR}${SHAREPREFIX}/vis @rm -rf ${DESTDIR}${SHAREPREFIX}/vis -.PHONY: all clean dist install uninstall debug profile test test-update +.PHONY: all clean dist install uninstall debug profile coverage test test-update -- cgit v1.2.3