From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mw9Yt-0003uq-IH for qemu-devel@nongnu.org; Fri, 09 Oct 2009 03:06:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mw9Yo-0003nD-J7 for qemu-devel@nongnu.org; Fri, 09 Oct 2009 03:06:47 -0400 Received: from [199.232.76.173] (port=36478 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mw9Yo-0003n4-Cd for qemu-devel@nongnu.org; Fri, 09 Oct 2009 03:06:42 -0400 Received: from mx20.gnu.org ([199.232.41.8]:8317) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mw9Yn-0005Kl-E2 for qemu-devel@nongnu.org; Fri, 09 Oct 2009 03:06:41 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mw9Yj-0000Kx-Gz for qemu-devel@nongnu.org; Fri, 09 Oct 2009 03:06:37 -0400 Message-ID: <4ACEE0E0.1030307@web.de> Date: Fri, 09 Oct 2009 09:06:08 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <479bbb59a908a1b60cb921e5f9718b7cd54d58d0.1254875337.git.quintela@redhat.com> In-Reply-To: <479bbb59a908a1b60cb921e5f9718b7cd54d58d0.1254875337.git.quintela@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig82867183E25908148E5D6FB8" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH 02/31] Move generation of config-host.h to Makefile from configure List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig82867183E25908148E5D6FB8 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Juan Quintela wrote: > Use timestamp based appreach to avoid not needed recompilation. > Add it to rules.mak >=20 This patch somehow raises the build noise ratio: make[1]: `qemu-io' is up to date. make[1]: `qemu-img' is up to date. make[1]: `qemu-doc.html' is up to date. make[1]: `qemu-tech.html' is up to date. make[1]: `qemu.1' is up to date. make[1]: `qemu-img.1' is up to date. make[1]: `qemu-nbd.8' is up to date. =2E.. I don't immediately see why, but I bet you are so deep into this that you can quickly find and fix the reason. :) Thanks, Jan > Many thanks to Paolo Bonzini for helpding the design, and the debug. >=20 > Signed-off-by: Juan Quintela > --- > Makefile | 13 +++++++++---- > configure | 20 +------------------- > create_config | 2 ++ > rules.mak | 9 +++++++++ > 4 files changed, 21 insertions(+), 23 deletions(-) >=20 > diff --git a/Makefile b/Makefile > index c552739..144b392 100644 > --- a/Makefile > +++ b/Makefile > @@ -29,7 +29,10 @@ else > DOCS=3D > endif >=20 > -build-all: $(TOOLS) $(DOCS) recurse-all > +SUBDIR_MAKEFLAGS=3D$(if $(V),,--no-print-directory) > + > +build-all: config-host.h > + $(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) $(TOOLS) $(DOCS) re= curse-all,) >=20 > config-host.mak: configure > ifneq ($(wildcard config-host.mak),) > @@ -37,10 +40,12 @@ ifneq ($(wildcard config-host.mak),) > @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh > endif >=20 > -SUBDIR_MAKEFLAGS=3D$(if $(V),,--no-print-directory) > +config-host.h: config-host.h-timestamp > +config-host.h-timestamp: config-host.mak > + > SUBDIR_RULES=3D$(patsubst %,subdir-%, $(TARGET_DIRS)) >=20 > -subdir-%: > +subdir-%: config-host.h > $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V=3D"$(V)" TAR= GET_DIR=3D"$*/" all,) >=20 > $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a > @@ -200,7 +205,7 @@ clean: > done >=20 > distclean: clean > - rm -f config-host.mak config-host.h config-host.ld $(DOCS) qemu-optio= ns.texi qemu-img-cmds.texi > + rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-opti= ons.texi qemu-img-cmds.texi > rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr} > for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \ > rm -rf $$d || exit 1 ; \ > diff --git a/configure b/configure > index ed5d7d6..fd3cb24 100755 > --- a/configure > +++ b/configure > @@ -1800,13 +1800,8 @@ echo "-> Your SDL version is too old - please up= grade to have SDL support" > fi >=20 > config_host_mak=3D"config-host.mak" > -config_host_h=3D"config-host.h" > config_host_ld=3D"config-host.ld" >=20 > -#echo "Creating $config_host_mak and $config_host_h" > - > -test -f $config_host_h && mv $config_host_h ${config_host_h}~ > - > echo "# Automatically generated by configure - do not modify" > $confi= g_host_mak > printf "# Configured with:" >> $config_host_mak > printf " '%s'" "$0" "$@" >> $config_host_mak > @@ -2064,18 +2059,6 @@ echo "LIBS+=3D$LIBS" >> $config_host_mak > echo "LIBS_TOOLS+=3D$libs_tools" >> $config_host_mak > echo "EXESUF=3D$EXESUF" >> $config_host_mak >=20 > -echo "/* Automatically generated by configure - do not modify */" > $c= onfig_host_h > - > -/bin/sh $source_path/create_config < $config_host_mak >> $config_host_= h > - > -if test -f ${config_host_h}~ ; then > - if cmp -s $config_host_h ${config_host_h}~ ; then > - mv ${config_host_h}~ $config_host_h > - else > - rm ${config_host_h}~ > - fi > -fi > - > # generate list of library paths for linker script >=20 > $ld --verbose -v 2> /dev/null | grep SEARCH_DIR > ${config_host_ld} > @@ -2474,8 +2457,7 @@ fi > echo "LDFLAGS+=3D$ldflags" >> $config_mak > echo "QEMU_CFLAGS+=3D$cflags" >> $config_mak >=20 > -echo "/* Automatically generated by configure - do not modify */" > $c= onfig_h > -echo "#include \"../config-host.h\"" >> $config_h > +echo "#include \"../config-host.h\"" > $config_h >=20 > /bin/sh $source_path/create_config < $config_mak >> $config_h >=20 > diff --git a/create_config b/create_config > index 5bc8fb6..30d0487 100755 > --- a/create_config > +++ b/create_config > @@ -1,5 +1,7 @@ > #!/bin/sh >=20 > +echo "/* Automatically generated by create_config - do not modify */" > + > while read line; do >=20 > case $line in > diff --git a/rules.mak b/rules.mak > index b380903..ca95351 100644 > --- a/rules.mak > +++ b/rules.mak > @@ -35,3 +35,12 @@ quiet-command =3D $(if $(V),$1,$(if $(2),@echo $2 &&= $1, @$1)) >=20 > cc-option =3D $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \= > >/dev/null 2>&1 && echo OK), $2, $3) > + > +# Generate timestamp files for .h include files > + > +%.h: %.h-timestamp > + @test -f $@ || cp $< $@ > + > +%.h-timestamp: %.mak > + $(call quiet-command, $(SRC_PATH)/create_config < $< > $@, " GEN $= *.h") > + @cmp $@ $*.h >/dev/null 2>&1 || cp $@ $*.h --------------enig82867183E25908148E5D6FB8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkrO4PAACgkQitSsb3rl5xSksQCgnCvgqMK8/5d5ZTQ0DIJuGrZK 8m4AoKwasFSSi/kKwkme6d02YTWLqxql =crO1 -----END PGP SIGNATURE----- --------------enig82867183E25908148E5D6FB8--