X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=include%2Fprereq.mk;h=0033535e782a71fd7f15aae96f832f957d2fa32e;hb=88204bfa82f982a986d2aa3e166a4c5946040308;hp=23d5ded9b272b59e0c7700ed32ff4dd22b23dd22;hpb=87d489f67a35968242cd4f192dc363dc87056844;p=openwrt%2Fstaging%2Fjow.git diff --git a/include/prereq.mk b/include/prereq.mk index 23d5ded9b2..0033535e78 100644 --- a/include/prereq.mk +++ b/include/prereq.mk @@ -49,7 +49,7 @@ endef define RequireCommand define Require/$(1) - which $(1) + command -v $(1) endef $$(eval $$(call Require,$(1),$(2))) @@ -103,7 +103,7 @@ define SetupHostCommand $(call QuoteHostCommand,$(11)) $(call QuoteHostCommand,$(12)); do \ if [ -n "$$$$$$$$cmd" ]; then \ bin="$$$$$$$$(PATH="$(subst $(space),:,$(filter-out $(STAGING_DIR_HOST)/%,$(subst :,$(space),$(PATH))))" \ - which "$$$$$$$${cmd%% *}")"; \ + command -v "$$$$$$$${cmd%% *}")"; \ if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd" >/dev/null 2>/dev/null; then \ mkdir -p "$(STAGING_DIR_HOST)/bin"; \ ln -sf "$$$$$$$$bin" "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \