From 32793d792a687d38fb1a8d3c43ce5b17215030fb Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Tue, 26 Sep 2006 17:45:55 +0000 Subject: [PATCH] * changed tardiba config.in to generate "Target Hardware" Menu git-svn-id: svn+ssh://svn.opensde.net/home/users/karasz/x5/tardiba/trunk@17 471cc25b-571d-0410-8e29-1f4f9b506cef --- config.in | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/config.in b/config.in index 374ae94..c35b244 100644 --- a/config.in +++ b/config.in @@ -16,6 +16,41 @@ const SDECFG_TRG_TARDIBA ${target:-$SDECFG_TARGET} +# helper functions +get_target_choice() { + cd target/$SDECFG_TARGET/$1 + for x in $( ls -1 *.choice ); do + grep -H "^# *Description *: " $x | tr ' ' '_' | + sed -e 's,^[0-9][0-9]*-,,' \ + -e 's,\.choice:#_*Description_*:_, ,' + done +} + + +comment ' ' +comment '- Target Hardware' + +# Hardware Vendor +comment 'Vendor - Model - Product Number' +choice SDECFG_TRG_TARDIBA_HW_VENDOR none none 'No Hardware Vendor specified' \ + $( get_target_choice hardware ) + + +if [ "$SDECFG_TRG_TARDIBA_HW_VENDOR" != "none" ] ; then + +# Hardware Model +choice SDECFG_TRG_TARDIBA_HW_MODEL none none 'No Model specified' \ + $( get_target_choice hardware/$SDECFG_TRG_TARDIBA_HW_VENDOR ) + +# Hardware P/N +if [ "$SDECFG_TRG_TARDIBA_HW_MODEL" != "none" ] ; then + choice SDECFG_TRG_TARDIBA_HW_PN none none 'No P/N specified' \ + $( get_target_choice "hardware/$SDECFG_TRG_TARDIBA_HW_VENDOR/$SDECFG_TRG_TARDIBA_HW_MODEL" ) +fi + +fi + + if [ ! -s $cfgtmpdir/tardiba.config.in ]; then SDECFG_TRG_MNEMOSYNE=$( cat ./target/$SDECFG_TRG_TARDIBA/extends ) if ! perl ./target/$SDECFG_TRG_MNEMOSYNE/mnemosyne.pl "./target/$SDECFG_TRG_TARDIBA/pkgsel" TRG_TARDIBA \ @@ -26,6 +61,8 @@ if [ ! -s $cfgtmpdir/tardiba.config.in ]; then fi if [ -s $cfgtmpdir/tardiba.config.in ]; then + comment ' ' + comment '- Target Options' . $cfgtmpdir/tardiba.rules.in . $cfgtmpdir/tardiba.config.in else