From: Michael Marineau <michael.marineau@coreos.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Michael Marineau <michael.marineau@coreos.com>
Subject: [Qemu-devel] [PATCH] Makefile.target: include top level build dir in vpath
Date: Sun, 23 Aug 2015 17:57:55 -0700 [thread overview]
Message-ID: <1440377875-10991-1-git-send-email-michael.marineau@coreos.com> (raw)
In-Reply-To: <55CB4ADE.8040807@redhat.com>
Using ccache with CCACHE_BASEDIR set to $(SRC_PATH) or a parent will
rewrite all absolute paths to relative paths. This interacts poorly with
QEMU's two-level build directory scheme. For example, lets say
BUILD_DIR=$(SRC_PATH)/build so build/blockdev.d will contain:
blockdev.o: ../blockdev.c ../include/sysemu/block-backend.h \
Now the target build under build/x86_64-softmmu or similar will depend
on ../blockdev.o which in turn will get make to source ../blockdev.d to
check its dependencies. Since make always considers paths relative to
the current working directory rather than the makefile the path appeared
in the relative path to ../blockdev.c is useless.
This change simply adds the top level build directory to vpath so paths
relative to the source directory, top build directory, and target build
directory all work just fine.
Signed-off-by: Michael Marineau <michael.marineau@coreos.com>
---
This is a re-send with the proper Signed-off-by line.
Makefile.target | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.target b/Makefile.target
index 3e7aafd..dc32294 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -7,7 +7,7 @@ include config-target.mak
include config-devices.mak
include $(SRC_PATH)/rules.mak
-$(call set-vpath, $(SRC_PATH))
+$(call set-vpath, $(SRC_PATH):$(BUILD_DIR))
ifdef CONFIG_LINUX
QEMU_CFLAGS += -I../linux-headers
endif
--
2.4.6
next prev parent reply other threads:[~2015-08-24 0:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-09 7:02 [Qemu-devel] [PATCH] Makefile.target: include top level build dir in vpath Michael Marineau
2015-08-12 13:32 ` Paolo Bonzini
2015-08-12 14:28 ` Michael Marineau
2015-08-24 0:57 ` Michael Marineau [this message]
2015-09-07 21:02 ` Michael Marineau
2015-09-07 21:11 ` Paolo Bonzini
2015-09-07 21:18 ` Michael Marineau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1440377875-10991-1-git-send-email-michael.marineau@coreos.com \
--to=michael.marineau@coreos.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).