svn commit: r269899 - head/share/mk
Rui Paulo
rpaulo at FreeBSD.org
Wed Aug 13 01:27:53 UTC 2014
Author: rpaulo
Date: Wed Aug 13 01:27:51 2014
New Revision: 269899
URL: http://svnweb.freebsd.org/changeset/base/269899
Log:
Make sure the DTrace header files are built before depend and before
the build starts.
This adds a new variable DHDRS that contains a list of all DTrace
header files. Then, we use the beforedepend hook to make sure the
heaeder files are built.
Introduce a beforebuild dependency (from projects/bmake) based on
feedback from Simon J. Gerraty. This lets us generate the header
files without running make depend.
Reviewed by: sjg, imp
MFC after: 3 days
Modified:
head/share/mk/bsd.dep.mk
head/share/mk/bsd.lib.mk
head/share/mk/bsd.prog.mk
Modified: head/share/mk/bsd.dep.mk
==============================================================================
--- head/share/mk/bsd.dep.mk Wed Aug 13 00:19:18 2014 (r269898)
+++ head/share/mk/bsd.dep.mk Wed Aug 13 01:27:51 2014 (r269899)
@@ -129,6 +129,7 @@ CFLAGS+= -D_DTRACE_VERSION=1 -I${.OBJDIR
.endif
.for _DSRC in ${SRCS:M*.d:N*/*}
.for _D in ${_DSRC:R}
+DHDRS+= ${_D}.h
${_D}.h: ${_DSRC}
${DTRACE} -xnolibs -h -s ${.ALLSRC}
SRCS:= ${SRCS:S/${_DSRC}/${_D}.h/}
@@ -148,6 +149,8 @@ ${_D}.po: ${_D}.h ${POBJS:S/${_D}.po//}
.endif
.endfor
.endfor
+beforedepend: ${DHDRS}
+beforebuild: ${DHDRS}
.endif
.if !target(depend)
Modified: head/share/mk/bsd.lib.mk
==============================================================================
--- head/share/mk/bsd.lib.mk Wed Aug 13 00:19:18 2014 (r269898)
+++ head/share/mk/bsd.lib.mk Wed Aug 13 01:27:51 2014 (r269899)
@@ -118,7 +118,8 @@ PO_FLAG=-pg
${CC} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
-all: objwarn
+all: beforebuild .WAIT
+beforebuild: objwarn
.if defined(PRIVATELIB)
_LIBDIR:=${LIBPRIVATEDIR}
Modified: head/share/mk/bsd.prog.mk
==============================================================================
--- head/share/mk/bsd.prog.mk Wed Aug 13 00:19:18 2014 (r269898)
+++ head/share/mk/bsd.prog.mk Wed Aug 13 01:27:51 2014 (r269899)
@@ -159,7 +159,8 @@ MAN1= ${MAN}
.endif
.endif # defined(PROG)
-all: objwarn ${PROG} ${SCRIPTS}
+all: beforebuild .WAIT ${PROG} ${SCRIPTS}
+beforebuild: objwarn
.if ${MK_MAN} != "no"
all: _manpages
.endif
More information about the svn-src-head
mailing list