build: do not overwrite already existing host commands
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 16 Sep 2015 12:38:16 +0000 (12:38 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 16 Sep 2015 12:38:16 +0000 (12:38 +0000)
This prevents a later prereq check from overwriting the installed tar
binary.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46982 3c298f89-4303-0410-b956-a3cf2f4a3e73

include/prereq.mk

index 33ac278..6cb590e 100644 (file)
@@ -86,6 +86,7 @@ endef
 # 3+: candidates
 define SetupHostCommand
   define Require/$(1)
+       [ -f "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0; \
        for cmd in $(call QuoteHostCommand,$(3)) $(call QuoteHostCommand,$(4)) \
                   $(call QuoteHostCommand,$(5)) $(call QuoteHostCommand,$(6)) \
                   $(call QuoteHostCommand,$(7)) $(call QuoteHostCommand,$(8)) \