]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
EFI: don't repeatedly replace symlinks
authorJan Beulich <jbeulich@suse.com>
Mon, 26 Nov 2018 14:43:22 +0000 (15:43 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 26 Nov 2018 14:43:22 +0000 (15:43 +0100)
Once created there's no point re-creating them on every incremental
make. This in particular prevents them from becoming root-owned during
e.g. "sudo make install-xen", but it also allows (during development)
to replace them there (instead of in common/efi/) by actual files with
perhaps slightly changed contents.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/Makefile

index e131cf4b71505932f6b7ece5995c2e0bc81c9373..7c77c304063d39f05a500c654e1381784000d388 100644 (file)
@@ -137,7 +137,9 @@ $(TARGET): delete-unfresh-files
        $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h
        [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
        [ -e arch/$(TARGET_ARCH)/efi ] && for f in boot.c runtime.c compat.c efi.h;\
-               do ln -nsf ../../../common/efi/$$f arch/$(TARGET_ARCH)/efi/; done;\
+               do test -r arch/$(TARGET_ARCH)/efi/$$f || \
+                  ln -nsf ../../../common/efi/$$f arch/$(TARGET_ARCH)/efi/; \
+               done; \
                true
        $(MAKE) -f $(BASEDIR)/Rules.mk -C include
        $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) asm-offsets.s