Skip to content

Commit

Permalink
build: add Makefile target for code coverage via gcov
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Nov 10, 2016
1 parent 8ad7c35 commit df10c24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ README.html
*.swo
*.swp
*.o
*.gcov
*.gcda
*.gcno
/vis
/vis-menu
/dependency
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

0 comments on commit df10c24

Please sign in to comment.