svn commit: r347018 - projects/runtime-coverage-v2/share/mk
Enji Cooper
ngie at FreeBSD.org
Thu May 2 14:40:22 UTC 2019
Author: ngie
Date: Thu May 2 14:40:21 2019
New Revision: 347018
URL: https://svnweb.freebsd.org/changeset/base/347018
Log:
Guard against cases where GCNOS would be empty, resulting in failed builds
There are some Makefiles that install headers explicitly, without creating
programs, e.g., `usr.sbin/amd/include`. In order to support this case moving
forward, specifically test for _GCNO_SRCS being non-empty, then set GCNOS
appropriately.
Modified:
projects/runtime-coverage-v2/share/mk/bsd.lib.mk
projects/runtime-coverage-v2/share/mk/bsd.prog.mk
Modified: projects/runtime-coverage-v2/share/mk/bsd.lib.mk
==============================================================================
--- projects/runtime-coverage-v2/share/mk/bsd.lib.mk Thu May 2 12:56:13 2019 (r347017)
+++ projects/runtime-coverage-v2/share/mk/bsd.lib.mk Thu May 2 14:40:21 2019 (r347018)
@@ -517,7 +517,9 @@ _libinstall:
.if defined(_COV_FLAG) && !empty(SRCS)
_GCNO_SRCS= ${SRCS:M*.c} ${SRCS:M*.cc} ${SRCS:M*.cpp} ${SRCS:M*.cxx} ${SRCS:M*.C} ${SRCS:M*.y}
+.if !empty(_GCNO_SRCS)
GCNOS:= ${_GCNO_SRCS:R:S/$/.gcno/g}
+.endif
.undef _GCNO_SRCS
.for _gcno in ${GCNOS}
${_gcno}: ${_gcno:R}.o
Modified: projects/runtime-coverage-v2/share/mk/bsd.prog.mk
==============================================================================
--- projects/runtime-coverage-v2/share/mk/bsd.prog.mk Thu May 2 12:56:13 2019 (r347017)
+++ projects/runtime-coverage-v2/share/mk/bsd.prog.mk Thu May 2 14:40:21 2019 (r347018)
@@ -330,7 +330,9 @@ NLSNAME?= ${PROG}
.include <bsd.confs.mk>
.if defined(_COV_FLAG) && !empty(SRCS)
_GCNO_SRCS= ${SRCS:M*.c} ${SRCS:M*.cc} ${SRCS:M*.cpp} ${SRCS:M*.cxx} ${SRCS:M*.C} ${SRCS:M*.y}
+.if !empty(_GCNO_SRCS)
GCNOS:= ${_GCNO_SRCS:R:S/$/.gcno/g}
+.endif
.undef _GCNO_SRCS
.for _gcno in ${GCNOS}
${_gcno}: ${_gcno:R}.o
More information about the svn-src-projects
mailing list