X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/6c7ebb0443d971ee24084605a031771665dfe81b..99a212a2565ed4c256d86645d14ff7064f284f2d:/include/package.mk?ds=sidebyside diff --git a/include/package.mk b/include/package.mk index aed7dd2b8..06f3a839c 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 @@ -132,8 +132,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 $$@