r14950: make sure include/config.h is only updated when the content was changed
authorStefan Metzmacher <metze@samba.org>
Thu, 6 Apr 2006 12:30:06 +0000 (12:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:00:22 +0000 (14:00 -0500)
metze

source/autogen.sh
source/configure.in
source/main.mk

index ed9a9f5bc3572842fbb1f04b7d95bbd80449026b..c80ece77c950d98f00bd96b2624369efcdca3fd3 100755 (executable)
@@ -51,7 +51,7 @@ echo "$0: running script/mkversion.sh"
 ./script/mkversion.sh || exit 1
 
 rm -rf autom4te*.cache
-rm -f configure include/config.h*
+rm -f configure include/config_tmp.h*
 
 echo "$0: running $AUTOHEADER"
 $AUTOHEADER || exit 1
index 67ee8d8a4177f761ea8a9b9681856ce12a02189a..456b34f650cdb9e1de89353053504ef9e3df84e4 100644 (file)
@@ -7,7 +7,7 @@ dnl AC_PREREQ(2.53)
 AC_INIT([samba],[],[samba-technical@samba.org])
 
 AC_CONFIG_SRCDIR([include/includes.h])
-AC_CONFIG_HEADER(include/config.h)
+AC_CONFIG_HEADER(include/config_tmp.h)
 
 # Configuration rules.
 sinclude(build/m4/env.m4)
@@ -110,6 +110,12 @@ $SMB_INFO_SUBSYSTEMS
 $SMB_INFO_LIBRARIES
 CEOF
 
+cmp include/config_tmp.h include/config.h >/dev/null 2>&1
+CMP_RET=$?
+if [ $CMP_RET != 0 ];then
+       cp include/config_tmp.h include/config.h
+fi
+
 AC_OUTPUT_COMMANDS(
 [$PERL -I${builddir} -I${srcdir} -I${srcdir}/build ${srcdir}/build/smb_build/main.pl || exit $?],[
 PERL="$PERL";export PERL;export srcdir; export builddir;
index e127974ccd2ddb5f8ab211c741cee3e73ecdbb72..8d4582e2b4384fb5534699379cf2d27e5ab701b5 100644 (file)
@@ -251,7 +251,7 @@ clean:: clean_pch
        @-rm -f $(PROTO_HEADERS)
 
 distclean: clean
-       -rm -f include/config.h include/smb_build.h
+       -rm -f include/config.h include/config_tmp.h include/build.h
        -rm -f Makefile 
        -rm -f config.status
        -rm -f config.log config.cache
@@ -262,7 +262,7 @@ removebackup:
        -rm -f *.bak *~ */*.bak */*~ */*/*.bak */*/*~ */*/*/*.bak */*/*/*~
 
 realdistclean: distclean removebackup
-       -rm -f include/config.h.in
+       -rm -f include/config_tmp.h.in
        -rm -f include/version.h
        -rm -f configure
        -rm -f $(MANPAGES)