From ff9669995f0840ad8180ee04f03658f96c884652 Mon Sep 17 00:00:00 2001 From: wollman Date: Thu, 29 Jun 1995 19:43:00 +0000 Subject: Make this include installation conform to the standard of all the rest: - Don't do mkdir/chown/chmod - Do `cmp -s' before attempting to install a header This should fix the obnoxious problem of yp programs wanting to rebuild every time. --- include/rpcsvc/Makefile | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'include/rpcsvc') diff --git a/include/rpcsvc/Makefile b/include/rpcsvc/Makefile index e72a622..27dc972 100644 --- a/include/rpcsvc/Makefile +++ b/include/rpcsvc/Makefile @@ -1,5 +1,5 @@ # from: @(#)Makefile 2.3 88/08/11 4.0 RPCSRC -# $Id: Makefile,v 1.2 1994/08/28 17:44:10 bde Exp $ +# $Id: Makefile,v 1.3 1995/03/18 07:04:23 rgrimes Exp $ .SUFFIXES: .x @@ -13,25 +13,31 @@ XFILES= bootparam_prot.x klm_prot.x mount.x nfs_prot.x nlm_prot.x \ HFILES= yp_prot.h ypclnt.h CLEANFILES+= ${HDRS} +RPCDIR= ${DESTDIR}/usr/include/rpcsvc +EVERYTHING= $(XFILES) $(HFILES) all: ${HDRS} install: all - @${ECHO} "Creating RPC service headers directory" - @/bin/rm -rf ${DESTDIR}/usr/include/rpcsvc - @-mkdir ${DESTDIR}/usr/include/rpcsvc @${ECHO} "Installing RPC service header and definition files" - @for i in $(XFILES); do \ - (install -c -m 644 ${.CURDIR}/$$i ${DESTDIR}/usr/include/rpcsvc) done - @for i in $(HDRS); do \ - (install ${COPY} -m 644 $$i ${DESTDIR}/usr/include/rpcsvc) done - @for i in $(HFILES); do \ - (install -c -m 644 ${.CURDIR}/$$i ${DESTDIR}/usr/include/rpcsvc) done - @chown -R ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/rpcsvc - @chmod -R 755 ${DESTDIR}/usr/include/rpcsvc +.for i in $(EVERYTHING) + @cd ${.CURDIR}; cmp -s $i $(RPCDIR)/$i || \ + (install -c -m ${BINMODE} -o ${BINOWN} -g ${BINGRP} \ + ${.CURDIR}/$i ${RPCDIR}; \ + $(ECHO) $i) +.endfor +.for i in $(HDRS) + @cmp -s $i $(RPCDIR)/$i || \ + (install -c -m ${BINMODE} -o ${BINOWN} -g ${BINGRP} \ + ${.CURDIR}/$i ${RPCDIR}; \ + $(ECHO) $i) +.endfor .x.h: - @${ECHO} generating $@... - @CURPWD=`pwd` ; cd ${.CURDIR} ; ${RPCCOM} -h $*.x -o $$CURPWD/$@ + cd ${.CURDIR} ; ${RPCCOM} -h $*.x -o ${.OBJDIR}/$@ .include + + + + -- cgit v1.1