From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVkPP-00088k-Pm for qemu-devel@nongnu.org; Fri, 26 Apr 2013 11:18:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVkPO-0001Fy-4u for qemu-devel@nongnu.org; Fri, 26 Apr 2013 11:17:59 -0400 Received: from mail-qa0-x231.google.com ([2607:f8b0:400d:c00::231]:51687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVkPN-0001Fs-UC for qemu-devel@nongnu.org; Fri, 26 Apr 2013 11:17:57 -0400 Received: by mail-qa0-f49.google.com with SMTP id bs12so234941qab.8 for ; Fri, 26 Apr 2013 08:17:57 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <517A9A99.7060205@redhat.com> Date: Fri, 26 Apr 2013 17:17:45 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20130421191129.8947.77964.stgit@fimbulvetr.bsc.es> <20130421191209.8947.17224.stgit@fimbulvetr.bsc.es> In-Reply-To: <20130421191209.8947.17224.stgit@fimbulvetr.bsc.es> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 07/24] system: [linux] Use absolute include path for linux-headers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?TGx1w61zIFZpbGFub3Zh?= Cc: qemu-devel@nongnu.org Il 21/04/2013 21:12, Lluís Vilanova ha scritto: > Lets the include directive work regardless of the current directory. > > This is needed for code compiled in directories deeper than one level from the > build root. > > Signed-off-by: Lluís Vilanova > --- > Makefile.target | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile.target b/Makefile.target > index f382559..2f9675a 100644 > --- a/Makefile.target > +++ b/Makefile.target > @@ -7,7 +7,7 @@ include $(SRC_PATH)/rules.mak > > $(call set-vpath, $(SRC_PATH)) > ifdef CONFIG_LINUX > -QEMU_CFLAGS += -I../linux-headers > +QEMU_CFLAGS += -I$(BUILD_DIR)/linux-headers > endif > QEMU_CFLAGS += -I.. -I$(SRC_PATH)/target-$(TARGET_BASE_ARCH) -DNEED_CPU_H I am not sure why this is needed. The .. here is the path from foo-softmmu/ to the build root. QEMU's build system is only one-level recursive, something like foo-softmmu/hw/virtio/virtio.c is compiled from foo-softmmu/ (whose Makefile is Makefile.target) and thus the path needs to be relative from foo-softmmu/. It need not be relative to foo-softmmu/hw/virtio. Paolo