Add bsd.cov.mk
It's a Makefile snippet that currently handles cleanup/installation of .gcno files
This commit is contained in:
parent
8bd0ba0ac0
commit
dc5068b507
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/runtime-coverage/; revision=321765
@ -69,6 +69,10 @@ FILES= \
|
||||
|
||||
FILESDIR= ${BINDIR}/mk
|
||||
|
||||
.if ${MK_COVERAGE} != "no"
|
||||
FILES+= bsd.cov.mk
|
||||
.endif
|
||||
|
||||
.if ${MK_TESTS} != "no"
|
||||
FILES+= atf.test.mk
|
||||
FILES+= plain.test.mk
|
||||
|
21
share/mk/bsd.cov.mk
Normal file
21
share/mk/bsd.cov.mk
Normal file
@ -0,0 +1,21 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
FILESGROUPS?= FILES
|
||||
FILESGROUPS+= GCNOS
|
||||
_GCNO_FILES= ${OBJS:.o=.gcno}
|
||||
CLEANFILES+= ${_GCNO_FILES}
|
||||
GCNOS+= ${_GCNO_FILES}
|
||||
|
||||
.for _gcno_file in ${_GCNO_FILES}
|
||||
_gcno_dir= ${COVERAGEDIR}${_gcno_file:tA:H}
|
||||
_gcno_fulldir= ${DESTDIR}${_gcno_dir}
|
||||
GCNOSDIR_${_gcno_file:T}= ${_gcno_dir}
|
||||
|
||||
.if !target(${_gcno_fulldir})
|
||||
beforeinstall: ${_gcno_fulldir}
|
||||
${_gcno_fulldir}:
|
||||
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},coverage} -d ${.TARGET}
|
||||
.endif
|
||||
.endfor
|
Loading…
Reference in New Issue
Block a user