Makefile.target: include top level build dir in vpath
PATCH 1/1 Makefile.target: include top level build dir in vpath
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.
--- Makefile.target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile.target +1 -1
@@ -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
Signature · 1 line
2.4.6
Quoted 26 lines · Michael Marineau
Using ccache with
CCACHE_BASEDIRset 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.owhich 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.cis 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.
--- Makefile.target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Makefile.target +0
-0
Makefile.target include config-target.mak · line 13
Quoted 8 lines
Makefile.target +1
-1@@ -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
Hi,
can you reply with "Signed-off-by: Michael Marineau <[email protected]>", representing that you've read and agreed to the Developer Certificate of Origin (http://developercertificate.org/)?
This is necessary to include your patch in QEMU.
Paolo
Quoted 41 lines · Paolo Bonzini
Quoted 26 lines · Michael Marineau
Using ccache with
CCACHE_BASEDIRset 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.owhich 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.cis 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.
--- Makefile.target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Makefile.target +0
-0Makefile.target include config-target.mak · line 13
Quoted 8 lines
Makefile.target +1
-1@@ -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 endifHi,
Quoted 7 lines
can you reply with "Signed-off-by: Michael Marineau <[email protected]>", representing that you've read and agreed to the Developer Certificate of Origin (http://developercertificate.org/)?
This is necessary to include your patch in QEMU.
Paolo
Oops, forgot about that.
Signed-off-by: Michael Marineau
<[email protected]>
PATCH 1/1 Makefile.target: include top level build dir in vpath
In reply to Paolo BonziniUsing 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.
---
This is a re-send with the proper Signed-off-by line.
Makefile.target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile.target +1 -1
@@ -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
Signature · 1 line
2.4.6
Quoted 39 lines · Michael Marineau
Using ccache with
CCACHE_BASEDIRset 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.owhich 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.cis 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 <[email protected]>---
This is a re-send with the proper Signed-off-by line.
Makefile.target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Makefile.target +1
-2@@ -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 --
Quoted 2 lines
2.4.6
Quoted 1 line · Michael Marineau
Just back from vacation, this is queued in my next pull request (currently at tags/for-upstream on github.com/bonzini/qemu.git, but I haven't finished testing it).
Paolo
Quoted 10 lines · Paolo Bonzini
Quoted 1 line · Michael Marineau
Just back from vacation, this is queued in my next pull request (currently at tags/for-upstream on github.com/bonzini/qemu.git, but I haven't finished testing it).
Paolo
Great, thanks!