]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
x86emul/test: avoid race in link farm rune
authorWei Liu <wei.liu2@citrix.com>
Mon, 20 Feb 2017 14:37:37 +0000 (14:37 +0000)
committerWei Liu <wei.liu2@citrix.com>
Mon, 20 Feb 2017 15:14:10 +0000 (15:14 +0000)
Several `ln -sf` can race with each other.  Provide dedicated targets
for soft-linking directories.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
tools/tests/x86_emulator/Makefile

index 9bf36947c04ad1fddcdcae1d11090daf8592b2a5..7ca138d31a81e581f35e4104174718270a59d368 100644 (file)
@@ -40,11 +40,15 @@ distclean: clean
 .PHONY: install
 install:
 
-x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h:
-       [ -L x86_emulate ] || ln -sf $(XEN_ROOT)/xen/arch/x86/x86_emulate .
+x86_emulate:
+       [ -L $@ ] || ln -sf $(XEN_ROOT)/xen/arch/x86/$@
 
-asm/x86-vendors.h asm/x86-defns.h asm/msr-index.h:
-       [ -L asm ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 asm
+x86_emulate/%: x86_emulate ;
+
+asm:
+       [ -L $@ ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 $@
+
+asm/%: asm ;
 
 HOSTCFLAGS += $(CFLAGS_xeninclude) -I.