test-lib: Use "$GIT_BUILD_DIR" instead of "$TEST_DIRECTORY"/../
[gitweb.git] / Makefile
index 0de4c6ed5e114e4b891254c3e78ce2898fb92178..194c26fc5ed09af7f8cf2bc0a2b6a2b959d299e2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -308,6 +308,7 @@ TCL_PATH = tclsh
 TCLTK_PATH = wish
 PTHREAD_LIBS = -lpthread
 PTHREAD_CFLAGS =
+GCOV = gcov
 
 export TCL_PATH TCLTK_PATH
 
@@ -2299,6 +2300,7 @@ coverage-clean:
        $(RM) $(addsuffix *.gcno,$(object_dirs))
        $(RM) coverage-untested-functions
        $(RM) -r cover_db/
+       $(RM) -r cover_db_html/
 
 COVERAGE_CFLAGS = $(CFLAGS) -O0 -ftest-coverage -fprofile-arcs
 COVERAGE_LDFLAGS = $(CFLAGS)  -O0 -lgcov
@@ -2311,7 +2313,7 @@ coverage-build: coverage-clean
 
 coverage-report:
        $(QUIET_GCOV)for dir in $(object_dirs); do \
-               gcov $(GCOVFLAGS) --object-directory=$$dir $$dir*.c || exit; \
+               $(GCOV) $(GCOVFLAGS) --object-directory=$$dir $$dir*.c || exit; \
        done
 
 coverage-untested-functions: coverage-report
@@ -2321,3 +2323,6 @@ coverage-untested-functions: coverage-report
 
 cover_db: coverage-report
        gcov2perl -db cover_db *.gcov
+
+cover_db_html: cover_db
+       cover -report html -outputdir cover_db_html cover_db