From patchwork Thu Sep 15 17:16:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Llu=C3=ADs_Vilanova?= X-Patchwork-Id: 114807 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2E494B6F70 for ; Fri, 16 Sep 2011 03:18:10 +1000 (EST) Received: from localhost ([::1]:57377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4FZe-0008Ek-4B for incoming@patchwork.ozlabs.org; Thu, 15 Sep 2011 13:18:06 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4FZZ-0008ER-60 for qemu-devel@nongnu.org; Thu, 15 Sep 2011 13:18:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4FZY-0003yD-0T for qemu-devel@nongnu.org; Thu, 15 Sep 2011 13:18:01 -0400 Received: from gw.ac.upc.es ([147.83.30.3]:46358 helo=gw.ac.upc.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4FZX-0003y9-RF for qemu-devel@nongnu.org; Thu, 15 Sep 2011 13:17:59 -0400 Received: from localhost (unknown [84.88.53.92]) by gw.ac.upc.edu (Postfix) with ESMTP id 4CE2C6B01CF; Thu, 15 Sep 2011 19:17:58 +0200 (CEST) To: qemu-devel@nongnu.org From: =?utf-8?b?TGx1w61z?= Vilanova Date: Thu, 15 Sep 2011 19:16:58 +0200 Message-ID: <20110915171658.23325.116.stgit@ginnungagap.bsc.es> User-Agent: StGit/0.15 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 147.83.30.3 Cc: Richard Henderson Subject: [Qemu-devel] [PATCH 1/2] build: Always have 'BUILD_DIR' variable pointing to the root of the build tree X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org --- Makefile | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) Acked-by: Richard Henderson diff --git a/Makefile b/Makefile index 7e9382f..97b26c6 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ # Makefile for QEMU. +# Always point to the root of the build tree +BUILD_DIR=$(PWD) + GENERATED_HEADERS = config-host.h trace.h qemu-options.def ifeq ($(TRACE_BACKEND),dtrace) GENERATED_HEADERS += trace-dtrace.h @@ -81,7 +84,7 @@ qemu-options.def: $(SRC_PATH)/qemu-options.hx SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) subdir-%: $(GENERATED_HEADERS) - $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,) + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" BUILD_DIR=$(BUILD_DIR) TARGET_DIR="$*/" all,) ifneq ($(wildcard config-host.mak),) include $(SRC_PATH)/Makefile.objs @@ -96,7 +99,7 @@ $(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) $(trace-obj-y) subdir-lib ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) romsubdir-%: - $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",) + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" BUILD_DIR=$(BUILD_DIR) TARGET_DIR="$*/",) ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS)) @@ -132,10 +135,10 @@ install-libcacard: @echo "libtool is missing, please install and rerun configure"; exit 1 else libcacard.la: $(GENERATED_HEADERS) $(oslib-obj-y) qemu-timer-common.o $(addsuffix .lo, $(basename $(trace-obj-y))) - $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" libcacard.la,) + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" BUILD_DIR=$(BUILD_DIR) TARGET_DIR="$*/" libcacard.la,) install-libcacard: libcacard.la - $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" install-libcacard,) + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" BUILD_DIR=$(BUILD_DIR) TARGET_DIR="$*/" install-libcacard,) endif ######################################################################