From 7153d8134a795b8026ca27863a063086301273ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 2 Aug 2017 14:45:36 +0200 Subject: [PATCH] build: dynamically choose number of jobs --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0a0d313..010619a 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ PACKAGE=pve-kernel-${KVNAME} HDRPACKAGE=pve-headers-${KVNAME} ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH) +NPROCS=$(shell nproc) # amd64/x86_64/x86 share the arch subdirectory in the kernel, 'x86' so we need # a mapping @@ -222,7 +223,7 @@ PVE_CONFIG_OPTS= \ cp ${KERNEL_CFG_ORG} ${KERNEL_SRC}/.config cd ${KERNEL_SRC}; ./scripts/config ${PVE_CONFIG_OPTS} cd ${KERNEL_SRC}; make oldconfig - cd ${KERNEL_SRC}; make KBUILD_BUILD_VERSION_TIMESTAMP="PVE ${KERNEL_VER}-${PKGREL} ($(CHANGELOG_DATE))" -j 8 + cd ${KERNEL_SRC}; make KBUILD_BUILD_VERSION_TIMESTAMP="PVE ${KERNEL_VER}-${PKGREL} (${CHANGELOG_DATE})" -j ${NPROCS} make -C ${KERNEL_SRC}/tools/perf prefix=/usr HAVE_CPLUS_DEMANGLE=1 NO_LIBPYTHON=1 NO_LIBPERL=1 NO_LIBCRYPTO=1 PYTHON=python2.7 make -C ${KERNEL_SRC}/tools/perf man touch $@