From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 02:43:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E83B1143; Wed, 8 Apr 2015 02:43:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B921081B; Wed, 8 Apr 2015 02:43:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t382h6YR016251; Wed, 8 Apr 2015 02:43:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t382h697016245; Wed, 8 Apr 2015 02:43:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201504080243.t382h697016245@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 8 Apr 2015 02:43:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281258 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 02:43:07 -0000 Author: markj Date: Wed Apr 8 02:43:05 2015 New Revision: 281258 URL: https://svnweb.freebsd.org/changeset/base/281258 Log: Add a DTRACEFLAGS variable, which can be used to pass additional variables to dtrace(1) invocations during a build. This change includes -C in the default flags, which has dtrace(1) run input scripts through the preprocessor. While here, sort the definitions of CP and CPP in sys.mk. Differential Revision: https://reviews.freebsd.org/D2204 Reviewed by: imp, rpaulo (previous revision) Modified: head/share/mk/bsd.dep.mk head/share/mk/sys.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Wed Apr 8 02:36:37 2015 (r281257) +++ head/share/mk/bsd.dep.mk Wed Apr 8 02:43:05 2015 (r281258) @@ -128,18 +128,18 @@ CFLAGS+= -I${.OBJDIR} .for _D in ${_DSRC:R} DHDRS+= ${_D}.h ${_D}.h: ${_DSRC} - ${DTRACE} -xnolibs -h -s ${.ALLSRC} + ${DTRACE} ${DTRACEFLAGS} -h -s ${.ALLSRC} SRCS:= ${SRCS:S/^${_DSRC}$//} OBJS+= ${_D}.o CLEANFILES+= ${_D}.h ${_D}.o ${_D}.o: ${_DSRC} ${OBJS:S/^${_D}.o$//} - ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${.ALLSRC} + ${DTRACE} ${DTRACEFLAGS} -G -o ${.TARGET} -s ${.ALLSRC} .if defined(LIB) CLEANFILES+= ${_D}.So ${_D}.po ${_D}.So: ${_DSRC} ${SOBJS:S/^${_D}.So$//} - ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${.ALLSRC} + ${DTRACE} ${DTRACEFLAGS} -G -o ${.TARGET} -s ${.ALLSRC} ${_D}.po: ${_DSRC} ${POBJS:S/^${_D}.po$//} - ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${.ALLSRC} + ${DTRACE} ${DTRACEFLAGS} -G -o ${.TARGET} -s ${.ALLSRC} .endif .endfor .endfor Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Wed Apr 8 02:36:37 2015 (r281257) +++ head/share/mk/sys.mk Wed Apr 8 02:43:05 2015 (r281258) @@ -62,17 +62,18 @@ CFLAGS += -fno-strict-aliasing .endif PO_CFLAGS ?= ${CFLAGS} +# cp(1) is used to copy source files to ${.OBJDIR}, make sure it can handle +# read-only files as non-root by passing -f. +CP ?= cp -f + +CPP ?= cpp + # C Type Format data is required for DTrace CTFFLAGS ?= -L VERSION CTFCONVERT ?= ctfconvert CTFMERGE ?= ctfmerge -# cp(1) is used to copy source files to ${.OBJDIR}, make sure it can handle -# read-only files as non-root by passing -f. -CP ?= cp -f - -DTRACE ?= dtrace .if defined(CFLAGS) && (${CFLAGS:M-g} != "") CTFFLAGS += -g .endif @@ -81,7 +82,8 @@ CXX ?= c++ CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign:N-Wold-style-definition} PO_CXXFLAGS ?= ${CXXFLAGS} -CPP ?= cpp +DTRACE ?= dtrace +DTRACEFLAGS ?= -C -x nolibs .if empty(.MAKEFLAGS:M-s) ECHO ?= echo