From: Stefan Weil <weil@mail.berlios.de>
To: QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] Avoid unneeded rebuilds
Date: Tue, 31 Jul 2007 21:43:17 +0200 [thread overview]
Message-ID: <46AF90D5.8060803@mail.berlios.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 584 bytes --]
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
[-- Attachment #2: configure.patch --]
[-- Type: text/x-diff, Size: 1399 bytes --]
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
reply other threads:[~2007-07-31 19:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46AF90D5.8060803@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).