Re: [PATCH v3] Makefile: add a prerequisite to the coverage-report target

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

 



Elia Pinto <gitter.spiros@xxxxxxxxx> writes:

> @@ -3421,13 +3422,18 @@ coverage-compile:
>  coverage-test: coverage-clean-results coverage-compile
>  	$(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \
>  		DEFAULT_TEST_TARGET=test -j1 test
> +	touch coverage-test.made
> +
> +coverage-test.made:
> +	@make coverage-test
> +	touch coverage-test.made

As this target runs "$(MAKE) coverage-test", at the end of which the
.made file is touched anyway, I wonder if we need the second line
here.

I just tried to run this sequence:

    $ make distclean
    $ make coverage-report
    $ make coverage-report
    $ make coverage-test

without the "touch" in the recipe for the coverage-test.made target,
and it behaved as I expected them to, i.e.

    * got an pristine tree
    * built, ran tests and showed report
    * showed report without building or running testing
    * cleared the gcov files, ran tests and showed report

So, perhaps this patch on top?

Thanks.

 Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git i/Makefile w/Makefile
index fa8cc86276..72ae7fa886 100644
--- i/Makefile
+++ w/Makefile
@@ -3416,8 +3416,7 @@ coverage-test: coverage-clean-results coverage-compile
 	touch coverage-test.made
 
 coverage-test.made:
-	@make coverage-test
-	touch coverage-test.made
+	$(MAKE) coverage-test
 
 coverage-prove: coverage-clean-results coverage-compile
 	$(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \




[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]

  Powered by Linux