bsd.rpc.mk revision 1.5 1 # $NetBSD: bsd.rpc.mk,v 1.5 2003/07/14 00:52:12 lukem Exp $
2
3 .include <bsd.init.mk>
4
5 RPC_XDIR?= ${.CURDIR}/
6
7 # We don't use implicit suffix rules here to avoid dependencies in the
8 # Installed files.
9
10 .if defined(RPC_INCS)
11
12 .for I in ${RPC_INCS}
13 ${I}: ${I:.h=.x}
14 ${TOOL_RPCGEN} -C -h ${RPC_XDIR}${I:.h=.x} -o ${.TARGET}
15 .endfor
16
17 CLEANFILES += ${RPC_INCS}
18
19 .depend: ${RPC_INCS}
20
21 .endif
22
23 .if defined(RPC_XDRFILES)
24
25 .for I in ${RPC_XDRFILES}
26 ${I}: ${RPC_XDIR}${I:_xdr.c=.x}
27 ${TOOL_RPCGEN} -C -c ${RPC_XDIR}${I:_xdr.c=.x} -o ${.TARGET}
28 .endfor
29
30 CLEANFILES += ${RPC_XDRFILES}
31
32 .depend: ${RPC_XDRFILES}
33
34 .endif
35
36 .if defined(RPC_SVCFILES)
37
38 .for I in ${RPC_SVCCLASS}
39 _RPCS += -s ${I}
40 .endfor
41
42 .for I in ${RPC_SVCFILES}
43
44 ${I}: ${RPC_XDIR}${I:_svc.c=.x}
45 ${TOOL_RPCGEN} -C ${_RPCS} ${RPC_SVCFLAGS} ${RPC_XDIR}${I:_svc.c=.x} \
46 -o ${.TARGET}
47 .endfor
48
49 CLEANFILES += ${RPC_SVCFILES}
50
51 .depend: ${RPC_SVCFILES}
52
53 ##### Pull in related .mk logic
54 .include <bsd.obj.mk>
55 .include <bsd.sys.mk>
56
57 .endif
58