From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4BWx-0006ES-Gu for qemu-devel@nongnu.org; Sun, 04 Mar 2012 08:31:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4BWv-0007W4-QZ for qemu-devel@nongnu.org; Sun, 04 Mar 2012 08:31:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:19158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4BWv-0007Vv-Iq for qemu-devel@nongnu.org; Sun, 04 Mar 2012 08:31:17 -0500 Date: Sun, 4 Mar 2012 15:31:23 +0200 From: "Michael S. Tsirkin" Message-ID: <20120304133122.GD12047@redhat.com> References: <20120304091007.GA2252@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] make: remove generated objects from target dirs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, Anthony Liguori On Sun, Mar 04, 2012 at 01:25:59PM +0000, Peter Maydell wrote: > On 4 March 2012 09:10, Michael S. Tsirkin wrote: > > I ended up with qmp-commands.h in target directories, > > which makes build fail as it is found before the > > main header. > > make clean fixes it, but it might get triggered > > again when we make some header target-independent next. > > It's easy to just make sure all such leftovers are > > removed, so let's do this. > > > > Signed-off-by: Michael S. Tsirkin > > > > diff --git a/Makefile b/Makefile > > index e66e885..958a414 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -89,6 +89,7 @@ qemu-options.def: $(SRC_PATH)/qemu-options.hx > > =A0SUBDIR_RULES=3D$(patsubst %,subdir-%, $(TARGET_DIRS)) > > > > =A0subdir-%: $(GENERATED_HEADERS) > > + =A0 =A0 =A0 $(call quiet-command,rm -f $(foreach header, $(GENERATE= D_HEADERS), "$*/$(header)"),) > > =A0 =A0 =A0 =A0$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $*= V=3D"$(V)" TARGET_DIR=3D"$*/" all,) >=20 > In general we don't have workarounds for "something > moved directory and this broke builds not from clean" Why don't we? It's cheaper than always doing make clean after pull. > (source file moved from hw/ to . being one that's bitten > me before), Why would that bite anyone? AFAIK files under source control are handled fine. It's the generated ones that are a problem. > so why does just this one deserve to get an > rm here rather than just asking the user to run > 'make clean / distclean' ? >=20 > -- PMM