X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/3031854f724c406ca3756a02cad901fad622fdb0..d59e028829fab21384fcd5f9d86199d679759971:/include/package.mk diff --git a/include/package.mk b/include/package.mk index d5d39d8f3..da8de5ccc 100644 --- a/include/package.mk +++ b/include/package.mk @@ -30,7 +30,9 @@ include $(INCLUDE_DIR)/package-bin.mk include $(INCLUDE_DIR)/autotools.mk override MAKEFLAGS= -export CONFIG_SITE:=$(INCLUDE_DIR)/site/$(REAL_GNU_TARGET_NAME) +export CONFIG_SITE:=$(INCLUDE_DIR)/site/$(patsubst %gnueabi,%,$(REAL_GNU_TARGET_NAME)) +CUR_MAKEFILE:=$(filter-out Makefile,$(firstword $(MAKEFILE_LIST))) +SUBMAKE:=$(NO_TRACE_MAKE) $(if $(CUR_MAKEFILE),-f $(CUR_MAKEFILE)) ifeq ($(DUMP)$(filter prereq clean refresh update,$(MAKECMDGOALS)),) ifneq ($(if $(QUILT),,$(CONFIG_AUTOREBUILD)),) @@ -81,12 +83,12 @@ define Build/DefaultTargets touch $$@ $(STAMP_INSTALLED): $(STAMP_BUILT) - $(NO_TRACE_MAKE) clean-staging + $(SUBMAKE) -j1 clean-staging rm -rf $(TMP_DIR)/stage-$(PKG_NAME) mkdir -p $(TMP_DIR)/stage-$(PKG_NAME)/host $(STAGING_DIR)/packages $(STAGING_DIR_HOST)/packages $(call Build/InstallDev,$(TMP_DIR)/stage-$(PKG_NAME),$(TMP_DIR)/stage-$(PKG_NAME)/host) if [ -d $(TMP_DIR)/stage-$(PKG_NAME) ]; then \ - (cd $(TMP_DIR)/stage-$(PKG_NAME); find > $(STAGING_DIR)/packages/$(PKG_NAME).list); \ + (cd $(TMP_DIR)/stage-$(PKG_NAME); find ./ > $(STAGING_DIR)/packages/$(PKG_NAME).list); \ $(CP) $(TMP_DIR)/stage-$(PKG_NAME)/* $(STAGING_DIR)/; \ fi rm -rf $(TMP_DIR)/stage-$(PKG_NAME)