76a3147d38
* Unnecessarily causes lib/librpcsvc (etc) to be rebuilt every time rpcgen is updated. * No other "generated" file (.l, .y, ...) depends upon its tool like this * As <bsd.own.mk> wasn't being pulled in, the tools/ version wasn't being used, so a lot of times the dependency was wrong. Fixes [toolchain/11568] by Bernd Ernesti.
52 lines
867 B
Makefile
52 lines
867 B
Makefile
# $NetBSD: bsd.rpc.mk,v 1.3 2003/05/19 07:19:10 lukem Exp $
|
|
|
|
RPC_XDIR?= ${.CURDIR}/
|
|
|
|
# We don't use implicit suffix rules here to avoid dependencies in the
|
|
# Installed files.
|
|
|
|
.if defined(RPC_INCS)
|
|
|
|
.for I in ${RPC_INCS}
|
|
${I}: ${I:.h=.x}
|
|
${RPCGEN} -C -h ${RPC_XDIR}${I:.h=.x} -o ${.TARGET}
|
|
.endfor
|
|
|
|
CLEANFILES += ${RPC_INCS}
|
|
|
|
.depend: ${RPC_INCS}
|
|
|
|
.endif
|
|
|
|
.if defined(RPC_XDRFILES)
|
|
|
|
.for I in ${RPC_XDRFILES}
|
|
${I}: ${RPC_XDIR}${I:_xdr.c=.x}
|
|
${RPCGEN} -C -c ${RPC_XDIR}${I:_xdr.c=.x} -o ${.TARGET}
|
|
.endfor
|
|
|
|
CLEANFILES += ${RPC_XDRFILES}
|
|
|
|
.depend: ${RPC_XDRFILES}
|
|
|
|
.endif
|
|
|
|
.if defined(RPC_SVCFILES)
|
|
|
|
.for I in ${RPC_SVCCLASS}
|
|
_RPCS += -s ${I}
|
|
.endfor
|
|
|
|
.for I in ${RPC_SVCFILES}
|
|
|
|
${I}: ${RPC_XDIR}${I:_svc.c=.x}
|
|
${RPCGEN} -C ${_RPCS} ${RPC_SVCFLAGS} ${RPC_XDIR}${I:_svc.c=.x} \
|
|
-o ${.TARGET}
|
|
.endfor
|
|
|
|
CLEANFILES += ${RPC_SVCFILES}
|
|
|
|
.depend: ${RPC_SVCFILES}
|
|
|
|
.endif
|