coverage: split build target into compile and test

Confusingly, the coverage-build target in fact builds with gcov support _and runs tests_. Split it into two targets that actually are named after what they do. Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thomas Rast committed May 13, 2013 at 23:27 UTC 0c38a95ec83f7adb5fc1b7a5133a2ac2668cdd4a
1 file changed +5 -3
Makefile
+5 -3
@@ -2524,10 +2524,10 @@ check-builtins::
2524
2525 ### Test suite coverage testing
2526 #
2527 -.PHONY: coverage coverage-clean coverage-build coverage-report
2527 +.PHONY: coverage coverage-clean coverage-compile coverage-test coverage-report
2528
2529 coverage:
2530 - $(MAKE) coverage-build
2530 + $(MAKE) coverage-test
2531 $(MAKE) coverage-report
2532
2533 object_dirs := $(sort $(dir $(OBJECTS)))
@@ -2543,8 +2543,10 @@ COVERAGE_CFLAGS = $(CFLAGS) -O0 -ftest-coverage -fprofile-arcs
2543 COVERAGE_LDFLAGS = $(CFLAGS) -O0 -lgcov
2544 GCOVFLAGS = --preserve-paths --branch-probabilities --all-blocks
2545
2546 -coverage-build: coverage-clean
2546 +coverage-compile:
2547 $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" all
2548 +
2549 +coverage-test: coverage-clean-results coverage-compile
2550 $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \
2551 -j1 test
2552