1# $OpenBSD: Makefile,v 1.14 2022/11/28 07:37:48 matthieu Exp $ 2 3 4RPCSRCS= bootparam_prot.x klm_prot.x mount.x nfs_prot.x \ 5 nlm_prot.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= 13 14prereq: ${HDRS} 15 16BUILDFIRST = ${HDRS} 17 18includes: ${HDRS} 19 ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 20 ${DESTDIR}/usr/include/rpcsvc 21 @echo installing rpc .h and .x files 22 @(cd ${.CURDIR}; for i in $(RPCSRCS); do \ 23 cmp -s $(.CURDIR)/$$i ${DESTDIR}/usr/include/rpcsvc/$$i || \ 24 { j="${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 $$i \ 25 ${DESTDIR}/usr/include/rpcsvc"; \ 26 echo $$j; $$j; } \ 27 done) 28 @sleep 1; for i in $(HDRS); do \ 29 cmp -s $$i ${DESTDIR}/usr/include/rpcsvc/$$i || \ 30 { j="${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 $$i \ 31 ${DESTDIR}/usr/include/rpcsvc"; \ 32 echo $$j; $$j; } \ 33 done 34 35# new suffixes have to go afterwards, because bsd.lib.mk clears them 36.include <bsd.lib.mk> 37.SUFFIXES: .x .c .h 38 39.x.c: 40 rpcgen -C -c ${.IMPSRC} -o ${.TARGET} 41 42.x.h: 43 rpcgen -C -h ${.IMPSRC} -o ${.TARGET} 44