X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=Makefile;h=09db75c5508d49d1bc10f66007149136ca0bcf7c;hb=HEAD;hp=39ab3ae4a52e5626dd45a3cd53903cebab05e34f;hpb=db34b93331e91bdb2cbc15d17632aaaab7217a6d;p=openwrt%2Fstaging%2Fhauke.git diff --git a/Makefile b/Makefile index 39ab3ae4a5..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 which -a 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); @@ -51,7 +53,7 @@ printdb: prepare: $(target/stamp-compile) _clean: FORCE - rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES) $(BUILD_LOG_DIR) $(TOPDIR)/staging_dir/packages + rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES) $(TOPDIR)/staging_dir/packages clean: _clean rm -rf $(BUILD_LOG_DIR)