aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2020-04-15 08:36:59 +1000
committerSteve Bennett <steveb@workware.net.au>2020-04-17 17:36:50 +1000
commitb3064200cd20bcbc34ed66f3b0f51929f9751189 (patch)
tree77c28c9e9903eb32cdac6dadcb0199016b5adf45 /Makefile.in
parent67703c4ea7b0ae290818d79beeacf931b08ea37e (diff)
downloadjimtcl-b3064200cd20bcbc34ed66f3b0f51929f9751189.zip
jimtcl-b3064200cd20bcbc34ed66f3b0f51929f9751189.tar.gz
jimtcl-b3064200cd20bcbc34ed66f3b0f51929f9751189.tar.bz2
build: Add ./configure --coverage
To make it easier to generate code coverage output. Ensure that gcovr is installed, then do: ./configure --coverage make test coverage And see the report in coverage.html Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index 67d503c..b299c1a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -182,8 +182,22 @@ Tcl.html: jim_tcl.txt @srcdir@/make-index
@echo "asciidoc is not available"; false
@endif
+coverage:
+@if COVERAGE
+@if GCOVR
+ @GCOVR@ -s -e 'conftest*' --html --html-details --output coverage.html
+@else
+ gcov @srcdir@/*.c
+@endif
+@else
+ @echo "Use ./configure --coverage to enable code coverage"
+@endif
+
clean:
rm -f *.o *.so *.dll *.exe lib*.a $(JIMSH) $(LIBJIM) Tcl.html _*.c
+@if COVERAGE
+ rm -f *.gcno *.gcov *.gcda coverage*.html
+@endif
distclean: clean
rm -f jimautoconf.h jim-config.h Makefile config.log @srcdir@/autosetup/jimsh0@EXEEXT@ build-jim-ext