From 6be79c644ec0da473782a78305ea71afe2ecbe4c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 22 Jul 2001 22:16:29 +0000 Subject: [PATCH] * tests/Makefile.am (XFAIL_TESTS): Removed exeext.test. * automake.in (am_install_var): Add $(EXEEXT) even if program name holds `.'. Don't add $(EXEEXT) if program name already has it. (handle_programs): Don't add $(EXEEXT) if user already did. (make_paragraphs): Don't compute EXEEXT. --- ChangeLog | 8 +++++++- automake.in | 38 ++++++++++++++++++++++---------------- tests/Makefile.am | 2 +- tests/Makefile.in | 4 +++- 4 files changed, 33 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index c3a7ac1d..8b678033 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,18 @@ 2001-07-22 Tom Tromey + * tests/Makefile.am (XFAIL_TESTS): Removed exeext.test. + * automake.in (am_install_var): Add $(EXEEXT) even if program name + holds `.'. Don't add $(EXEEXT) if program name already has it. + (handle_programs): Don't add $(EXEEXT) if user already did. + (make_paragraphs): Don't compute EXEEXT. + * tests/Makefile.am (TESTS): Added exeext.test. (XFAIL_TESTS): Likewise. * tests/exeext.test: New file. 2001-07-22 Tom Tromey - * lib/am/progs.am (install-%DIR%PROGRAMS): Test for `prog, not + * lib/am/progs.am (install-%DIR%PROGRAMS): Test for `prog', not `prog.exe' on Cygwin with libtool. From Robert Collins. 2001-07-21 Tim Van Holder diff --git a/automake.in b/automake.in index ffeb2621..9b21517a 100755 --- a/automake.in +++ b/automake.in @@ -2462,11 +2462,17 @@ sub handle_programs # make sure this directory will exist. my $dirstamp = &require_build_directory_maybe ($one_file); + # Don't add $(EXEEXT) if user already did. + my $extension = (($seen_exeext && $one_file !~ /\$\(EXEEXT\)$/) + ? "\$(EXEEXT)" + : ''); + $output_rules .= &file_contents ('program', ('PROGRAM' => $one_file, 'XPROGRAM' => $xname, 'XLINK' => $xlink, - 'DIRSTAMP' => $dirstamp)); + 'DIRSTAMP' => $dirstamp, + 'EXEEXT' => $extension)); } if (&variable_defined ('LDADD') && &handle_lib_objects ('', 'LDADD')) @@ -6815,8 +6821,6 @@ 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'; @@ -7278,39 +7282,41 @@ sub am_install_var # 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); my @condvals; foreach my $cond (@conds) - { + { my @one_binlist = (); my @condval = &variable_value_as_list ($one_name, $cond); foreach my $rcurs (@condval) - { - if ($rcurs =~ /\./ || $rcurs =~ /^\@.*\@$/) - { + { + # Skip autoconf substs. Also skip if the user + # already applied $(EXEEXT). + if ($rcurs =~ /^\@.*\@$/ || $rcurs =~ /\$\(EXEEXT\)$/) + { push (@one_binlist, $rcurs); - } + } else - { + { push (@one_binlist, $rcurs . '$(EXEEXT)'); - } - } + } + } push (@condvals, $cond); push (@condvals, join (' ', @one_binlist)); - } + } variable_delete ($one_name); while (@condvals) - { + { my $cond = shift (@condvals); my @val = split (' ', shift (@condvals)); &define_pretty_variable ($one_name, $cond, @val); - } - } + } + } # "EXTRA" shouldn't be used when generating clean targets, # all, or install targets. diff --git a/tests/Makefile.am b/tests/Makefile.am index f9555df8..6c3cc28c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in -XFAIL_TESTS = subdir5.test substtarg.test exeext.test +XFAIL_TESTS = subdir5.test substtarg.test TESTS = \ acinclude.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index ab82589b..458c6146 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -66,7 +66,7 @@ _am_include = @_am_include@ _am_quote = @_am_quote@ install_sh = @install_sh@ -XFAIL_TESTS = subdir5.test substtarg.test exeext.test +XFAIL_TESTS = subdir5.test substtarg.test TESTS = \ acinclude.test \ @@ -383,6 +383,8 @@ yaccvpath.test EXTRA_DIST = defs ChangeLog-old $(TESTS) +EXEEXT = +OBJEXT = o subdir = tests mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs CONFIG_CLEAN_FILES = -- 2.43.5