From: Ken Raeburn Date: Sat, 20 Jan 2007 19:11:34 +0000 (+0000) Subject: Use move-if-changed and a timestamp file to avoid re-running commands and X-Git-Tag: krb5-1.7-alpha1~1327 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1265e33c6b9c70b1b53061236f2e688934da7ee8;p=krb5.git Use move-if-changed and a timestamp file to avoid re-running commands and updating krb5.h when there are no textual changes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19098 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/Makefile.in b/src/include/Makefile.in index e5293dba9..d4083facc 100644 --- a/src/include/Makefile.in +++ b/src/include/Makefile.in @@ -77,16 +77,19 @@ osconf.h: $(OSCONFSRC) Makefile ##DOS##!endif ############################################################################### -krb5/krb5.h: $(srcdir)/krb5/krb5.hin $(K5_ET_HEADERS) +krb5/krb5.h: krb5.stamp; : krb5.h +krb5.stamp: $(srcdir)/krb5/krb5.hin $(K5_ET_HEADERS) test -d krb5 || mkdir krb5 if test -r krb5.h; then \ if cmp -s krb5.h $(srcdir)/krb5.h; then :; else rm -f krb5.h; fi; \ else :; fi - echo "/* This file is generated, please don't edit it directly. */" > krb5/krb5.h - echo "#ifndef KRB5_KRB5_H_INCLUDED" >> krb5/krb5.h - echo "#define KRB5_KRB5_H_INCLUDED" >> krb5/krb5.h - cat $(srcdir)/krb5/krb5.hin $(K5_ET_HEADERS) >> krb5/krb5.h - echo "#endif /* KRB5_KRB5_H_INCLUDED */" >> krb5/krb5.h + echo "/* This file is generated, please don't edit it directly. */" > krb5/krb5.new + echo "#ifndef KRB5_KRB5_H_INCLUDED" >> krb5/krb5.new + echo "#define KRB5_KRB5_H_INCLUDED" >> krb5/krb5.new + cat $(srcdir)/krb5/krb5.hin $(K5_ET_HEADERS) >> krb5/krb5.new + echo "#endif /* KRB5_KRB5_H_INCLUDED */" >> krb5/krb5.new + $(MOVEIFCHANGED) krb5/krb5.new krb5/krb5.h + touch krb5.stamp verify-calling-conventions-krb5: private-and-public-decls $(PERL) -w $(SRCTOP)/util/def-check.pl private-and-public-decls $(SRCTOP)/lib/krb5_32.def @@ -107,7 +110,7 @@ force: clean-unix:: $(RM) krb5/krb5.h krb5_err.h kdb5_err.h kv5m_err.h krb524_err.h \ - asn1_err.h private-and-public-decls + asn1_err.h private-and-public-decls krb5.stamp $(RM) $(ET_HEADERS) autoconf.stamp clean-windows::