X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/9d3a35f2c71eb2730ae2b72d0474e116609509c9..bcb63b9e02655fcf61541edfd053780fce0c67dd:/include/package.mk diff --git a/include/package.mk b/include/package.mk index a07d875f8..2d3a5d096 100644 --- a/include/package.mk +++ b/include/package.mk @@ -11,7 +11,13 @@ PKG_BUILD_DIR ?= $(BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION)) PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install PKG_MD5SUM ?= unknown PKG_BUILD_PARALLEL ?= -PKG_JOBS ?= $(if $(PKG_BUILD_PARALLEL)$(CONFIG_PKG_DEFAULT_PARALLEL),$(if $(CONFIG_PKG_BUILD_PARALLEL),-j$(CONFIG_PKG_BUILD_JOBS))) + +ifeq ($(strip $(PKG_BUILD_PARALLEL)),0) +PKG_JOBS?=-j1 +else +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 include $(INCLUDE_DIR)/host.mk