1 # $NetBSD: Makefile,v 1.31 2001/03/21 20:14:10 mycroft Exp $ 2 3 RPCSRCS= bootparam_prot.x klm_prot.x mount.x nfs_prot.x\ 4 nlm_prot.x rex.x rnusers.x rusers.x rquota.x rstat.x rwall.x\ 5 sm_inter.x spray.x yp.x yppasswd.x 6 SRCS= ${RPCSRCS:.x=.c} ${HDRS} 7 HDRS= ${RPCSRCS:.x=.h} 8 CLEANFILES+= ${SRCS} ${HDRS} 9 10 INCS= ${HDRS} ${RPCSRCS} 11 INCSDIR= /usr/include/rpcsvc 12 13 LIB= rpcsvc 14 MKMAN= no 15 MKPIC= no 16 17 # This little dance is necessary because RPCGEN doesn't get set until 18 # bsd.lib.mk is included at the end of the makefile. Unfortunately 19 # that's after make has figured out dependencies using the (lack of) values 20 # of variables at the time it parses the dependency line. 21 .ifnmake getrpcgen 22 XRPCGEN != cd ${.CURDIR} && ${MAKE} -B ${MAKEFLAGS} getrpcgen 23 .endif 24 25 getrpcgen: 26 @set -- X `type ${RPCGEN}` && shift `expr $$# - 1` && echo "$$1" 27 28 # We don't use explicit suffix rules here to avoid dependencies in the 29 # Installed files. 30 31 .for I in ${RPCSRCS} 32 33 ${I:.x=.c}: $I ${XRPCGEN} 34 ${RPCGEN} -C -c ${.CURDIR}/$I -o ${.TARGET} 35 36 ${I:.x=.h}: $I ${XRPCGEN} 37 ${RPCGEN} -C -h ${.CURDIR}/$I -o ${.TARGET} 38 .endfor 39 40 .include <bsd.lib.mk> 41