]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
parallel-tests: Fix driver for nonempty executable extension.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 8 Apr 2009 22:16:35 +0000 (00:16 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 8 Apr 2009 22:16:35 +0000 (00:16 +0200)
* automake.in (handle_tests): New substitution `%am__EXEEXT%',
defined as 'FALSE' for non-generic rules, or if no programs are
built at all.  Otherwise, define it as configure conditional.
* lib/am/check2.am [%am__EXEEXT%] (%EXT%$(EXEEXT).log): New
conditional generic rule.
* m4/init.m4: Hook an m4_provide of `_AM_COMPILER_EXEEXT' onto
Autoconf's `_AC_COMPILER_EXEEXT' macro.
(AM_INIT_AUTOMAKE): If `_AM_COMPILER_EXEEXT' has been provided
at `AC_CONFIG_COMMANDS_PRE' time, then introduce a conditional
`am__EXEEXT', defined to true iff `$EXEEXT' is nonempty.
* tests/check5.test: Only match `_EXEEXT_[1-9]' here, to avoid
false positives stemming from `@am__EXEEXT_TRUE@'.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
NEWS
automake.in
configure
lib/am/check2.am
m4/init.m4
tests/check5.test

index 948ed58391cefe027af299ac28ae57141d6cf140..8f4b36c460e882d33a470b5be0e83c3fe88d2e50 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2009-04-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+           Eric Blake <ebb9@byu.net>
+
+       parallel-tests: Fix driver for nonempty executable extension.
+       * automake.in (handle_tests): New substitution `%am__EXEEXT%',
+       defined as 'FALSE' for non-generic rules, or if no programs are
+       built at all.  Otherwise, define it as configure conditional.
+       * lib/am/check2.am [%am__EXEEXT%] (%EXT%$(EXEEXT).log): New
+       conditional generic rule.
+       * m4/init.m4: Hook an m4_provide of `_AM_COMPILER_EXEEXT' onto
+       Autoconf's `_AC_COMPILER_EXEEXT' macro.
+       (AM_INIT_AUTOMAKE): If `_AM_COMPILER_EXEEXT' has been provided
+       at `AC_CONFIG_COMMANDS_PRE' time, then introduce a conditional
+       `am__EXEEXT', defined to true iff `$EXEEXT' is nonempty.
+       * tests/check5.test: Only match `_EXEEXT_[1-9]' here, to avoid
+       false positives stemming from `@am__EXEEXT_TRUE@'.
+       * NEWS: Update.
+
 2009-04-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Fix a couple of $(EXEEXT)-related testsuite failure.
diff --git a/NEWS b/NEWS
index cb110358237abc8962d0a706d7e8d0ba3272ae03..cf01518e88111767eeb9b7be981857deae4c3a97 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,11 @@ Bugs fixed in 1.10c:
   - Renamed objects also work with the `subdir-objects' option and
     source file languages which Automake does not know itself.
 
+* Bugs introduced by 1.10:
+
+  - The `parallel-tests' driver also works on systems with a nonempty
+    executable extension, such as Windows.
+
 \f
 New in 1.10b:
 
index 2577ffbccffd88c5fe6d90143c68c23de024b2c6..10927a1fe4dae86d6684cc72138eb60ade13acdd 100755 (executable)
@@ -4912,7 +4912,8 @@ sub handle_tests
          define_variable ('TEST_SUITE_HTML', '$(TEST_SUITE_LOG:.log=.html)', INTERNAL);
          my $suff = '.test';
          my $at_exeext = '';
-         if (exists $configure_vars{'EXEEXT'})
+         my $handle_exeext = exists $configure_vars{'EXEEXT'};
+         if ($handle_exeext)
            {
              $at_exeext = subst ('EXEEXT');
              $suff = $at_exeext  . ' ' . $suff;
@@ -4920,7 +4921,7 @@ sub handle_tests
          define_variable ('TEST_EXTENSIONS', $suff, INTERNAL);
          # FIXME: this mishandles conditions.
          my @test_suffixes = (var 'TEST_EXTENSIONS')->value_as_list_recursive;
-         if (exists $configure_vars{'EXEEXT'})
+         if ($handle_exeext)
            {
              unshift (@test_suffixes, $at_exeext)
                unless $test_suffixes[0] eq $at_exeext;
@@ -4958,7 +4959,8 @@ sub handle_tests
                                                OBJ => $obj,
                                                SOURCE => $val,
                                                COMPILE =>'$(' . $compile . ')',
-                                               EXT => '');
+                                               EXT => '',
+                                               am__EXEEXT => 'FALSE');
                return $obj;
              });
 
@@ -4990,12 +4992,14 @@ sub handle_tests
                  define_variable ($compile,
                                   '$(' . $ext . '_LOG_COMPILER) $(AM_' .  $ext . '_LOG_FLAGS)'
                                   . ' $(' . $ext . '_LOG_FLAGS)', INTERNAL);
+                 my $am_exeext = $handle_exeext ? 'am__EXEEXT' : 'FALSE';
                  $output_rules .= file_contents ('check2', new Automake::Location,
                                                  GENERIC => 1,
                                                  OBJ => '',
                                                  SOURCE => '$<',
                                                  COMPILE => '$(' . $compile . ')',
-                                                 EXT => $test_suffix);
+                                                 EXT => $test_suffix,
+                                                 am__EXEEXT => $am_exeext);
                }
            }
 
index caf5adaee93889367f6890ab5cc35e944c55b409..15ad6fd89d9ff7a9b19493249a0394e98019d11f 100755 (executable)
--- a/configure
+++ b/configure
@@ -2961,6 +2961,7 @@ LTLIBOBJS=$ac_ltlibobjs
 
 
 
+
 : ${CONFIG_STATUS=./config.status}
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
index 237e20aa8be208a064aecb296362ace5fdc0fa29..3e9eed222437a0a393fa433f12d28fd60597c622 100644 (file)
 ?GENERIC?%EXT%.log:
 ?!GENERIC?%OBJ%: %SOURCE%
        @p='%SOURCE%'; $(am__check_pre) %COMPILE% "$$tst" $(am__check_post)
+
+## If no programs are built in this package, then this rule is removed
+## at automake time.  Otherwise, %am__EXEEXT% expands to a configure time
+## conditional, true if $(EXEEXT) is nonempty, thus this rule does not
+## conflict with the previous one.
+if %am__EXEEXT%
+?GENERIC?%EXT%$(EXEEXT).log:
+       @p='%SOURCE%'; $(am__check_pre) %COMPILE% "$$tst" $(am__check_post)
+endif %am__EXEEXT%
index a4d5c905846304c2b27d0738ffbc24363985b723..59785027374a55c61c0996f3074809d5493fc14e 100644 (file)
@@ -7,7 +7,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 15
+# serial 16
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -103,8 +103,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 AM_BACKSLASH='\'
 AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 ])
 
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
 
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
index 58c8607144fb301b458f8326a56e843ed33c4246..e2e0210df0693aacbf3c3ecd16b3af133c7a2975 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,6 +52,6 @@ test -f ok
 EXEEXT=.bin $MAKE -e print-tests >output
 cat output
 # No am__EXEEXT_* variable is needed.
-grep '_EXEEXT' Makefile.in && Exit 1
+grep '_EXEEXT_[1-9]' Makefile.in && Exit 1
 grep 'BEG: one.bin two.bin :END' output
 $FGREP 'TESTS = $(check_PROGRAMS)' Makefile.in