bug fix and new test
authorTom Tromey <tromey@redhat.com>
Fri, 6 Dec 1996 01:25:58 +0000 (01:25 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 6 Dec 1996 01:25:58 +0000 (01:25 +0000)
ChangeLog
NEWS
automake.in
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/cxxo.test [new file with mode: 0755]

index 072af9a..2916879 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,12 @@
 Thu Dec  5 02:52:20 1996  Tom Tromey  <tromey@cygnus.com>
 
-       * aclocal.in (@obsolete_macros): ud_GNU_GETTEXT is obsolete.
+       * automake.in (handle_single_transform_list): Correctly rewrite
+       C++ and Fortran source to objects ending in ".o".  Test
+       cxxo.test.
+
+       * automake.in: Better error message if file missing.
 
+       * aclocal.in (@obsolete_macros): ud_GNU_GETTEXT is obsolete.
        * automake.in (handle_gettext): Use AM_GNU_GETTEXT, not
        ud_GNU_GETTEXT.
        (scan_configure): Ditto.  ud_GNU_GETTEXT is now obsolete.
diff --git a/NEWS b/NEWS
index cc4747e..7c83f50 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-New in 1.1j:
+New in 1.1k:
 * Bug fixes
 * Better DejaGNU support
 * Added no-installinfo option
index 89210d4..d37963c 100755 (executable)
@@ -232,7 +232,7 @@ foreach $am_file (@input_files)
     # FIXME: should support the AC_OUTPUT ":" syntax here.
     if (! -f ($am_file . '.am'))
     {
-       &am_error ('no such file');
+       &am_error ("\`" . $am_file . ".am' does not exist");
     }
     else
     {
@@ -910,12 +910,12 @@ sub handle_single_transform_list
 
            # Transform source files into .o files.  List of C++
            # extensions comes from Emacs 19.34 etags.
-           if (s/\.(c\+\+|cc|cpp|cxx|C)$/o/)
+           if (s/\.(c\+\+|cc|cpp|cxx|C)$/.o/)
            {
                $cxx_extensions{'.' . $1} = 1;
                $linker = 'CXXLINK';
            }
-           elsif (s/\.([Ff]\\|f90\\|for)$/o/)
+           elsif (s/\.([Ff]\\|f90\\|for)$/.o/)
            {
                # FORTRAN support.  FIXME: not finished.
            }
index 77b901c..8912b5f 100644 (file)
@@ -1,3 +1,7 @@
+Thu Dec  5 18:23:17 1996  Tom Tromey  <tromey@cygnus.com>
+
+       * cxxo.test: New file.
+
 Wed Dec  4 00:41:44 1996  Tom Tromey  <tromey@cygnus.com>
 
        * defs: Allow user to set interpreter via PERL environment
index a30d7f9..313421a 100644 (file)
@@ -18,7 +18,7 @@ gnits.test interp2.test colneq.test implicit.test spell.test spell2.test \
 confsub.test primary.test primary2.test depend2.test spell3.test \
 comment2.test vpath.test symlink.test discover.test acinclude.test req.test \
 acsilent.test distdir.test lex2.test libobj4.test libobj5.test version.test \
-ranlib.test confvar.test confvar2.test stdlib.test
+ranlib.test confvar.test confvar2.test stdlib.test cxxo.test
 
 EXTRA_DIST = defs $(TESTS)
 
index 51d07ac..527f1bb 100644 (file)
@@ -57,7 +57,7 @@ gnits.test interp2.test colneq.test implicit.test spell.test spell2.test \
 confsub.test primary.test primary2.test depend2.test spell3.test \
 comment2.test vpath.test symlink.test discover.test acinclude.test req.test \
 acsilent.test distdir.test lex2.test libobj4.test libobj5.test version.test \
-ranlib.test confvar.test confvar2.test stdlib.test
+ranlib.test confvar.test confvar2.test stdlib.test cxxo.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
diff --git a/tests/cxxo.test b/tests/cxxo.test
new file mode 100755 (executable)
index 0000000..32beec8
--- /dev/null
@@ -0,0 +1,19 @@
+#! /bin/sh
+
+# Make sure C++ files are rewritten to ".o" and not just "o".
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CXX
+END
+
+cat > Makefile.am << 'END'
+sbin_PROGRAMS = anonymous
+anonymous_SOURCES = doe.C
+END
+
+: > doe.C
+
+$AUTOMAKE || exit 1
+
+fgrep doe.o Makefile.in