From b689c2754711f75e2a1f038cc85f9162dd3062fa Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 5 Jul 2001 01:19:35 +0000 Subject: [PATCH] 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%. --- ChangeLog | 9 +++++++++ automake.in | 11 ++++++++--- lib/am/program.am | 4 ++-- tests/Makefile.am | 2 +- tests/Makefile.in | 1 + 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e21d4b2..b866b05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-07-04 Tom Tromey + + 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 * tests/nolink.test: New file. diff --git a/automake.in b/automake.in index 8926791..6bcae03 100755 --- a/automake.in +++ b/automake.in @@ -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); diff --git a/lib/am/program.am b/lib/am/program.am index a624e9f..4879323 100644 --- a/lib/am/program.am +++ b/lib/am/program.am @@ -15,11 +15,11 @@ ## 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) diff --git a/tests/Makefile.am b/tests/Makefile.am index 5974403..4037c87 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 \ diff --git a/tests/Makefile.in b/tests/Makefile.in index c3044db..d9a2f22 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -261,6 +261,7 @@ nodepcomp.test \ nodist.test \ noinst.test \ noinstdir.test \ +nolink.test \ nostdinc.test \ number.test \ obsolete.test \ -- 2.7.4