prereq-build: replace relative symlinks only if broken
[openwrt/staging/hauke.git] / include / prereq.mk
index c888268d852074859bd9844171b7d75adc5d521a..546f36b8e3e8a54628870bf2c90602580b9718c0 100644 (file)
@@ -114,6 +114,11 @@ define SetupHostCommand
                                                find "$(STAGING_DIR_HOST)/stamp" | grep $(strip $(1)) && \
                                                [ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \
                                                ;; \
+                                       *" -> /"*) \
+                                               ;; \
+                                       *" -> "*) \
+                                               [ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \
+                                               ;; \
                                esac; \
                                ln -sf "$$$$$$$$bin" "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \
                                exit 1; \