fixed objc.test bug
authorTom Tromey <tromey@redhat.com>
Mon, 1 Dec 1997 20:54:36 +0000 (20:54 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 1 Dec 1997 20:54:36 +0000 (20:54 +0000)
ChangeLog
README
automake.in

index 54a8285..70255cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Mon Dec  1 13:52:39 1997  Tom Tromey  <tromey@cygnus.com>
+
+       Fixes for test objc.test:
+       * automake.in (initialize_per_input): New global seen_any_source.
+       (handle_yacc_lex_cxx): Use seen_any_source to decide when to
+       define LINK, et al.
+       (handle_single_transform_list): Set seen_any_source.
+       (handle_lib_objects_cond): Likewise.
+
 Wed Nov 26 13:41:57 1997  Tom Tromey  <tromey@cygnus.com>
 
        * Released 1.2d.
diff --git a/README b/README
index 1397bdc..634a0f8 100644 (file)
--- a/README
+++ b/README
@@ -19,9 +19,9 @@ program to generate an `aclocal.m4' based on the contents of
 for augmenting autoconf.  It is intended that other package authors
 will write m4 macros which can be automatically used by aclocal.
 
-The mailing list automake@gnu.ai.mit.edu is for discussion of
+The mailing list automake@gnu.org is for discussion of
 Automake, Autoconf, and other configuration/portability tools (e.g.,
-libtool).  Write to automake-request@gnu.ai.mit.edu if you want to
+libtool).  Write to automake-request@gnu.org if you want to
 join.
 
-Mail suggestions and bug reports to automake-bugs@gnu.ai.mit.edu.
+Mail suggestions and bug reports to automake-bugs@gnu.org.
index 5aeacdf..2f673f4 100755 (executable)
@@ -962,7 +962,7 @@ sub handle_yacc_lex_cxx
     #
     # Last, handle some C cleanup.
     #
-    if ($seen_c_source)
+    if ($seen_any_source)
     {
        &define_configure_variable ('CFLAGS');
        &define_variable ('COMPILE',
@@ -972,12 +972,12 @@ sub handle_yacc_lex_cxx
                          '$(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)')
            if ($seen_libtool);
        &define_variable ('LINK', $ltlink . '$(CC) $(CFLAGS) $(LDFLAGS) -o $@');
+    }
 
-       if (! defined $configure_vars{'CC'})
-       {
-           &am_line_error ($seen_c_source,
-                           "C source seen but \`CC' not defined in \`configure.in'");
-       }
+    if ($seen_c_source && ! defined $configure_vars{'CC'})
+    {
+       &am_line_error ($seen_c_source,
+                       "C source seen but \`CC' not defined in \`configure.in'");
     }
 }
 
@@ -1186,6 +1186,7 @@ sub handle_single_transform_list
                next;
            }
 
+           $seen_any_source = 1;
            push (@result, $_);
 
            # Transform .o or $o file into .P file (for automatic
@@ -1394,6 +1395,7 @@ sub handle_lib_objects_cond
                if ($iter =~ /\.[cly]$/)
                {
                    $seen_c_source = $var;
+                   $seen_any_source = 1;
                }
 
                if ($iter =~ /\.h$/)
@@ -1417,6 +1419,7 @@ sub handle_lib_objects_cond
            $dep_files{'.deps/alloca.P'} = 1;
            &require_file_with_line ($var, $FOREIGN, 'alloca.c');
            $seen_c_source = $var;
+           $seen_any_source = 1;
        }
     }
 
@@ -5470,6 +5473,9 @@ sub initialize_per_input
     # mentioned the sources.
     $seen_c_source = 0;
 
+    # TRUE if we've seen any sources at all.
+    $seen_any_source = 0;
+
     # This is a list of all targets to run during "make dist".
     @dist_targets = ();