Makefile revision 1.12
1#	$Id: Makefile,v 1.12 1995/01/12 19:39:43 jtc Exp $
2
3
4RPCSRCS=	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
7SRCS=		${RPCSRCS:R:S/$/.c/g}
8HDRS=           ${RPCSRCS:R:S/$/.h/g}
9CLEANFILES+=	${SRCS} ${HDRS}
10
11LIB=		rpcsvc
12NOMAN=
13NOPIC=
14
15all:		${HDRS}
16beforedepend:	${HDRS}
17
18beforeinstall:
19	install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
20		${DESTDIR}/usr/include/rpcsvc
21	@for i in $(HDRS); do \
22	    cmp -s $$i ${DESTDIR}/usr/include/rpcsvc/$$i || \
23		install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
24		${DESTDIR}/usr/include/rpcsvc; \
25	done
26	@for i in $(RPCSRCS); do \
27	    cmp -s $(.CURDIR)/$$i ${DESTDIR}/usr/include/rpcsvc/$$i || \
28		install -c -o ${BINOWN} -g ${BINGRP} -m 444 $(.CURDIR)/$$i \
29		${DESTDIR}/usr/include/rpcsvc; \
30	done
31
32# new suffixes have to go afterwards, because bsd.lib.mk clears them
33.include <bsd.lib.mk>
34.SUFFIXES: .x .c .h
35
36.x.c:
37	@echo generating $@...
38	@rpcgen -c ${.IMPSRC} -o ${.TARGET}
39
40.x.h:
41	@echo generating $@...
42	@rpcgen -h ${.IMPSRC} -o ${.TARGET}
43