From edb9d7008c680768de29a7615b7fe47ffe6d8612 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 6 Jul 2000 20:10:00 +0000 Subject: Patch rtems-rc-20000705-1.diff from Ralf Corsepius . CVS: ---------------------------------------------------------------------- CVS: Enter Log. Lines beginning with `CVS:' are removed automatically CVS: CVS: Committing in . CVS: CVS: Modified Files: CVS: c/src/tests/libtests/termios/init.c CVS: ---------------------------------------------------------------------- --- tools/update/cipolish | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'tools/update/cipolish') diff --git a/tools/update/cipolish b/tools/update/cipolish index dd3bb8084f..94cf946b6e 100755 --- a/tools/update/cipolish +++ b/tools/update/cipolish @@ -16,6 +16,7 @@ use strict ; my @vars = () ; my @buffer = () ; +my %var_ ; # find relative up-path to VERSION my $rtems_cfg = &find_file(".","VERSION"); @@ -129,8 +130,8 @@ while ( <> ) { if ( /^[\s]*(RTEMS_ENABLE_LIBCDIR).*$/o ) { - if ( ( not defined $main::var_RTEMS_PROG_CC_FOR_TARGET ) - and ( not defined $main::var_RTEMS_PROG_CXX_FOR_TARGET ) + if ( ( not variable_seen( "RTEMS_PROG_CC_FOR_TARGET" ) ) + and ( not variable_seen( "RTEMS_PROG_CXX_FOR_TARGET" ) ) ) { push @tbuf, "$_" ; @@ -220,20 +221,27 @@ sub find_root() die "Can't find VERSION\n" ; } -sub define_variable +sub variable_seen($) { - my ($name,$value) = @_ ; + my $label = "$_[0]" ; + my $res = defined $var_{"$label"}; +#print STDERR "SEEN: $label ->$res<\n" ; + return $res ; +} + +sub define_variable($$) +{ + my ($label,@value) = @_ ; - if ( not defined ${"var_$name"} ) + if ( not variable_seen("$label") ) { -# print STDERR "DEFINING $name = $value\n" ; - push @vars, "$name" ; - ${"var_$name"} = "$value" ; +# print STDERR "DEFINING $label\n" ; + push @vars, "$label" ; } - else + + foreach my $i ( @{value} ) { -# print STDERR "APPENDING <$name> <- <$value>\n" ; - ${"var_$name"} .= " $value" ; + push @{$var_{"$label"}}, $i ; } } -- cgit v1.2.3