From 7b37faf011224eb78bc0add460e9c31a4ce1b519 Mon Sep 17 00:00:00 2001 From: Zero_Chaos Date: Thu, 24 Jan 2013 20:43:38 +0000 Subject: [PATCH] profile: fix MAKEOPTS for users that have not set them (only takes effect if not set in make.conf) --- profiles/pentoo/base/profile.bashrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/profiles/pentoo/base/profile.bashrc b/profiles/pentoo/base/profile.bashrc index cee17a3a8..b0e11daff 100644 --- a/profiles/pentoo/base/profile.bashrc +++ b/profiles/pentoo/base/profile.bashrc @@ -1 +1,6 @@ #if [[ $CATEGORY/$PN == sys-auth/polkit ]] ; then FEATURES=${FEATURES/multilib-strict/} ; fi +local CORES="$(grep -c ^proc /proc/cpuinfo)" +echo ${MAKEOPTS} | grep -q -e -j || export MAKEOPTS="-j${CORES} -l${CORES}" + +#by the time this is parsed, EMERGE_DEFAULT_OPTS are already applied, this file is too late +#echo ${EMERGE_DEFAULT_OPTS} | grep -q jobs || export EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --jobs=${CORES} --load-average=${CORES}"