From 0c38cb8432a5e48d4309fe7626161e12c1aace13 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 30 Nov 2013 14:52:40 +0000 Subject: [PATCH] Don't rebuild the header files all the time if they did not change --- external/bsd/nvi/usr.bin/nvi/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/external/bsd/nvi/usr.bin/nvi/Makefile b/external/bsd/nvi/usr.bin/nvi/Makefile index 76646f7b5e61..4c902cbf7dca 100644 --- a/external/bsd/nvi/usr.bin/nvi/Makefile +++ b/external/bsd/nvi/usr.bin/nvi/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2013/11/29 22:56:19 christos Exp $ +# $NetBSD: Makefile,v 1.4 2013/11/30 14:52:40 christos Exp $ .include @@ -82,7 +82,12 @@ CLEANFILES+=${i}_extern.h _${i}_SRCS != echo ${DIST}/${i}/*.c ${DIST}/${i}/*.xs ${i}_extern.h: ${SRCS} ${_MKTARGET_CREATE} - ${TOOL_SED} -n "s/^ \* PUBLIC: \(.*\)/\1/p" ${.ALLSRC:M*/$i/*} > ${.TARGET} + @${TOOL_SED} -n "s/^ \* PUBLIC: \(.*\)/\1/p" ${.ALLSRC:M*/$i/*} > ${.TARGET}.tmp + @if cmp -s ${.TARGET}.tmp ${.TARGET}; then \ + rm -f ${.TARGET}.tmp; \ + else \ + mv -f ${.TARGET}.tmp ${.TARGET}; \ + fi .endfor DPSRCS+=version.h