From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx7ZH-0003kE-HM for qemu-devel@nongnu.org; Tue, 26 May 2015 01:38:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx7ZD-0007hd-Ac for qemu-devel@nongnu.org; Tue, 26 May 2015 01:38:23 -0400 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]:35125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx7ZD-0007hS-3S for qemu-devel@nongnu.org; Tue, 26 May 2015 01:38:19 -0400 Received: by pacwv17 with SMTP id wv17so84412233pac.2 for ; Mon, 25 May 2015 22:38:17 -0700 (PDT) From: Peter Crosthwaite Date: Mon, 25 May 2015 22:38:06 -0700 Message-Id: <1432618686-16077-1-git-send-email-crosthwaite.peter@gmail.com> Subject: [Qemu-devel] [PATCH] Makefile.target: set master BUILD_DIR List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, Gerd Hoffmann , Peter Crosthwaite 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 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 -- 1.9.1