FreeCalypso > hg > freecalypso-sw
diff gsm-fw/cfgmagic/functions @ 942:042c178ebac5
gsm-fw/cfgmagic: logic for target-dependent features streamlined a little
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Sun, 01 Nov 2015 03:05:06 +0000 |
parents | 11b6ca57a079 |
children |
line wrap: on
line diff
--- a/gsm-fw/cfgmagic/functions Sun Nov 01 00:07:09 2015 +0000 +++ b/gsm-fw/cfgmagic/functions Sun Nov 01 03:05:06 2015 +0000 @@ -40,6 +40,35 @@ . "cfgmagic/feature.$1" } +allow_target_feature() { + while [ $# != 0 ] + do + case "$target_feature_list" in + *" $1 "* | *" $1") + ;; + *) + target_feature_list="$target_feature_list $1" + ;; + esac + shift + done +} + +check_target_feature() { + while [ $# != 0 ] + do + case "$target_feature_list" in + *" $1 "* | *" $1" | *" OVERRIDE "* | *" OVERRIDE") + ;; + *) + echo "Error: feature $1 not supported on target $TARGET" 1>&2 + exit 1 + ;; + esac + shift + done +} + export_to_c() { while [ $# != 0 ] do