Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make: only define target report-coverage if USE...
details: https://anonhg.NetBSD.org/src/rev/3fd15babfeae
branches: trunk
changeset: 1027575:3fd15babfeae
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Dec 12 10:33:03 2021 +0000
description:
make: only define target report-coverage if USE_COVERAGE is yes
Without USE_COVERAGE, GCOV was undefined, the '2>&1' passed all error
messages to GCOV_PERL, when then discarded them. If the error messages
had been left on stderr, the error message 'sh: arch.o.gcda: not found'
would have been a clear indicator of the actual cause of an empty
coverage report.
diffstat:
usr.bin/make/Makefile | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (25 lines):
diff -r a49c01be824d -r 3fd15babfeae usr.bin/make/Makefile
--- a/usr.bin/make/Makefile Sun Dec 12 09:49:09 2021 +0000
+++ b/usr.bin/make/Makefile Sun Dec 12 10:33:03 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.117 2021/11/28 18:58:58 rillig Exp $
+# $NetBSD: Makefile,v 1.118 2021/12/12 10:33:03 rillig Exp $
# @(#)Makefile 5.2 (Berkeley) 12/28/90
PROG= make
@@ -187,12 +187,14 @@
@env USE_COVERAGE=yes COPTS="-O0 -ggdb" USER_CPPFLAGS="-DCLEANUP" \
sh -c 'make -s all -j8 && make -s test'
+.if ${USE_COVERAGE} == "yes"
report-coverage: .PHONY
@echo 'covered uncovered file'
- @${GCOV} ${GCOV_OPTS} *.gcda 2>&1 \
+ @${GCOV} ${GCOV_OPTS} *.gcda \
| perl -ne ${GCOV_PERL:Q} \
| sort -nr
@sed -i 's,^\([^:]*\): *[0-9]*:,\1: ,' *.gcov
+.endif
.include <bsd.prog.mk>
.include <bsd.subdir.mk>
Home |
Main Index |
Thread Index |
Old Index