build: replace which with Bash command built-in
[openwrt/openwrt.git] / Makefile
index 4ccbc20b85803600206f6f1e365bbdf492915312..f1577ad4d143b9ece4536e0e8c0551a8484eb5dd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir
 
 world:
 
-DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep -E '\/usr' | head -n 1)
+DISTRO_PKG_CONFIG:=$(shell command -pv pkg-config | grep -E '\/usr' | head -n 1)
 export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
 
 ifneq ($(OPENWRT_BUILD),1)