optimize_functions: change wrt_makeflags parameters

In order to be able to pass NINJAJOBS=1 when optimize is 0, we
add two paramters to this function. The three parameters are
then:
- the name of the package (tested against opt_override)
- MAKEFLAGS for this package
- NINJAJOBS for this package
This commit is contained in:
Pierre Labastie 2022-05-07 19:07:15 +02:00
parent 28ef51b817
commit 86debb00ea

View file

@ -70,19 +70,18 @@ EOF
wrt_makeflags() { # Apply MAKEFLAGS to build
#----------------------------------#
local pkg=$1
local MKF
local MKF=$2
local NJJ=$3
if [[ "$BLACK_LIST" =~ ${pkg} ]]; then
MKF=unset
else
MKF=$JH_MAKEFLAGS
MKF="-j1"
NJJ="1"
fi
if [[ "$MKF" != "unset" ]]; then
(
cat << EOF
@echo "export MAKEFLAGS=\"$JH_MAKEFLAGS\"" >> envars
@echo "export MAKEFLAGS=\"$MKF\"" >> envars
@echo "export NINJAJOBS=\"$NJJ\"" >> envars
EOF
) >> $MKFILE.tmp
fi
}