This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
MahiroOS-jhalfs/optimize/optimize_functions

47 lines
891 B
Text
Raw Normal View History

2006-05-06 12:35:19 +02:00
#!/bin/bash
# $Id$
set +e
#----------------------------------#
wrt_optimize() { # Apply pkg specific opt's to build
#----------------------------------#
local pkg=$1
local optLvl optVal OPT_VAR
optLvl=`awk -v pkg="$pkg" '$1 == pkg { print $2 }' $JHALFSDIR/opt_override`
if [[ "$optLvl" = "" ]] ; then
optLvl=$DEF_OPT_LVL;
fi
for OPT_VAR in $ACTIVE_OPT_VARS ; do
eval optVal=\$${OPT_VAR}_$optLvl
if [[ "$optVal" != "unset" ]]; then
(
cat << EOF
@echo "export $OPT_VAR=\"$optVal\"" >> envars
EOF
) >> $MKFILE.tmp
else
continue
fi
done
2006-05-06 13:06:07 +02:00
}
#----------------------------------#
wrt_makeflags() { # Apply MAKEFLAGS to build
#----------------------------------#
if [[ "$MAKEFLAGS" != "unset" ]]; then
(
cat << EOF
@echo "export MAKEFLAGS=\"$MAKEFLAGS\"" >> envars
EOF
) >> $MKFILE.tmp
else
continue
fi
}