From 6d3405b4161a9cf5f1e16ebeb8426dadb48dbe71 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 28 Aug 2009 22:56:27 +0200 Subject: core: allow selecting parallel builds The value of CONFIG_ADK_MAKE_JOBS is being passed to make via the option '-j', in order to have it run multiple jobs simultaneously. This is done for all kernel builds, and per default for each package using the default BUILD_STYLE of 'auto', unless the package makefile defines PKG_NOPARALLEL to a non-empty string. --- mk/pkg-bottom.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'mk/pkg-bottom.mk') diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk index 36a998a82..05c123ed2 100644 --- a/mk/pkg-bottom.mk +++ b/mk/pkg-bottom.mk @@ -70,6 +70,13 @@ endif @${MAKE} post-configure $(MAKE_TRACE) touch $@ +# do a parallel build if requested && package doesn't force disable it +ifeq (${PKG_BUILD_PARALLEL},y) +ifeq ($(strip ${PKG_NOPARALLEL}),) +MAKE_FLAGS+= -j${ADK_MAKE_JOBS} +endif +endif + pre-build: do-build: post-build: @@ -78,7 +85,7 @@ ${_BUILD_COOKIE}: ${_CONFIGURE_COOKIE} @$(CMD_TRACE) "compiling... " ifneq ($(filter auto,${BUILD_STYLE}),) cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ - ${MAKEJOBS} ${MAKE_FLAGS} ${ALL_TARGET} $(MAKE_TRACE) + ${MAKE_FLAGS} ${ALL_TARGET} $(MAKE_TRACE) else ifneq ($(filter manual,${BUILD_STYLE}),) env ${MAKE_ENV} ${MAKE} do-build $(MAKE_TRACE) else ifeq ($(strip ${BUILD_STYLE}),) -- cgit v1.2.3