Fix bugs introduced in the previous rev:

* add a phatom target for the DTRACEOBJS
* when invoking DTrace, don't add DTRACEOBJS to the command line.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Rui Paulo 2010-09-10 17:44:11 +00:00
parent 9feea9c1f4
commit 51ccb83a39

View File

@ -37,19 +37,23 @@ CFLAGS+=-DWITH_DTRACE
DTRACEHEADERS=${DTRACEOBJS:S/o$/h/}
DTRACESRCS=${DTRACEOBJS:S/o$/d/}
CLEANFILES+=${DTRACEOBJS} ${DTRACEHEADERS}
.if defined(PROG)
_DTRACELINKING:=${OBJS}
OBJS+=${DTRACEOBJS}
.else
_DTRACELINKING:=${SOBJS}
SOBJS+=${DTRACEOBJS}
.endif
DPADD+=${LIBELF}
LDADD+=-lelf
.if defined(PROG)
_DTRACELINKING=${OBJS}
OBJS+=${DTRACEOBJS}
.else
_DTRACELINKING=${SOBJS}
SOBJS+=${DTRACEOBJS}
.endif
${DTRACEOBJS}:
beforedepend:
${DTRACE} -C -h -s ${DTRACESRCS}
beforelinking:
${DTRACE} -G -s ${DTRACESRCS} ${_DTRACELINKING}
${DTRACE} -G -s ${DTRACESRCS} ${_DTRACELINKING:S/${DTRACEOBJS}//}
.endif