[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86emul/test: use vpath uniformly for access to code living elsewhere



commit 89e6f0540e9d3c713c7c2966ae9ae069272ca305
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Jan 6 09:38:55 2026 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Jan 6 09:38:55 2026 +0100

    x86emul/test: use vpath uniformly for access to code living elsewhere
    
    Replace the remaining non-local symlink-ing (i.e. of core emulator files)
    as well, to avoid mixing approaches. (The symlink-ing of test blob sources
    needs to remain for the time being.)
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 tools/tests/x86_emulator/Makefile | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tools/tests/x86_emulator/Makefile 
b/tools/tests/x86_emulator/Makefile
index 3e02580a35..376cfe244d 100644
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -11,6 +11,11 @@ all:
 run: $(TARGET)
        ./$(TARGET)
 
+# Add the core emulator to the build
+vpath x86_emulate/%.c $(XEN_ROOT)/xen/arch/x86
+vpath x86_emulate/%.h $(XEN_ROOT)/xen/arch/x86
+HOSTCFLAGS += -iquote $(XEN_ROOT)/xen/arch/x86
+
 # Add libx86 to the build
 vpath %.c $(XEN_ROOT)/xen/lib/x86
 
@@ -287,12 +292,8 @@ else
 run32 clean32: %32: %
 endif
 
-.PHONY: x86_emulate
 x86_emulate:
        mkdir -p $@
-       ln -sf $(XEN_ROOT)/xen/arch/x86/$@/*.[ch] $@/
-
-x86_emulate/%: x86_emulate ;
 
 HOSTCFLAGS-x86_64 := -fno-PIE
 $(call cc-option-add,HOSTCFLAGS-x86_64,HOSTCC,-no-pie)
@@ -307,6 +308,8 @@ x86_emulate.h := x86-emulate.h x86_emulate/x86_emulate.h 
x86_emulate/private.h $
 $(OBJS): %.o: %.c $(x86_emulate.h)
        $(HOSTCC) $(HOSTCFLAGS) -c -g -o $@ $<
 
+$(filter x86_emulate/%.o,$(OBJS)): x86_emulate
+
 x86-emulate.o: x86_emulate/x86_emulate.c
 x86-emulate.o x86_emulate/%.o: HOSTCFLAGS += -D__XEN_TOOLS__
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.