X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/9a0f997bac85d8f234238162f3cee4524b6f989c..ee549a2ed04164407f4f897be3bf545f32579c5c:/src/scripts/drivers-Makefile?ds=sidebyside diff --git a/src/scripts/drivers-Makefile b/src/scripts/drivers-Makefile index 085eedbda..4b2bf245b 100755 --- a/src/scripts/drivers-Makefile +++ b/src/scripts/drivers-Makefile @@ -6,6 +6,7 @@ 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. @@ -97,19 +98,18 @@ fi 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 } @@ -117,9 +117,9 @@ want_not_disabled() { 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.