]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* automake.in (am_install_var): Simplify filtering of
authorAlexandre Duret-Lutz <adl@gnu.org>
Wed, 5 Feb 2003 19:19:14 +0000 (19:19 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Wed, 5 Feb 2003 19:19:14 +0000 (19:19 +0000)
variable_loc_and_value_as_list_recursive's output.

ChangeLog
automake.in

index 2182af941bd63ce3f269552435d10f0fdf9e4de7..6cd5be74318dd7aba564020636c4765562f85736 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-05  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       * automake.in (am_install_var): Simplify filtering of
+       variable_loc_and_value_as_list_recursive's output.
+
 2003-02-04  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * m4/init.m4 (_AC_AM_CONFIG_HEADER_HOOK): Recompute
index 59750b16df79a75317afbf85a6719252244bac83..2492c4a2d57973ada64927b18708a9dc1e5da2f2 100755 (executable)
@@ -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;