diff mbox series

[5/6] tools/include: adjust x86-specific population of xen/

Message ID 0f9f05c2-2f76-93d6-21e9-6308741c49b7@suse.com
State New
Headers show
Series tools/include: adjustments to the population of xen/ | expand

Commit Message

Jan Beulich Sept. 10, 2020, 12:13 p.m. UTC
There's no need to use a shell loop construct here - ln's destination
can be specified as just the intended directory, as we don't mean to
change the names of any of the files. Also drop XEN_LIB_X86_INCLUDES for
having a single use only, and don't pass -f to ln, to allow noticing
name collisions right away.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

--- a/tools/include/Makefile
+++ b/tools/include/Makefile
@@ -12,8 +12,6 @@  all-y:
 xen-foreign:
 	$(MAKE) -C xen-foreign
 
-XEN_LIB_X86_INCLUDES = $(filter-out %autogen.h, $(XEN_ROOT)/xen/include/xen/lib/x86/Makefile $(wildcard $(XEN_ROOT)/xen/include/xen/lib/x86/*.h))
-
 xen-dir:
 	@rm -rf xen acpi
 	mkdir -p xen/libelf acpi
@@ -26,11 +24,10 @@  xen-dir:
 	ln -s $(XEN_ROOT)/xen/include/acpi/platform acpi/
 	ln -s $(XEN_ROOT)/xen/include/acpi/ac*.h acpi/
 ifeq ($(CONFIG_X86),y)
-	ln -sf $(XEN_ROOT)/xen/include/asm-x86 xen/asm
+	ln -s $(XEN_ROOT)/xen/include/asm-x86 xen/asm
 	mkdir -p xen/lib/x86
-	for f in $(patsubst $(XEN_ROOT)/xen/include/xen/lib/x86/%,%,$(XEN_LIB_X86_INCLUDES)); do \
-		ln -sf $(XEN_ROOT)/xen/include/xen/lib/x86/$$f xen/lib/x86/$$f; \
-	done
+	ln -s $(filter-out %autogen.h,$(wildcard $(XEN_ROOT)/xen/include/xen/lib/x86/*.h)) xen/lib/x86/
+	ln -s $(XEN_ROOT)/xen/include/xen/lib/x86/Makefile xen/lib/x86/
 endif
 
 all-$(CONFIG_X86): xen-dir