Makefile revision 1.29
1# $NetBSD: Makefile,v 1.29 2001/01/16 02:42:40 cgd Exp $ 2 3RPCSRCS= 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 6SRCS= ${RPCSRCS:.x=.c} ${HDRS} 7HDRS= ${RPCSRCS:.x=.h} 8CLEANFILES+= ${SRCS} ${HDRS} 9 10INCS= ${HDRS} ${RPCSRCS} 11INCSDIR= /usr/include/rpcsvc 12 13LIB= rpcsvc 14MKMAN= no 15MKPIC= 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 22XRPCGEN != (cd ${.CURDIR} && ${MAKE} -B ${MAKEFLAGS} getrpcgen) 23.endif 24 25getrpcgen: 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 ${.CURDIR}/$I -o ${.TARGET} 35 36${I:.x=.h}: $I ${XRPCGEN} 37 ${RPCGEN} -h ${.CURDIR}/$I -o ${.TARGET} 38.endfor 39 40.include <bsd.lib.mk> 41