comparison 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
comparison
equal deleted inserted replaced
941:6b0b2f6dbb20 942:042c178ebac5
36 echo "Error: feature $1 not known" 1>&2 36 echo "Error: feature $1 not known" 1>&2
37 exit 1 37 exit 1
38 fi 38 fi
39 # looks good, proceed 39 # looks good, proceed
40 . "cfgmagic/feature.$1" 40 . "cfgmagic/feature.$1"
41 }
42
43 allow_target_feature() {
44 while [ $# != 0 ]
45 do
46 case "$target_feature_list" in
47 *" $1 "* | *" $1")
48 ;;
49 *)
50 target_feature_list="$target_feature_list $1"
51 ;;
52 esac
53 shift
54 done
55 }
56
57 check_target_feature() {
58 while [ $# != 0 ]
59 do
60 case "$target_feature_list" in
61 *" $1 "* | *" $1" | *" OVERRIDE "* | *" OVERRIDE")
62 ;;
63 *)
64 echo "Error: feature $1 not supported on target $TARGET" 1>&2
65 exit 1
66 ;;
67 esac
68 shift
69 done
41 } 70 }
42 71
43 export_to_c() { 72 export_to_c() {
44 while [ $# != 0 ] 73 while [ $# != 0 ]
45 do 74 do