]> sourceware.org Git - automake.git/commitdiff
* automake.in (am_install_var): Use `next' instead of `if' on the
authorAkim Demaille <akim@epita.fr>
Tue, 8 May 2001 12:33:11 +0000 (12:33 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 8 May 2001 12:33:11 +0000 (12:33 +0000)
body of $X loop.

ChangeLog
automake.in

index 945593a57dfc4b741b2d93a3e2fec504b1b18ade..0fd686ac9444dca6dd0a41079b420fa4fd274987 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-08  Akim Demaille  <akim@epita.fr>
+
+       * automake.in (am_install_var): Use `next' instead of `if' on the
+       body of $X loop.
+
 2001-05-08  Akim Demaille  <akim@epita.fr>
 
        * automake.in (Language): Add attributes `lder' and `ld'.
index 4519d89754574893938dce9602963e24a44922a9..175079c1d38884227ed67fc1fb79a67b7962dc77 100755 (executable)
@@ -7257,137 +7257,137 @@ sub am_install_var
     foreach my $X (sort keys %valid)
     {
        my $one_name = $X . '_' . $primary;
-       if (&variable_defined ($one_name))
-       {
-           my $strip_subdir = 1;
-           # If subdir prefix should be preserved, do so.
-           if ($X =~ /^nobase_/)
-           {
-               $strip_subdir = 0;
-               $X =~ s/^nobase_//;
-           }
+       next
+         unless (&variable_defined ($one_name));
 
-           my $nodir_name = $X;
-           # If files should be distributed, do so.
-           my $dist_p = 0;
-           if ($can_dist)
-           {
-               $dist_p = (($default_dist && $one_name !~ /^nodist_/)
-                          || (! $default_dist && $one_name =~ /^dist_/));
-               $nodir_name =~ s/^(dist|nodist)_//;
-           }
+       my $strip_subdir = 1;
+       # If subdir prefix should be preserved, do so.
+       if ($X =~ /^nobase_/)
+         {
+           $strip_subdir = 0;
+           $X =~ s/^nobase_//;
+         }
 
-           # Append actual contents of where_PRIMARY variable to
-           # result.
-           foreach my $rcurs (&variable_value_as_list ($one_name, 'all'))
-           {
-               # Skip configure substitutions.  Possibly bogus.
-               if ($rcurs =~ /^\@.*\@$/)
-               {
-                   if ($X eq 'EXTRA')
-                   {
-                       if (! $warned_about_extra)
-                       {
-                           $warned_about_extra = 1;
-                           &am_line_error ($one_name,
-                                           "`$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;
-                   }
+       my $nodir_name = $X;
+       # If files should be distributed, do so.
+       my $dist_p = 0;
+       if ($can_dist)
+         {
+           $dist_p = (($default_dist && $one_name !~ /^nodist_/)
+                      || (! $default_dist && $one_name =~ /^dist_/));
+           $nodir_name =~ s/^(dist|nodist)_//;
+         }
 
-                   next;
-               }
+       # Append actual contents of where_PRIMARY variable to
+       # result.
+       foreach my $rcurs (&variable_value_as_list ($one_name, 'all'))
+         {
+           # Skip configure substitutions.  Possibly bogus.
+           if ($rcurs =~ /^\@.*\@$/)
+             {
+               if ($X eq 'EXTRA')
+                 {
+                   if (! $warned_about_extra)
+                     {
+                       $warned_about_extra = 1;
+                       &am_line_error ($one_name,
+                                       "`$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 (@result, $rcurs);
-           }
+               next;
+             }
 
-           # A blatant hack: we rewrite each _PROGRAMS primary to
-           # include EXEEXT when in Cygwin32 mode.
-           if ($primary eq 'PROGRAMS')
-           {
-               my @conds = &variable_conditions ($one_name);
+           push (@result, $rcurs);
+         }
 
-               my @condvals;
-               foreach my $cond (@conds)
+       # A blatant hack: we rewrite each _PROGRAMS primary to
+       # include EXEEXT when in Cygwin32 mode.
+       if ($primary eq 'PROGRAMS')
+         {
+           my @conds = &variable_conditions ($one_name);
+
+           my @condvals;
+           foreach my $cond (@conds)
+             {
+               my @one_binlist = ();
+               my @condval = &variable_value_as_list ($one_name,
+                                                      $cond);
+               foreach my $rcurs (@condval)
                  {
-                   my @one_binlist = ();
-                   my @condval = &variable_value_as_list ($one_name,
-                                                          $cond);
-                   foreach my $rcurs (@condval)
+                   if ($rcurs =~ /\./ || $rcurs =~ /^\@.*\@$/)
                      {
-                       if ($rcurs =~ /\./ || $rcurs =~ /^\@.*\@$/)
-                         {
-                           push (@one_binlist, $rcurs);
-                         }
-                       else
-                         {
-                           push (@one_binlist, $rcurs . '$(EXEEXT)');
-                         }
+                       push (@one_binlist, $rcurs);
+                     }
+                   else
+                     {
+                       push (@one_binlist, $rcurs . '$(EXEEXT)');
                      }
-
-                   push (@condvals, $cond);
-                   push (@condvals, join (' ', @one_binlist));
                  }
 
-               variable_delete ($one_name);
-               while (@condvals)
-                 {
-                   my $cond = shift (@condvals);
-                   my @val = split (' ', shift (@condvals));
-                   &define_pretty_variable ($one_name, $cond, @val);
-                 }
-           }
+               push (@condvals, $cond);
+               push (@condvals, join (' ', @one_binlist));
+             }
 
-           # "EXTRA" shouldn't be used when generating clean targets,
-           # all, or install targets.
-           if ($X eq 'EXTRA')
-           {
-               # We used to warn if EXTRA_FOO was defined uselessly,
-               # but this was annoying.
-               next;
-           }
+           variable_delete ($one_name);
+           while (@condvals)
+             {
+               my $cond = shift (@condvals);
+               my @val = split (' ', shift (@condvals));
+               &define_pretty_variable ($one_name, $cond, @val);
+             }
+         }
 
-           if ($X eq 'check')
-           {
-               push (@check, '$(' . $one_name . ')');
-           }
-           else
-           {
-               push (@used, '$(' . $one_name . ')');
-           }
+       # "EXTRA" shouldn't be used when generating clean targets,
+       # all, or install targets.
+       if ($X eq 'EXTRA')
+         {
+           # We used to warn if EXTRA_FOO was defined uselessly,
+           # but this was annoying.
+           next;
+         }
 
-           # Is this to be installed?
-           my $install_p = $X ne 'noinst' && $X ne 'check';
+       if ($X eq 'check')
+         {
+           push (@check, '$(' . $one_name . ')');
+         }
+       else
+         {
+           push (@used, '$(' . $one_name . ')');
+         }
 
-           # If so, with install-exec? (or install-data?).
-           my $exec_p = (defined $exec_dir_p {$X}
-                         ? $exec_dir_p {$X}
-                         : ($X =~ /exec/));
+       # Is this to be installed?
+       my $install_p = $X ne 'noinst' && $X ne 'check';
 
-           # Singular form of $PRIMARY.
-           (my $one_primary = $primary) =~ s/S$//;
-           $output_rules .= &file_contents ($file,
-                                            ('FIRST' => $first,
+       # If so, with install-exec? (or install-data?).
+       my $exec_p = (defined $exec_dir_p {$X}
+                     ? $exec_dir_p {$X}
+                     : ($X =~ /exec/));
 
-                                             'PRIMARY'     => $primary,
-                                             'ONE_PRIMARY' => $one_primary,
-                                             'DIR'         => $X,
-                                             'NDIR'        => $nodir_name,
-                                             'BASE'        => $strip_subdir,
+       # Singular form of $PRIMARY.
+       (my $one_primary = $primary) =~ s/S$//;
+       $output_rules .= &file_contents ($file,
+                                        ('FIRST' => $first,
 
-                                             'EXEC'    => $exec_p,
-                                             'INSTALL' => $install_p,
-                                             'DIST'    => $dist_p));
+                                         'PRIMARY'     => $primary,
+                                         'ONE_PRIMARY' => $one_primary,
+                                         'DIR'         => $X,
+                                         'NDIR'        => $nodir_name,
+                                         'BASE'        => $strip_subdir,
 
-           $first = '';
-       }
+                                         'EXEC'    => $exec_p,
+                                         'INSTALL' => $install_p,
+                                         'DIST'    => $dist_p));
+
+       $first = '';
     }
 
     # The JAVA variable is used as the name of the Java interpreter.
This page took 0.043246 seconds and 5 git commands to generate.