X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/c7ee63dd761a6cf7f863b00181aaa2002784f06b..0a2b2965cd687a2be744552b09f4f5cf2fde4c0f:/include/package.mk diff --git a/include/package.mk b/include/package.mk index fd53123f6..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),$(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