# HG changeset patch # User Bruno Haible # Date 1240171796 -7200 # Node ID f4b420294f4b83e56a505f43c81f14452c10ffc6 # Parent 174a2fed8a76741cb715026bd76d8f293c430827 Don't touch configmake.h if it has not actually changed. diff --git a/ChangeLog b/ChangeLog --- 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 --- a/modules/configmake +++ b/modules/configmake @@ -26,7 +26,7 @@ # 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 @@ 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