X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fstaging%2Fnbd.git;a=blobdiff_plain;f=Makefile;h=09db75c5508d49d1bc10f66007149136ca0bcf7c;hp=3ac110367df48105695af2ff80341ba5f7c74e85;hb=HEAD;hpb=aeaa816cd2bd22de165c71a41d8d198a9235e971 diff --git a/Makefile b/Makefile index 3ac110367d..9bdb03a443 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,10 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir world: -DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep -E '\/usr' | head -n 1) -export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH) +DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep -e '/usr' -e '/nix/store' -m 1) + +export ORIG_PATH:=$(if $(ORIG_PATH),$(ORIG_PATH),$(PATH)) +export PATH:=$(if $(STAGING_DIR),$(abspath $(STAGING_DIR)/../host/bin),$(TOPDIR)/staging_dir/host/bin):$(PATH) ifneq ($(OPENWRT_BUILD),1) _SINGLE=export MAKEFLAGS=$(space);