[BACK]Return to bsd.rpc.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

File: [cvs.NetBSD.org] / src / share / mk / bsd.rpc.mk (download)

Revision 1.12, Sat Sep 10 16:57:35 2011 UTC (2 years, 11 months ago) by apb
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, agc-symver-base, agc-symver
Branch point for: yamt-pagecache, tls-maxphys
Changes since 1.11: +2 -1 lines

Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.

#	$NetBSD: bsd.rpc.mk,v 1.12 2011/09/10 16:57:35 apb Exp $

.include <bsd.init.mk>

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}
	${_MKTARGET_CREATE}
	${TOOL_RPCGEN} -C -h ${RPC_XDIR}${I:.h=.x} -o ${.TARGET}
.endfor

DPSRCS+=	${RPC_INCS}
CLEANFILES+=	${RPC_INCS}

.endif								# }


.if defined(RPC_XDRFILES)					# {

.for I in ${RPC_XDRFILES}
${I}: ${RPC_XDIR}${I:_xdr.c=.x}
	${_MKTARGET_CREATE}
	${TOOL_RPCGEN} -C -c ${RPC_XDIR}${I:_xdr.c=.x} -o ${.TARGET}
.endfor

DPSRCS+=	${RPC_XDRFILES}
CLEANFILES+=	${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}
	${_MKTARGET_CREATE}
	${TOOL_RPCGEN} -C ${_RPCS} ${RPC_SVCFLAGS} ${RPC_XDIR}${I:_svc.c=.x} \
		-o ${.TARGET}
.endfor

DPSRCS+=	${RPC_SVCFILES}
CLEANFILES+=	${RPC_SVCFILES}

.endif								# }

.if defined(RPC_CLNTFILES)					# {

.for I in ${RPC_CLNTFILES}

${I}: ${RPC_XDIR}${I:_clnt.c=.x}
	${_MKTARGET_CREATE}
	${TOOL_RPCGEN} -C -l ${_RPCS} ${RPC_CLNTFLAGS} \
		${RPC_XDIR}${I:_clnt.c=.x} -o ${.TARGET}
.endfor

DPSRCS+=	${RPC_CLNTFILES}
CLEANFILES+=	${RPC_CLNTFILES}

.endif								# }

##### Pull in related .mk logic
.include <bsd.obj.mk>
.include <bsd.sys.mk>
.include <bsd.clean.mk>