From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IFxcp-0007dp-Fb for qemu-devel@nongnu.org; Tue, 31 Jul 2007 15:43:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IFxcn-0007d7-NV for qemu-devel@nongnu.org; Tue, 31 Jul 2007 15:43:23 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IFxcn-0007d1-HT for qemu-devel@nongnu.org; Tue, 31 Jul 2007 15:43:21 -0400 Received: from moutng.kundenserver.de ([212.227.126.188]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IFxcm-0003pf-Sg for qemu-devel@nongnu.org; Tue, 31 Jul 2007 15:43:21 -0400 Message-ID: <46AF90D5.8060803@mail.berlios.de> Date: Tue, 31 Jul 2007 21:43:17 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: [Qemu-devel] [PATCH] Avoid unneeded rebuilds Content-Type: multipart/mixed; boundary="------------020208060405040904060806" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers This is a multi-part message in MIME format. --------------020208060405040904060806 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Today, a change of the target list for a QEMU build (caused by calling configure a second time) creates new files config-host.h and */config.h. So make is forced to re-compile a lot of files which depend on any of these two files - even when they did not change anything but their time stamp. A small patch for configure improves this behaviour. Both header files are now saved before creating new ones. If nothing changed, the backup is restored. This is standard for other makes, for example Linux kernels. It would be nice to see my patch applied to CVS HEAD. Thanks, Stefan --------------020208060405040904060806 Content-Type: text/x-diff; name="configure.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="configure.patch" Index: configure =================================================================== RCS file: /sources/qemu/qemu/configure,v retrieving revision 1.150 diff -u -b -B -r1.150 configure --- configure 26 Jul 2007 20:41:46 -0000 1.150 +++ configure 31 Jul 2007 19:10:46 -0000 @@ -699,6 +699,8 @@ #echo "Creating $config_mak and $config_h" +test -f $config_h && mv $config_h ${config_h}~ + echo "# Automatically generated by configure - do not modify" > $config_mak echo "# Configured with: $0 $@" >> $config_mak echo "/* Automatically generated by configure - do not modify */" > $config_h @@ -867,6 +869,8 @@ echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h +test -f ${config_h}~ && cmp -s $config_h ${config_h}~ && mv ${config_h}~ $config_h + for target in $target_list; do target_dir="$target" config_mak=$target_dir/config.mak @@ -915,6 +919,8 @@ #echo "Creating $config_mak, $config_h and $target_dir/Makefile" +test -f $config_h && mv $config_h ${config_h}~ + mkdir -p $target_dir mkdir -p $target_dir/fpu if test "$target" = "arm-linux-user" -o "$target" = "armeb-linux-user" ; then @@ -1074,6 +1080,8 @@ echo "CONFIG_COCOA=yes" >> $config_mak fi +test -f ${config_h}~ && cmp -s $config_h ${config_h}~ && mv ${config_h}~ $config_h + done # for target in $targets # build tree in object directory if source path is different from current one --------------020208060405040904060806--