class=${CLASS:?}
classdef=${CLASSDEF:?}
drnames="${DRNAMES:?}"
+egrep="${EGREP:?}"
# We turn the configure-built build-$foo/$class/Makefile.predynamic into Makefile.
# This is used for router and transport drivers, called from scripts/Configure-Makefile.
want_dynamic() {
local dyn_name="${1#_}"
local re="(${classdef}|EXPERIMENTAL)_${dyn_name}[ $tab]*=[ $tab]*2"
- #XXX Solaris does not support -E on grep. Must use egrep.
- env | grep -E -q "^$re"
+ env | ${egrep} -q "^$re"
if [ $? -eq 0 ]; then return 0; fi
- grep -E -q "^[ $tab]*$re" "$defs_source"
+ ${egrep} -q "^[ $tab]*$re" "$defs_source"
}
want_not_disabled() {
local want_name="${1#_}"
- [ "$local_want_name" = "$1" ] && return 0;
+ [ "$want_name" = "$1" ] && return 1;
local re="DISABLED_${want_name}[ $tab]*=[ $tab]*."
- env | grep -E -q "^$re"
+ env | ${egrep} -q "^$re"
[ $? -ne 0 ] && return 0
- grep -E -q "^[ $tab]*$re" "$defs_source"
+ ${egrep} -q "^[ $tab]*$re" "$defs_source"
[ $? -ne 0 ] && return 0
return 1
}
want_at_all() {
local want_name="$1"
local re="(${classdef}|EXPERIMENTAL)_${want_name}[ $tab]*=[ $tab]*."
- env | grep -E -q "^$re"
+ env | ${egrep} -q "^$re"
if [ $? -eq 0 ]; then return 0; fi
- grep -E -q "^[ $tab]*$re" "$defs_source"
+ ${egrep} -q "^[ $tab]*$re" "$defs_source"
}
# The values of these variables will be emitted into the Makefile.