Allow users to set MAKEFLAGS black-listed packages.
This commit is contained in:
parent
b61a4a9ab0
commit
d68d2c1012
2 changed files with 15 additions and 11 deletions
|
@ -12,6 +12,10 @@
|
|||
# instead of just set to null.
|
||||
MAKEFLAGS="-j3"
|
||||
|
||||
#--- List of packages that don't support well MAKEFLAGS.
|
||||
# This list may be different for you.
|
||||
BLACK_LIST="dejagnu gettext groff"
|
||||
|
||||
#--- Default optimization mode
|
||||
# This mode is overridden by definitions in opt_override;
|
||||
# in this way, packages can be tuned independently. For example,
|
||||
|
|
|
@ -19,8 +19,9 @@ validate_opt_settings() { # Show optimize setting and wait user agreeme
|
|||
echo -e "asking for support.${OFF}\n"
|
||||
|
||||
echo -e "MAKEFLAGS: ${L_arrow}${BOLD}${MAKEFLAGS}${OFF}${R_arrow}"
|
||||
[[ "$MAKEFLAGS" = "unset" ]] && echo
|
||||
[[ "$MAKEFLAGS" != "unset" ]] && \
|
||||
echo -e "DejaGNU, Gettext, and Groff will not use MAKEFLAGS\n"
|
||||
echo -e "BLACK_LIST: ${L_arrow}${BOLD}${BLACK_LIST}${OFF}${R_arrow}\n"
|
||||
|
||||
echo -e "DEF_OPT_MODE: ${L_arrow}${BOLD}${DEF_OPT_MODE}${OFF}${R_arrow}\n"
|
||||
|
||||
|
@ -72,20 +73,19 @@ EOF
|
|||
wrt_makeflags() { # Apply MAKEFLAGS to build
|
||||
#----------------------------------#
|
||||
local pkg=$1
|
||||
local MKF
|
||||
|
||||
case $pkg in
|
||||
dejagnu | gettext | groff ) # Don't support well -jX for now
|
||||
;;
|
||||
*)
|
||||
if [[ "$MAKEFLAGS" != "unset" ]]; then
|
||||
if [[ "$BLACK_LIST" =~ "$pkg" ]]; then
|
||||
MKF=unset
|
||||
else
|
||||
MKF=$MAKEFLAGS
|
||||
fi
|
||||
|
||||
if [[ "$MKF" != "unset" ]]; then
|
||||
(
|
||||
cat << EOF
|
||||
@echo "export MAKEFLAGS=\"$MAKEFLAGS\"" >> envars
|
||||
EOF
|
||||
) >> $MKFILE.tmp
|
||||
else
|
||||
continue
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
|
Reference in a new issue