1 # $NetBSD: Makefile,v 1.17 1996/05/10 05:03:06 cgd Exp $ 2 3 4 RPCSRCS= bootparam_prot.x klm_prot.x mount.x nfs_prot.x\ 5 nlm_prot.x rex.x rnusers.x rusers.x rquota.x rstat.x rwall.x\ 6 sm_inter.x spray.x yp.x yppasswd.x 7 SRCS= ${RPCSRCS:R:S/$/.c/g} 8 HDRS= ${RPCSRCS:R:S/$/.h/g} 9 CLEANFILES+= ${SRCS} ${HDRS} 10 11 LIB= rpcsvc 12 NOMAN= 13 NOPIC= 14 15 all: ${HDRS} 16 beforedepend: ${HDRS} 17 18 includes: ${HDRS} 19 install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 20 ${DESTDIR}/usr/include/rpcsvc 21 @for i in $(HDRS); do \ 22 j="cmp -s $$i ${DESTDIR}/usr/include/rpcsvc/$$i || \ 23 install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \ 24 ${DESTDIR}/usr/include/rpcsvc"; \ 25 echo $$j; \ 26 eval "$$j"; \ 27 done 28 @cd ${.CURDIR}; for i in $(RPCSRCS); do \ 29 j="cmp -s $(.CURDIR)/$$i ${DESTDIR}/usr/include/rpcsvc/$$i || \ 30 install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \ 31 ${DESTDIR}/usr/include/rpcsvc"; \ 32 echo $$j; \ 33 eval "$$j"; \ 34 done 35 36 # new suffixes have to go afterwards, because bsd.lib.mk clears them 37 .include <bsd.lib.mk> 38 .SUFFIXES: .x .c .h 39 40 .x.c: 41 rpcgen -c ${.IMPSRC} -o ${.TARGET} 42 43 .x.h: 44 rpcgen -h ${.IMPSRC} -o ${.TARGET} 45