Code: Select all
if [ "$( grep -c ^processor /proc/cpuinfo )" != 1 ]; then
export MAKEOPTS="-j$( expr $( grep -c ^processor /proc/cpuinfo ) / 2 )"
fi
Code: Select all
export MAKEFLAGS=${MAKEFLAGS:--j8}
Kakva su vaša iskustva, koristi li neko 'make' sa SBo skriptama?
Dodatak, ceo odgovor Matea Bernandinija:
on my work machine, as I use multiple jobs when I build packages, I've got this line in /etc/sbopkg/sbopkg.conf
export MAKEFLAGS=${MAKEFLAGS:--j8}
or you can pass it also when invoking it
sbopkg -i whatever:MAKEFLAGS=-j8
if not using sbopkg and doing a manual build
MAKEFLAGS=-j8 ./whatever.SlackBuild
if re/building official Slackware stuff the default number of jobs is already 7 in most cases (so I don't feel like changing it to 8), but if I wish to change it
NUMJOBS=-j8 ./whateverelse.SlackBuild
to find the available processors you can use nproc
MAKEFLAGS=-j$(nproc)
I never used it in /etc/profile or ~/.bashrc