automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch: FYI: fix exeext.test


From: Tom Tromey
Subject: Patch: FYI: fix exeext.test
Date: 22 Jul 2001 16:41:38 -0600

This fixes exeext.test.  I'm checking it in.

Tom

Index: ChangeLog
from  Tom Tromey  <address@hidden>
        * 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.

        * lib/am/progs.am (install-%DIR%PROGRAMS): Test for `prog', not
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1158
diff -u -r1.1158 automake.in
--- automake.in 2001/07/21 19:34:32 1.1158
+++ automake.in 2001/07/22 22:15:23
@@ -2462,11 +2462,17 @@
        # 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 @@
                     '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 @@
        # 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 =~ /address@hidden@$/)
-                     {
+               {
+                   # Skip autoconf substs.  Also skip if the user
+                   # already applied $(EXEEXT).
+                   if ($rcurs =~ /address@hidden@$/ || $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.
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.329
diff -u -r1.329 Makefile.am
--- tests/Makefile.am 2001/07/22 22:01:17 1.329
+++ tests/Makefile.am 2001/07/22 22:15:23
@@ -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 \
Index: tests/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.in,v
retrieving revision 1.429
diff -u -r1.429 Makefile.in
--- tests/Makefile.in 2001/07/22 22:01:17 1.429
+++ tests/Makefile.in 2001/07/22 22:15:23
@@ -66,7 +66,7 @@
 _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 @@
 
 
 EXTRA_DIST = defs ChangeLog-old $(TESTS)
+EXEEXT =
+OBJEXT = o
 subdir = tests
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =



reply via email to

[Prev in Thread] Current Thread [Next in Thread]