X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/b8885f1f93a2d6cf32afdf2e59f87a837a0d4de7..3e3c12b84be7e7a75c08c5e436f9065e71cdff16:/rules.mk diff --git a/rules.mk b/rules.mk index 84163ba22..d52539f3f 100644 --- a/rules.mk +++ b/rules.mk @@ -8,7 +8,7 @@ -include $(TOPDIR)/.config include $(TOPDIR)/include/verbose.mk -export SHELL=/bin/bash +export SHELL=/usr/bin/env bash -c '. $(TOPDIR)/include/shell.sh; eval "$$2"' -- ARCH:=$(strip $(subst ",, $(CONFIG_ARCH))) TARGET_OPTIMIZATION:=$(strip $(subst ",, $(CONFIG_TARGET_OPTIMIZATION))) @@ -29,7 +29,7 @@ BIN_DIR:=$(TOPDIR)/bin PACKAGE_DIR:=$(BIN_DIR)/packages IPKG_TARGET_DIR:=$(PACKAGE_DIR) BUILD_DIR:=$(TOPDIR)/build_$(ARCH) -TMP_DIR:=$(BUILD_DIR)/tmp +TMP_DIR:=$(TOPDIR)/tmp STAMP_DIR:=$(BUILD_DIR)/stamp TARGET_DIR:=$(BUILD_DIR)/root IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/ipkg @@ -83,6 +83,7 @@ RSTRIP:= \ # where to build (and put) .ipk packages IPKG:= \ + PATH="$(STAGING_DIR)/bin:$(PATH)" \ IPKG_TMP=$(BUILD_DIR)/tmp \ IPKG_INSTROOT=$(TARGET_DIR) \ IPKG_CONF_DIR=$(STAGING_DIR)/etc \ @@ -104,11 +105,21 @@ ifneq ($(CONFIG_LARGEFILE),y) endif ifeq ($(CONFIG_TAR_VERBOSITY),y) - TAR_OPTIONS=-xvf + TAR_OPTIONS:=-xvf - else - TAR_OPTIONS=-xf + TAR_OPTIONS:=-xf - endif +define shvar +V_$(subst .,_,$(subst -,_,$(subst /,_,$(1)))) +endef + +define shexport +$(call shvar,$(1))=$$(call $(1)) +export $(call shvar,$(1)) +endef + + all: FORCE: ; .PHONY: FORCE