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