From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJLvD-0006CW-Ic for qemu-devel@nongnu.org; Mon, 09 May 2011 04:34:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QJLvC-0002Gz-LW for qemu-devel@nongnu.org; Mon, 09 May 2011 04:34:31 -0400 MIME-Version: 1.0 In-Reply-To: <4DC78F5D.7080505@redhat.com> References: <1304322846-24376-4-git-send-email-pbonzini@redhat.com> <4DC78F5D.7080505@redhat.com> Date: Mon, 9 May 2011 09:34:29 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH 4/4] fix compilation when reconfiguring without dtrace backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org On Mon, May 9, 2011 at 7:53 AM, Paolo Bonzini wrote: > On 05/08/2011 01:15 PM, Stefan Hajnoczi wrote: >> >> I think the real problem is that dependencies need to be regenerated >> after ./configure? > > There are three ways to do that, the trivial but wrong one, and the corre= ct > but overzealous one: > > - delete .d files. =A0This forces regeneration of dependencies, but if yo= u do > not correspondingly delete .o files, you will likely have an incomplete > build (possibly _nothing_ will be built). > > - delete .d and .o files. =A0This forces regeneration of dependencies and > recompilation. =A0True, a lot of distros are using ccache nowadays, but s= till > this will cause a complete walk of all directories to pass those files to > ccache and relink the executables. =A0It will likely take a minute or thr= ee. The .o files should depend on GENERATED_HEADERS (especially config-host.h) and therefore be rebuilt by make when ./configure outputs a new configuration. If the configuration is identical an unnecessary rebuild is triggered but this can be mitigated using ccache like you say. So I think just deleting .d files is enough. BTW the Makefiles don't seem to have a step before compilation to generate all the dependencies, instead dependencies only kick in after the first build has completed? > - detect changes in the configuration and, if those happen, delete .d and= .o > files. =A0This is the correct one, and for one what the Linux kernel make= files > do, but also the biggest effort to implement. Is there some smart change detection you are thinking about or just something like keeping the old copy of config-host.h and friends to see if they have changed? Stefan