summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimao Gomes Viana2019-11-04 23:26:37 +0100
committerSimao Gomes Viana2019-11-04 23:26:37 +0100
commit5c59798fc20f27c42e694d3a07aa27b8e0b1e067 (patch)
treebef99f88ebc4eea542004a83f62aa58a3c1ef4e2
parent7c191704d1f88ab074f1de63261c3e69a91dfa53 (diff)
downloadaur-5c59798fc20f27c42e694d3a07aa27b8e0b1e067.tar.gz
detect MAKEFLAGS -j, add it automatically if nonexist.
-rw-r--r--PKGBUILD6
1 files changed, 5 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 920168b63cc4..a86ff153709b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -58,7 +58,11 @@ build() {
cd "${_srcname}"
make CC=clang nitrous_defconfig
- make ${MAKEFLAGS} CC=clang bzImage modules
+ makeflags="${MAKEFLAGS}"
+ if [[ "$MAKEFLAGS" != *"-j"* ]]; then
+ makeflags="$makeflags -j$(nproc --all)"
+ fi
+ make ${makeflags} CC=clang bzImage modules
}
_package() {