kernel: bump 5.15 to 5.15.143
[openwrt/staging/jow.git] / include / prereq.mk
index 45c84e984c6f2942ac34b7b2a5153bcfcf8969ac..1039c5540c6a01a17d61851a7aa2f334d8eb1df4 100644 (file)
@@ -107,12 +107,14 @@ define SetupHostCommand
                        bin="$$$$$$$$(command -v "$$$$$$$${cmd%% *}")"; \
                        if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd" >/dev/null 2>/dev/null; then \
                                case "$$$$$$$$(ls -dl -- $(STAGING_DIR_HOST)/bin/$(strip $(1)))" in \
-                                       *" -> $$$$$$$$bin"*) \
+                                       "-"* | \
+                                       *" -> $$$$$$$$bin"* | \
+                                       *" -> "[!/]*) \
                                                [ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \
                                                ;; \
                                esac; \
                                ln -sf "$$$$$$$$bin" "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \
-                               exit 0; \
+                               exit 1; \
                        fi; \
                fi; \
        done; \