X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/6c7ebb0443d971ee24084605a031771665dfe81b..7a158c5f4037cf77126bf0e8d03310934da14c10:/include/package.mk?ds=sidebyside diff --git a/include/package.mk b/include/package.mk index aed7dd2b8..580774134 100644 --- a/include/package.mk +++ b/include/package.mk @@ -15,8 +15,8 @@ PKG_BUILD_PARALLEL ?= ifeq ($(strip $(PKG_BUILD_PARALLEL)),0) PKG_JOBS?=-j1 else -PKG_JOBS?=-j$(if $(PKG_BUILD_PARALLEL)$(CONFIG_PKG_DEFAULT_PARALLEL),\ - $(if $(CONFIG_PKG_BUILD_PARALLEL),$(CONFIG_PKG_BUILD_JOBS),1)) +PKG_JOBS?=$(if $(PKG_BUILD_PARALLEL)$(CONFIG_PKG_DEFAULT_PARALLEL),\ + $(if $(CONFIG_PKG_BUILD_PARALLEL),-j$(CONFIG_PKG_BUILD_JOBS),-j1),-j1) endif include $(INCLUDE_DIR)/prereq.mk @@ -75,10 +75,6 @@ define Download/default MD5SUM:=$(PKG_MD5SUM) endef -define sep - -endef - define Build/Exports/Default $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR)/usr/share/aclocal $$(STAGING_DIR)/usr/share/aclocal-* $$(STAGING_DIR)/host/share/aclocal $$(STAGING_DIR)/host/share/aclocal-*),-I $$(p)) $(1) : export STAGING_PREFIX=$$(STAGING_DIR)/usr @@ -132,8 +128,11 @@ define Build/DefaultTargets $(call $(hook),$(TMP_DIR)/stage-$(PKG_NAME),$(TMP_DIR)/stage-$(PKG_NAME)/host)$(sep)\ ) if [ -d $(TMP_DIR)/stage-$(PKG_NAME) ]; then \ - (cd $(TMP_DIR)/stage-$(PKG_NAME); find ./ > $(STAGING_DIR)/packages/$(STAGING_FILES_LIST)); \ - $(CP) $(TMP_DIR)/stage-$(PKG_NAME)/* $(STAGING_DIR)/; \ + (cd $(TMP_DIR)/stage-$(PKG_NAME); find ./ > $(TMP_DIR)/stage-$(PKG_NAME).files); \ + $(call locked, \ + mv $(TMP_DIR)/stage-$(PKG_NAME).files $(STAGING_DIR)/packages/$(STAGING_FILES_LIST) && \ + $(CP) $(TMP_DIR)/stage-$(PKG_NAME)/* $(STAGING_DIR)/; \ + ,staging-dir); \ fi rm -rf $(TMP_DIR)/stage-$(PKG_NAME) touch $$@