tdefault.mk: Make NPROC overridable - mkports - recipes for building multiple softwares with mk(1)
(HTM) git clone git://z3bra.org/mkports
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit 52bea69308b800869221c9dddb8ff64c2d55b74c
(DIR) parent ee11f03a614df106c9b8de4b29d127ee1432323e
(HTM) Author: root <root@doom.z3bra.org>
Date: Wed, 31 May 2017 06:11:39 +0000
default.mk: Make NPROC overridable
By putting -j${NPROC} outside the ${MAKEFLAGS} variable, it gets
possible to override it in recipes
Diffstat:
M default.mk | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/default.mk b/default.mk
t@@ -17,17 +17,17 @@ $tarball:Q:
# recipe trying to follow the most common pattern in software
# building
# If it doesn't work, simply override it on a per pack basis
-build:QV: fetch patch
+build:V: fetch patch
cd $WORK/$pkg-$ver
test -f configure && ./configure $CONFIGURE
- make CC="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ${MAKEFLAGS}
+ make -j${NPROC} CC="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ${MAKEFLAGS}
# install the pack to a .rootfs directory
# this is where the "pack" target will chdir to create the pack
install:QV: build
mkdir -p $destdir
cd $WORK/$pkg-$ver
- make ${MAKEFLAGS} DESTDIR=$destdir install
+ make -j${NPROC} ${MAKEFLAGS} DESTDIR=$destdir install
cleanup:V: install
cd $destdir
t@@ -84,7 +84,7 @@ $WORK/$archive:Q:
if [ -n "$url" ]; then
mkdir -p $WORK
cd $WORK
- curl -k -LO# $url > $archive
+ curl -k -L# $url > $archive
fi
# delete everything but the pack