From: Anthony PERARD <anthony.perard@gmail.com>
We can retire VPATH now, and $(srctree) to prerequisite of generic
rules.
(targets %.i and %.s and %.E are updated but may not work as
expected.)
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
xen/Makefile | 3 +--
xen/Rules.mk | 12 ++++++------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/xen/Makefile b/xen/Makefile
index fbce0f6771fb..32c36426ed7c 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -188,9 +188,8 @@ else
endif
objtree := .
-VPATH := $(srctree)
-export building_out_of_srctree srctree objtree VPATH
+export building_out_of_srctree srctree objtree
export XEN_ROOT := $(abs_srctree)/..
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 0ef45d2c7087..6fcb1f6b769f 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -268,7 +268,7 @@ ifdef building_out_of_srctree
$(gen-objs-S) $(obj-gen-y): $(obj)/%.o: $(obj)/%.S FORCE
$(call if_changed_dep,cc_o_S)
endif
-$(obj)/%.o: $(src)/%.S FORCE
+$(obj)/%.o: $(srctree)/$(src)/%.S FORCE
$(call if_changed_dep,cc_o_S)
@@ -298,18 +298,18 @@ cmd_cc_s_c = $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -S $< -o $@
quiet_cmd_cpp_s_S = CPP $@
cmd_cpp_s_S = $(CPP) $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $<
-$(obj)/%.i: $(src)/%.c FORCE
+$(obj)/%.i: $(srctree)/$(src)/%.c FORCE
$(call if_changed_dep,cpp_i_c)
-$(obj)/%.s: $(src)/%.c FORCE
+$(obj)/%.s: $(srctree)/$(src)/%.c FORCE
$(call if_changed_dep,cc_s_c)
-$(obj)/%.s: $(src)/%.S FORCE
+$(obj)/%.s: $(srctree)/$(src)/%.S FORCE
$(call if_changed_dep,cpp_s_S)
-$(obj)/%.E: $(src)/%.c FORCE
+$(obj)/%.E: $(srctree)/$(src)/%.c FORCE
$(call if_changed_dep,cpp_i_c)
-$(obj)/%.E: $(src)/%.S FORCE
+$(obj)/%.E: $(srctree)/$(src)/%.S FORCE
$(call if_changed_dep,cpp_s_S)
# Linker scripts, .lds.S -> .lds
--
Anthony PERARD