From: Alexandre Duret-Lutz Date: Wed, 5 Feb 2003 19:19:14 +0000 (+0000) Subject: * automake.in (am_install_var): Simplify filtering of X-Git-Tag: Release-1-7-2b~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9f011055260537bf044ee30848e50fa01b85986;p=thirdparty%2Fautomake.git * automake.in (am_install_var): Simplify filtering of variable_loc_and_value_as_list_recursive's output. --- diff --git a/ChangeLog b/ChangeLog index 2182af941..6cd5be743 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-02-05 Alexandre Duret-Lutz + + * automake.in (am_install_var): Simplify filtering of + variable_loc_and_value_as_list_recursive's output. + 2003-02-04 Alexandre Duret-Lutz * m4/init.m4 (_AC_AM_CONFIG_HEADER_HOOK): Recompute diff --git a/automake.in b/automake.in index 59750b16d..2492c4a2d 100755 --- a/automake.in +++ b/automake.in @@ -8212,36 +8212,33 @@ sub am_install_var my $where = $var_location{$one_name}{$tmpcond}->clone; # Append actual contents of where_PRIMARY variable to - # result. + # @result, skipping @substitutions@. foreach my $locvals (&variable_loc_and_value_as_list_recursive ($one_name, 'all')) { - my ($loc, @values) = @$locvals; - my @nosubst = (); # @values without substitutions. - for my $rcurs (@values) + my ($loc, $value) = @$locvals; + # Skip configure substitutions. + if ($value =~ /^\@.*\@$/) { - # Skip configure substitutions. Possibly bogus. - if ($rcurs =~ /^\@.*\@$/) + if ($nodir_name eq 'EXTRA') { - if ($nodir_name eq 'EXTRA') - { - error ($where, - "`$one_name' contains configure substitution, " - . "but shouldn't"); - } - # Check here to make sure variables defined in - # configure.ac do not imply that EXTRA_PRIMARY - # must be defined. - elsif (! defined $configure_vars{$one_name}) - { - $require_extra = $one_name - if $do_require; - } - next; + error ($where, + "`$one_name' contains configure substitution, " + . "but shouldn't"); + } + # Check here to make sure variables defined in + # configure.ac do not imply that EXTRA_PRIMARY + # must be defined. + elsif (! defined $configure_vars{$one_name}) + { + $require_extra = $one_name + if $do_require; } - push @nosubst, $rcurs; } - push (@result, [$loc, @nosubst]) if @nosubst; + else + { + push (@result, $locvals); + } } # A blatant hack: we rewrite each _PROGRAMS primary to include # EXEEXT. @@ -8318,11 +8315,8 @@ sub am_install_var my %result = (); for my $pair (@result) { - my ($loc, @values) = @$pair; - for my $val (@values) - { - $result{$val} = $loc; - } + my ($loc, $val) = @$pair; + $result{$val} = $loc; } my @l = sort keys %result; return map { [$result{$_}->clone, $_] } @l;