Re: [PATCH v2 4/7] Makefile: Add coverage-report-cover-db target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ævar Arnfjörð Bjarmason wrote:

> +++ b/Makefile
> @@ -2303,3 +2303,7 @@ coverage-untested-functions: coverage-report
>  	grep '^function.*called 0 ' *.c.gcov \
>  		| sed -e 's/\([^:]*\)\.gcov: *function \([^ ]*\) called.*/\1: \2/' \
>  		| tee coverage-untested-functions
> +
> +coverage-report-cover-db: coverage-report
> +	gcov2perl -db cover_db *.gcov
> +
> -- 

nitpick: trailing newline.

This target is not included in .PHONY and it does not seem to be
phony after all, anyway.  Why not use something like the following?

 cover_db: coverage-report
	gcov2perl...

It seems more intuitive to me, and once the makefile learns to track
how long a coverage-report remains valid it would allow avoiding a
rebuild of the cover_db.

diff --git i/Makefile w/Makefile
index f2c680d..c59740c 100644
--- i/Makefile
+++ w/Makefile
@@ -2282,6 +2282,7 @@ coverage:
 
 object_dirs := $(sort $(dir $(OBJECTS)))
 coverage-clean:
+	$(RM) cover_db
 	$(RM) $(addsuffix *.gcov,$(object_dirs))
 	$(RM) $(addsuffix *.gcda,$(object_dirs))
 	$(RM) $(addsuffix *.gcno,$(object_dirs))
@@ -2304,6 +2305,5 @@ coverage-untested-functions: coverage-report
 		| sed -e 's/\([^:]*\)\.gcov: *function \([^ ]*\) called.*/\1: \2/' \
 		| tee coverage-untested-functions
 
-coverage-report-cover-db: coverage-report
+cover_db: coverage-report
 	gcov2perl -db cover_db *.gcov
-
-- 
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]