Date: Mon, 31 Jul 2017 09:50:48 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r321777 - projects/runtime-coverage/share/mk Message-ID: <201707310950.v6V9om9C059246@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Mon Jul 31 09:50:47 2017 New Revision: 321777 URL: https://svnweb.freebsd.org/changeset/base/321777 Log: This Makefile snippet needs more work -- it tries to install .gcno files for .asm, .s files and it shouldn't Modified: projects/runtime-coverage/share/mk/bsd.cov.mk Modified: projects/runtime-coverage/share/mk/bsd.cov.mk ============================================================================== --- projects/runtime-coverage/share/mk/bsd.cov.mk Mon Jul 31 09:46:48 2017 (r321776) +++ projects/runtime-coverage/share/mk/bsd.cov.mk Mon Jul 31 09:50:47 2017 (r321777) @@ -1,21 +1,31 @@ # $FreeBSD$ +.ifdef notyet .include <bsd.own.mk> FILESGROUPS?= FILES -FILESGROUPS+= GCNOS -_GCNO_FILES= ${OBJS:.o=.gcno} -CLEANFILES+= ${_GCNO_FILES} -GCNOS+= ${_GCNO_FILES} +_GCNOGROUPS= -.for _gcno_file in ${_GCNO_FILES} -_gcno_dir= ${COVERAGEDIR}${_gcno_file:tA:H} -_gcno_fulldir= ${DESTDIR}${_gcno_dir} -GCNOSDIR_${_gcno_file:T}= ${_gcno_dir} +.for _obj in ${OBJS} +# XXX (ngie): this is pretty hamfisted +.if !empty(SRCS:T:M${obj:.o=.asm}) || !empty(SRCS:T:M${obj:.o=.s}) +_gcno= ${_obj:.o=.gcno} +_gcno_prefix= ${_gcno:H:tA} +_gcno_dir= ${COVERAGEDIR}${_gcno_prefix} -.if !target(${_gcno_fulldir}) -beforeinstall: ${_gcno_fulldir} -${_gcno_fulldir}: - ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},coverage} -d ${.TARGET} +_GCNO_GROUPS+= ${_gcno_prefix} +CLEANFILES+= ${_gcno} +${_gcno_prefix}+= ${_gcno} +${_gcno_prefix}DIR= ${_gcno_dir} +${_gcno}: ${_obj} .endif .endfor + +_GCNO_GROUPS:= ${_GCNO_GROUPS:O:u} +FILESGROUPS+= ${_GCNO_GROUPS} +.for _gcno_group in ${_GCNO_GROUPS} +beforeinstall: ${DESTDIR}${${_gcno_group}DIR} +${DESTDIR}${${_gcno_group}DIR}: + ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},coverage} -d ${.TARGET} +.endfor +.endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707310950.v6V9om9C059246>