Commit 15d9ca0f9baa9f10f2b3e3e3d8554a802a3ab0ff
1 parent
b30bb3a2
A variant of move-if-change, by Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3098 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
8 additions
and
0 deletions
configure
@@ -699,6 +699,8 @@ config_h="config-host.h" | @@ -699,6 +699,8 @@ config_h="config-host.h" | ||
699 | 699 | ||
700 | #echo "Creating $config_mak and $config_h" | 700 | #echo "Creating $config_mak and $config_h" |
701 | 701 | ||
702 | +test -f $config_h && mv $config_h ${config_h}~ | ||
703 | + | ||
702 | echo "# Automatically generated by configure - do not modify" > $config_mak | 704 | echo "# Automatically generated by configure - do not modify" > $config_mak |
703 | echo "# Configured with: $0 $@" >> $config_mak | 705 | echo "# Configured with: $0 $@" >> $config_mak |
704 | echo "/* Automatically generated by configure - do not modify */" > $config_h | 706 | echo "/* Automatically generated by configure - do not modify */" > $config_h |
@@ -867,6 +869,8 @@ fi | @@ -867,6 +869,8 @@ fi | ||
867 | 869 | ||
868 | echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h | 870 | echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h |
869 | 871 | ||
872 | +test -f ${config_h}~ && cmp -s $config_h ${config_h}~ && mv ${config_h}~ $config_h | ||
873 | + | ||
870 | for target in $target_list; do | 874 | for target in $target_list; do |
871 | target_dir="$target" | 875 | target_dir="$target" |
872 | config_mak=$target_dir/config.mak | 876 | config_mak=$target_dir/config.mak |
@@ -915,6 +919,8 @@ fi | @@ -915,6 +919,8 @@ fi | ||
915 | 919 | ||
916 | #echo "Creating $config_mak, $config_h and $target_dir/Makefile" | 920 | #echo "Creating $config_mak, $config_h and $target_dir/Makefile" |
917 | 921 | ||
922 | +test -f $config_h && mv $config_h ${config_h}~ | ||
923 | + | ||
918 | mkdir -p $target_dir | 924 | mkdir -p $target_dir |
919 | mkdir -p $target_dir/fpu | 925 | mkdir -p $target_dir/fpu |
920 | if test "$target" = "arm-linux-user" -o "$target" = "armeb-linux-user" ; then | 926 | if test "$target" = "arm-linux-user" -o "$target" = "armeb-linux-user" ; then |
@@ -1074,6 +1080,8 @@ if test "$cocoa" = "yes" ; then | @@ -1074,6 +1080,8 @@ if test "$cocoa" = "yes" ; then | ||
1074 | echo "CONFIG_COCOA=yes" >> $config_mak | 1080 | echo "CONFIG_COCOA=yes" >> $config_mak |
1075 | fi | 1081 | fi |
1076 | 1082 | ||
1083 | +test -f ${config_h}~ && cmp -s $config_h ${config_h}~ && mv ${config_h}~ $config_h | ||
1084 | + | ||
1077 | done # for target in $targets | 1085 | done # for target in $targets |
1078 | 1086 | ||
1079 | # build tree in object directory if source path is different from current one | 1087 | # build tree in object directory if source path is different from current one |