freebsd-src/share/mk/bsd.cov.mk
Enji Cooper e31df75228 Fix .gcda to .pico (bsd.lib.mk) and .o (bsd.prog.mk) dependency mapping
The logic wasn't using a filtered version of SRCS -- it was using the
unfiltered version. This was causing some hilarity with unnecessary
dependencies, like headers and the like in lib/libc/... .

Also use .pico with bsd.lib.mk, not .o -- .o doesn't use SHARED_C*FLAGS,
which doesn't contain _COV_FLAG, which means that the .gcda's would have
relied on objects that didn't build them as a side-effect.
2017-10-05 07:10:28 +00:00

25 lines
578 B
Makefile

# $FreeBSD$
#
# Snippet for dealing with runtime coverage logic.
#
# .gcda files are generated from files that are compiled from source, e.g.,
# foo.gcda is foo.c or foo.cpp's file. In order for the libraries and programs
# to be properly instrumented, the .gcda files must be installed to a prefix
# common to the object files.
#
# See gcov(1) for more details.
.include <bsd.own.mk>
FILESGROUPS?= FILES
.if !empty(GCDAS)
GCDAS:= ${GCDAS:O:u}
FILESGROUPS+= GCDAS
CLEANFILES+= ${GCDAS}
.for _gcda in ${GCDAS}
GCDASDIR_${_gcda:T}= ${COVERAGEDIR}${_gcda:H:tA}
.endfor
.endif