svn commit: r321765 - projects/runtime-coverage/share/mk
Ngie Cooper
ngie at FreeBSD.org
Mon Jul 31 08:02:27 UTC 2017
Author: ngie
Date: Mon Jul 31 08:02:25 2017
New Revision: 321765
URL: https://svnweb.freebsd.org/changeset/base/321765
Log:
Add bsd.cov.mk
It's a Makefile snippet that currently handles cleanup/installation of
.gcno files
Added:
projects/runtime-coverage/share/mk/bsd.cov.mk (contents, props changed)
Modified:
projects/runtime-coverage/share/mk/Makefile
Modified: projects/runtime-coverage/share/mk/Makefile
==============================================================================
--- projects/runtime-coverage/share/mk/Makefile Mon Jul 31 07:58:29 2017 (r321764)
+++ projects/runtime-coverage/share/mk/Makefile Mon Jul 31 08:02:25 2017 (r321765)
@@ -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
Added: projects/runtime-coverage/share/mk/bsd.cov.mk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/runtime-coverage/share/mk/bsd.cov.mk Mon Jul 31 08:02:25 2017 (r321765)
@@ -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
More information about the svn-src-projects
mailing list