summaryrefslogtreecommitdiff
path: root/net:foret
diff options
context:
space:
mode:
authorHugues Hiegel <hugues.hiegel@qosmos.com>2012-07-27 10:27:33 +0200
committerHugues Hiegel <hugues.hiegel@qosmos.com>2012-07-27 10:27:33 +0200
commit92a198adc4a3d4ca3c82a12b14890ad49f15b27a (patch)
tree22b59b58ac0fc8ed48fc8f5b2a4a704b8c43c453 /net:foret
parentae7db031815b30e035cfde9e2b6f592b1310eba3 (diff)
[Completion] new-style targets.
Diffstat (limited to 'net:foret')
-rw-r--r--net:foret/completion/_sdk-targets44
1 files changed, 30 insertions, 14 deletions
diff --git a/net:foret/completion/_sdk-targets b/net:foret/completion/_sdk-targets
index 10ed54c..a013881 100644
--- a/net:foret/completion/_sdk-targets
+++ b/net:foret/completion/_sdk-targets
@@ -3,30 +3,46 @@
_sdk-targets() {
_platforms () {
- local _targets_file=tools/sdk-targets.txt
- [ -f $_targets_file ] && awk '/^ [-_a-zA-Z0-9]+$/ { print $1 }' $_targets_file
+ local _targets_file
+
+ # New-style
+ _targets_file=tools/builder/target.sh
+ if [ -e $_targets_file ]
+ then
+ source $_targets_file
+ echo ${=AVAILABLE_TARGETS}
+ fi
+
+ # Old-style
+ _targets_file=tools/sdk-targets.txt
+ if [ -f $_targets_file ]
+ then
+ awk '/^ [-_a-zA-Z0-9]+$/ { print $1 }' $_targets_file
+ return
+ fi
}
_current_target () {
- [ -z "$TARGET" ] || \
- for i in ": Standard SDK"\
- "-PLUGIN: Plugin SDK"\
- "-APPSDK: Advanced Plugin SDK"\
- "-PERF: Performance tests" ;
+ local _targets_file=tools/builder/target.sh
+ [ ! -z "$TARGET" ] || return
- echo $TARGET$i
+ echo $TARGET":Standard SDK"
+
+ if [ -e $_targets_file ]
+ then
+ source $_targets_file
+ for i in ${=AVAILABLE_FLAVOUR}
+ echo ${TARGET}-$i:$i
+ for i in ${=AVAILABLE_OPTIONS}
+ echo ${TARGET}-$i:$i
+ fi
}
_other_targets () {
for target in $( _platforms ) ;
do
[ "$target" = "$TARGET" ] && continue;
- for i in ""\
- "-PLUGIN"\
- "-APPSDK"\
- "-PERF" ;
-
- echo $target$i
+ echo $target
done
}