From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxEv3-0000hz-C8 for qemu-devel@nongnu.org; Tue, 26 May 2015 09:29:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxEuz-0000l1-7M for qemu-devel@nongnu.org; Tue, 26 May 2015 09:29:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxEuy-0000ku-Vt for qemu-devel@nongnu.org; Tue, 26 May 2015 09:29:17 -0400 Message-ID: <55647526.9020802@redhat.com> Date: Tue, 26 May 2015 15:29:10 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1432618686-16077-1-git-send-email-crosthwaite.peter@gmail.com> In-Reply-To: <1432618686-16077-1-git-send-email-crosthwaite.peter@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Makefile.target: set master BUILD_DIR List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite , qemu-devel@nongnu.org Cc: Gerd Hoffmann , Peter Crosthwaite On 26/05/2015 07:38, Peter Crosthwaite wrote: > make can be invoked in the individual build dirs to build an individual > target or just a single file of a target. e.g. > > touch translate-all.c > make -C microblazeel-softmmu translate-all.o Out of curiosity, why not use "make subdir-microblazeel-softmmu" instead? Paolo > There is however a small bug when using the pixman submodule. > config-host.mak will ref BUILD_DIR for the pixman -I CFLAGS: > > grep BUILD_DIR config-host.mak > QEMU_CFLAGS=-I$(SRC_PATH)/pixman/pixman -I$(BUILD_DIR)/pixman/pixman ... > > This causes a build failure as -I/pixman/pixman (BUILD_DIR=="") will > not be found. > > BUILD_DIR is usually set by the top level Makefile. Just lazy-set it in > Makefile.target to the parent directory. > > Granted, this will not work if the pixman submodule is not prebuilt, > but it at least means you can do incremental partial builds once you > have done your initial full build (or attempt) from the top level. > > The next step would be refactor make infrastructure to rebuild pixman > on a submake like the one above. > > Cc: Gerd Hoffmann > Signed-off-by: Peter Crosthwaite > --- > Pixman is the only config-host.mak user of BUILD dir so maybe there is > a pixman specific solution out there too? > --- > Makefile.target | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Makefile.target b/Makefile.target > index 3e861c8..ec5b92c 100644 > --- a/Makefile.target > +++ b/Makefile.target > @@ -1,5 +1,7 @@ > # -*- Mode: makefile -*- > > +BUILD_DIR?=$(CURDIR)/.. > + > include ../config-host.mak > include config-target.mak > include config-devices.mak >