]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] cleanup: simplify %transforms for parallel-tests handling
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 20 Apr 2012 16:04:47 +0000 (18:04 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 23 Apr 2012 08:01:05 +0000 (10:01 +0200)
* automake.in (handle_tests, handle_per_suffix_test): Drop some %transforms
previously required when processing 'lib/am/check.am': '%SOURCE%', '%OBJ%',
'%BASE%' and '?GENERIC?'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
automake.in

index 19c99c744a8e0edcd34f5274ab0e0acb6f6984f4..64ec53d16b463abb7ea1ed2ad10582b9035bc566 100644 (file)
@@ -4706,23 +4706,21 @@ sub handle_tests_dejagnu
     $output_rules .= file_contents ('dejagnu', new Automake::Location);
 }
 
-sub handle_per_suffix_test
+sub handle_per_suffix_test($)
 {
-  my ($test_suffix, %transform) = @_;
-  my ($pfx, $generic, $parallel_tests_option, $am_exeext);
+  my $test_suffix = shift;
+  my ($pfx, $parallel_tests_option, $am_exeext);
   prog_error ("called with 'parallel-tests' option not set")
     unless $parallel_tests_option = option 'parallel-tests';
   if ($test_suffix eq '')
     {
       $pfx = '';
-      $generic = 0;
     }
   else
     {
       prog_error ("test suffix '$test_suffix' lacks leading dot")
         unless $test_suffix =~ m/^\.(.*)/;
       $pfx = uc ($1) . '_';
-      $generic = 1;
     }
   $am_exeext = exists $configure_vars{'EXEEXT'} ? 'am__EXEEXT'
                                                   : 'FALSE';
@@ -4739,11 +4737,9 @@ sub handle_per_suffix_test
                        INTERNAL);
     }
   $output_rules .= file_contents ('check2', new Automake::Location,
-                                   GENERIC => $generic,
                                    PFX => $pfx,
                                    EXT => $test_suffix,
-                                   am__EXEEXT => $am_exeext,
-                                   %transform);
+                                   am__EXEEXT => $am_exeext);
 }
 
 # is_valid_test_extension ($EXT)
@@ -4851,13 +4847,8 @@ sub handle_tests
                    return substr ($obj, 0, length ($obj) - length ($test_suffix)) . '.log'
                      if substr ($obj, - length ($test_suffix)) eq $test_suffix;
                  }
-               my $base = $obj;
-               $obj .= '.log';
-                handle_per_suffix_test ('',
-                                        OBJ => $obj,
-                                        BASE => $base,
-                                        SOURCE => $val);
-               return $obj;
+               handle_per_suffix_test ('');
+               return "$obj.log";
              });
 
          my $nhelper=1;
@@ -4882,10 +4873,7 @@ sub handle_tests
              $nhelper++;
              if ($test_suffix ne $at_exeext && $test_suffix ne '')
                {
-                  handle_per_suffix_test ($test_suffix,
-                                          OBJ => '',
-                                          BASE => '$*',
-                                          SOURCE => '$<');
+                  handle_per_suffix_test ($test_suffix);
                }
            }
          $clean_files{'$(TEST_LOGS)'} = MOSTLY_CLEAN;