From 32bdc9d13095a91c492bb581212b6c078e5cae46 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 19 Apr 2009 22:09:56 +0200 Subject: [PATCH] Don't touch configmake.h if it has not actually changed. --- ChangeLog | 5 +++++ modules/configmake | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a10e086b79..6dded668e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-19 Bruno Haible + + * modules/configmake (Makefile.am): When the contents of configmake.h + does not change, arrange to preserve its modification time. + 2009-04-17 Simon Josefsson * top/maint.mk (PO_DOMAIN): New variable, allows overriding of diff --git a/modules/configmake b/modules/configmake index 5160128e6e..2c5dfaab16 100644 --- a/modules/configmake +++ b/modules/configmake @@ -26,7 +26,7 @@ Makefile.am: # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile - rm -f $@-t $@ + rm -f $@-t { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#define PREFIX "$(prefix)"'; \ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ @@ -56,7 +56,12 @@ configmake.h: Makefile echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ } | sed '/""/d' > $@-t - mv $@-t $@ + if test -f $@ && cmp $@-t $@ > /dev/null; then \ + rm -f $@-t; \ + else \ + rm -f $@; mv $@-t $@; \ + fi + BUILT_SOURCES += configmake.h CLEANFILES += configmake.h configmake.h-t -- 2.30.2