Use -j hw.ncpu for build/install.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
This commit is contained in:
Bryan Drewery 2017-10-31 19:26:07 +00:00
parent 0b6c52b69f
commit 99980563da
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=325246

View file

@ -13,6 +13,7 @@ ODIR=/usr/obj/`pwd`
FDIR=${ODIR}/files
MNT=${ODIR}/_.mnt
RDIR=${ODIR}/_.result
: ${MAKE_JOBS:="-j$(sysctl -n hw.ncpu)"}
export ODIR MNT RDIR FDIR
@ -26,7 +27,7 @@ bw ( ) (
if [ $a -ne 0 ] ; then
exit 1
fi
make -j 4 buildworld \
make ${MAKE_JOBS} buildworld \
SRCCONF=${ODIR}/src.conf __MAKE_CONF=/dev/null \
> ${FDIR}/_.bw 2>&1
a=$?
@ -34,7 +35,7 @@ bw ( ) (
if [ $a -ne 0 ] ; then
exit 1
fi
make -j 4 buildkernel \
make ${MAKE_JOBS} buildkernel \
KERNCONF=GENERIC \
SRCCONF=${ODIR}/src.conf __MAKE_CONF=/dev/null \
> ${FDIR}/_.bk 2>&1
@ -53,7 +54,7 @@ iw ( ) (
mount /dev/md${MDUNIT} ${MNT}
cd ../../..
make installworld \
make ${MAKE_JOBS} installworld \
SRCCONF=${ODIR}/src.conf __MAKE_CONF=/dev/null \
DESTDIR=${MNT} \
> ${FDIR}/_.iw 2>&1
@ -73,7 +74,7 @@ iw ( ) (
exit 1
fi
cd ..
make installkernel \
make ${MAKE_JOBS} installkernel \
KERNCONF=GENERIC \
DESTDIR=${MNT} \
SRCCONF=${ODIR}/src.conf __MAKE_CONF=/dev/null \