Makefile revision 1.28
11.28Ssommerfe#	$NetBSD: Makefile,v 1.28 2000/12/30 17:21:45 sommerfeld Exp $
21.4Sbrezak
31.10ScgdRPCSRCS=	bootparam_prot.x klm_prot.x mount.x nfs_prot.x\
41.8Sjtc		nlm_prot.x rex.x rnusers.x rusers.x rquota.x rstat.x rwall.x\
51.8Sjtc		sm_inter.x spray.x yp.x yppasswd.x
61.21SmycroftSRCS=		${RPCSRCS:.x=.c} ${HDRS}
71.21SmycroftHDRS=           ${RPCSRCS:.x=.h}
81.8SjtcCLEANFILES+=	${SRCS} ${HDRS}
91.8Sjtc
101.21SmycroftINCS=		${HDRS} ${RPCSRCS}
111.21SmycroftINCSDIR=	/usr/include/rpcsvc
121.19Schristos
131.8SjtcLIB=		rpcsvc
141.24SlukemMKMAN=		no
151.24SlukemMKPIC=		no
161.8Sjtc
171.26Serh# This little dance is necessary because RPCGEN doesn't get set until
181.26Serh# bsd.lib.mk is included at the end of the makefile.  Unfortunately
191.26Serh# that's after make has figured out dependencies using the (lack of) values
201.26Serh# of variables at the time it parses the dependency line.
211.26Serh.ifnmake getrpcgen
221.28SsommerfeXRPCGEN != (cd ${.CURDIR} && ${MAKE} -B ${MAKEFLAGS} getrpcgen)
231.26Serh.endif
241.26Serh
251.26Serhgetrpcgen:
261.26Serh	@set -- X `type ${RPCGEN}` && shift $$(($$# - 1)) && echo "$$1"
271.26Serh
281.19Schristos# We don't use explicit suffix rules here to avoid dependencies in the
291.19Schristos# Installed files.
301.19Schristos
311.19Schristos.for I in ${RPCSRCS}
321.19Schristos
331.26Serh${I:.x=.c}: $I ${XRPCGEN}
341.26Serh	${RPCGEN} -c ${.CURDIR}/$I -o ${.TARGET}
351.26Serh
361.26Serh${I:.x=.h}: $I ${XRPCGEN}
371.26Serh	${RPCGEN} -h ${.CURDIR}/$I -o ${.TARGET}
381.19Schristos.endfor
391.8Sjtc
401.8Sjtc.include <bsd.lib.mk>
41