Fix for nolink.test:
authorTom Tromey <tromey@redhat.com>
Thu, 5 Jul 2001 01:19:35 +0000 (01:19 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 5 Jul 2001 01:19:35 +0000 (01:19 +0000)
* tests/Makefile.am (XFAIL_TESTS): Removed nolink.test.
* lib/am/program.am (%PROGRAM%%EXEEXT%): Use %EXEEXT%.
* automake.in (am_install_var): Only rewrite PROGRAMS if
$seen_exeext.
(make_paragraphs): Always define %EXEEXT%.

ChangeLog
automake.in
lib/am/program.am
tests/Makefile.am
tests/Makefile.in

index e21d4b2..b866b05 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-07-04  Tom Tromey  <tromey@redhat.com>
+
+       Fix for nolink.test:
+       * tests/Makefile.am (XFAIL_TESTS): Removed nolink.test.
+       * lib/am/program.am (%PROGRAM%%EXEEXT%): Use %EXEEXT%.
+       * automake.in (am_install_var): Only rewrite PROGRAMS if
+       $seen_exeext.
+       (make_paragraphs): Always define %EXEEXT%.
+
 2001-07-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * tests/nolink.test: New file.
index 8926791..6bcae03 100755 (executable)
@@ -6802,6 +6802,8 @@ sub make_paragraphs ($%)
                     'HOST'     => $seen_canonical,
                     'TARGET'   => $seen_canonical == $AC_CANONICAL_SYSTEM,
 
+                    'EXEEXT'   => ($seen_exeext ? '$(EXEEXT)' : ''),
+
                     'LIBTOOL'      => defined $configure_vars{'LIBTOOL'})
          # We don't need more than two consecutive new-lines.
          . 's/\n{3,}/\n\n/g';
@@ -7257,9 +7259,12 @@ sub am_install_var
            push (@result, $rcurs);
          }
 
-       # A blatant hack: we rewrite each _PROGRAMS primary to
-       # include EXEEXT when in Cygwin32 mode.
-       if ($primary eq 'PROGRAMS')
+       # A blatant hack: we rewrite each _PROGRAMS primary to include
+       # EXEEXT when in Cygwin32 mode.  You might think we could
+       # simply always use $(EXEEXT), since we define it as empty
+       # when it isn't available.  However, it isn't that simple.
+       # See nolink.test.
+       if ($seen_exeext && $primary eq 'PROGRAMS')
          {
            my @conds = &variable_conditions ($one_name);
 
index a624e9f..4879323 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-%PROGRAM%$(EXEEXT): $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES)
+%PROGRAM%%EXEEXT%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES)
 ## Remove program before linking.  Otherwise the link will fail if the
 ## program is running somewhere.  FIXME: this could be a loss if
 ## you're using an incremental linker.  Maybe we should think twice?
 ## Or maybe not... sadly, incremental linkers are rarer than losing
 ## systems.
-       @rm -f %PROGRAM%$(EXEEXT)
+       @rm -f %PROGRAM%%EXEEXT%
        $(%XLINK%) $(%XPROGRAM%_LDFLAGS) $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_LDADD) $(LIBS)
index 5974403..4037c87 100644 (file)
@@ -1,6 +1,6 @@
 ## Process this file with automake to create Makefile.in
 
-XFAIL_TESTS = nolink.test subdir5.test
+XFAIL_TESTS = subdir5.test
 
 TESTS =        \
 acinclude.test \
index c3044db..d9a2f22 100644 (file)
@@ -261,6 +261,7 @@ nodepcomp.test \
 nodist.test \
 noinst.test \
 noinstdir.test \
+nolink.test \
 nostdinc.test \
 number.test \
 obsolete.test \