]> sourceware.org Git - automake.git/commitdiff
* automake.in (&handle_source_transform): Better locality of the
authorAkim Demaille <akim@epita.fr>
Mon, 9 Apr 2001 09:34:16 +0000 (09:34 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 9 Apr 2001 09:34:16 +0000 (09:34 +0000)
variables.
Use `next' to skip nonexistent variables.

ChangeLog
automake.in

index c32e2a0e1f058ccb0efcb6a0c08c444ee1fe8979..7f6a5a89eaaa1b4f492d187f3de3730059f44cc8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-04-09  Akim Demaille  <akim@epita.fr>
+
+       * automake.in (&handle_source_transform): Better locality of the
+       variables.
+       Use `next' to skip nonexistent variables.
+
+       
 2001-04-09  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&variable_dump): If a variable is undefined, say
index e60e078ed0ed771d7c7faad474c6bff68819c267..06b6183f84c19aba3935073160fddead19d55d08 100755 (executable)
@@ -1877,43 +1877,41 @@ sub handle_source_transform
        return;
     }
 
-    my (@files, @result, $temp);
     my %used_pfx = ();
     foreach my $prefix ('', 'EXTRA_', 'dist_', 'nodist_',
                        'dist_EXTRA_', 'nodist_EXTRA_')
     {
+       my $var = $prefix . $one_file . "_SOURCES";
+       next
+         if !variable_defined ($var);
+
        # We are going to define _OBJECTS variables using the prefix.
        # Then we glom them all together.  So we can't use the null
        # prefix here as we need it later.
        my $xpfx = ($prefix eq '') ? 'am_' : $prefix;
 
-       @files = ();
-       my $var = $prefix . $one_file . "_SOURCES";
-       if (&variable_defined ($var))
-       {
-           # Keep track of which prefixes we saw.
-           $used_pfx{$xpfx} = 1
-               unless $prefix =~ /EXTRA_/;
+       # Keep track of which prefixes we saw.
+       $used_pfx{$xpfx} = 1
+         unless $prefix =~ /EXTRA_/;
 
-           push (@sources, '$(' . $prefix . $one_file . "_SOURCES)");
-           push (@objects, '$(' . $xpfx . $one_file . "_OBJECTS)")
-               unless $prefix =~ /EXTRA_/;
-           push (@dist_sources, '$(' . $prefix . $one_file . "_SOURCES)")
-               unless $prefix =~ /^nodist_/;
-           foreach my $cond (variable_conditions ($var))
-             {
-               @files = &variable_value_as_list ($var, $cond);
-               ($temp, @result) =
-                 &handle_single_transform_list ($var, $one_file, $obj,
-                                                @files);
-               $linker = $temp if $linker eq '';
-
-               # Define _OBJECTS conditionally.
-               &define_pretty_variable ($xpfx . $one_file . '_OBJECTS',
-                                        $cond, @result)
-                 unless $prefix =~ /EXTRA_/;
-             }
-       }
+       push (@sources, '$(' . $prefix . $one_file . "_SOURCES)");
+       push (@objects, '$(' . $xpfx . $one_file . "_OBJECTS)")
+         unless $prefix =~ /EXTRA_/;
+       push (@dist_sources, '$(' . $prefix . $one_file . "_SOURCES)")
+         unless $prefix =~ /^nodist_/;
+       foreach my $cond (variable_conditions ($var))
+         {
+           my @files = &variable_value_as_list ($var, $cond);
+           my ($temp, @result) =
+             &handle_single_transform_list ($var, $one_file, $obj,
+                                            @files);
+           $linker = $temp if $linker eq '';
+
+           # Define _OBJECTS conditionally.
+           &define_pretty_variable ($xpfx . $one_file . '_OBJECTS',
+                                    $cond, @result)
+             unless $prefix =~ /EXTRA_/;
+         }
     }
 
     my @keys = sort keys %used_pfx;
@@ -1923,12 +1921,11 @@ sub handle_source_transform
        push (@sources, $unxformed . '.c');
        push (@dist_sources, $unxformed . '.c');
        push (@objects, $unxformed . $obj);
-       push (@files, $unxformed . '.c');
 
        ($temp, @result) =
          &handle_single_transform_list ($one_file . '_SOURCES',
                                         $one_file, $obj,
-                                        @files);
+                                        "$unxformed.c");
        $linker = $temp if $linker eq '';
        &define_pretty_variable ($one_file . "_OBJECTS", '', @result)
     }
This page took 0.051917 seconds and 5 git commands to generate.