From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X35iO-0005xb-Pa for qemu-devel@nongnu.org; Fri, 04 Jul 2014 11:48:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X35iI-0003YL-Kb for qemu-devel@nongnu.org; Fri, 04 Jul 2014 11:47:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X35iI-0003Wp-3d for qemu-devel@nongnu.org; Fri, 04 Jul 2014 11:47:50 -0400 Message-ID: <53B6CCA0.1050007@redhat.com> Date: Fri, 04 Jul 2014 17:47:44 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1403974776-23966-1-git-send-email-peter.maydell@linaro.org> <53B15381.7060308@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Makefile: Don't build generated headers before Makefile is reread List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , Stefan Hajnoczi Il 04/07/2014 16:33, Peter Maydell ha scritto: > On 30 June 2014 13:09, Paolo Bonzini wrote: >> Il 28/06/2014 18:59, Peter Maydell ha scritto: >> >>> Having a direct dependency >>> Makefile: $(GENERATED_HEADERS) >>> can result in not-from-clean builds failing sometimes, because it means >>> that when Make does its "is any makefile or include out of date and >>> needing a rebuild?" check, as well as possibly running configure (to >>> update config-host.mak) it will also rebuild GENERATED_HEADERS under >>> the "old" config-host.mak regime. If the makefile rules for rebuilding >>> the generated headers have changed in a way that means they're not >>> compatible with the old config-host.mak variable names, the build will >>> fail. Even if it does work, it's wasted effort since we'll need to >>> rebuild them with the right config-host.mak settings immediately. >>> >>> Instead, make the generated headers depend on config-host.mak >>> and config-target.mak. This means we'll definitely rebuild them >>> if the configuration changes, but it will be done after Make >>> reloads its makefiles and includes so will happen with the >>> correct set of config-host.mak settings. >>> >>> We rely on the various .o files having correct autogenerated >>> dependency rules to cause the generated headers to be generated >>> as and when they are needed. > >> Reviewed-by: Paolo Bonzini > > > Any objections to this going into 2.1 for rc1 ? Not from me. Paolo