]> sourceware.org Git - automake.git/commitdiff
Fixed bug in LIBOBJS handling
authorTom Tromey <tromey@redhat.com>
Tue, 13 Feb 1996 19:09:15 +0000 (19:09 +0000)
committerTom Tromey <tromey@redhat.com>
Tue, 13 Feb 1996 19:09:15 +0000 (19:09 +0000)
ChangeLog
automake.in
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/libobj.test [new file with mode: 0755]

index 8731ad8172418eab7c5f596728653285847b2511..a41d222da1d098db2db516781bda6d0027fa9863 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Feb 13 12:06:51 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * automake.in (scan_configure): Handle case where more than one .o
+       is put into LIBOBJS at once.  Test libobj.test.
+
 Mon Feb 12 10:39:28 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
        * automake.in (scan_configure): Ignore "\" in AC_OUTPUT line.
index 2f56423e4a6facea314e218c4b4448db6c9de657..b6234f3201a65ab5847fd1fcc4f32cc24187fa03 100755 (executable)
@@ -1531,6 +1531,7 @@ sub scan_configure
     local ($in_ac_output, @make_list) = 0;
     local ($seen_arg_prog) = 0;
     local ($seen_canonical) = 0;
+    local ($libobj_iter);
     while (<CONFIGURE>)
     {
        # Remove comments from current line.
@@ -1561,13 +1562,16 @@ sub scan_configure
                $libsources{$_ . '.c'} = 1;
            }
        }
-       elsif (/LIBOBJS="(.*)\.o\s+\$LIBOBJS"/)
+       elsif (/LIBOBJS="(.*)\s+\$LIBOBJS"/
+              || /LIBOBJS="\$LIBOBJS\s+(.*)"/)
        {
-           $libsources{$1 . '.c'} = 1;
-       }
-       elsif (/LIBOBJS="\$LIBOBJS\s+(.*)\.o"/)
-       {
-           $libsources{$1 . '.c'} = 1;
+           foreach $libobj_iter (split (/\s+/, $1))
+           {
+               if ($libobj_iter =~ /^(.*)\.o$/)
+               {
+                   $libsources{$1 . '.c'} = 1;
+               }
+           }
        }
 
        # Process the AC_OUTPUT macro.
index eabfe8f1cd367c65d6fcee9e490e7211224a92cc..1b75194d8c22b66590ed7d97226d3afa48e807fb 100644 (file)
@@ -1,3 +1,7 @@
+Tue Feb 13 11:54:39 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * libobj.test: New file.
+
 Mon Feb 12 10:05:48 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
        * acouttbs.test: New file.
index 675b95c1504e324f1c87b63c77b441568940d3e1..099a5e36796122be3af91ea0d9461e745be0c704 100644 (file)
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = gnits
 ## FIXME Ulrich has suggested implementing this in Automake.
 ## Perhaps he is right.
 TESTS = mdate.test vtexi.test acoutput.test instexec.test checkall.test \
-acoutnoq.test acouttbs.test
+acoutnoq.test acouttbs.test libobj.test
 
 DIST_OTHER = $(TESTS)
 
index 1ed49398ebd4c8682969ed4c3f032f8a5b90f947..3c071441ba9f004955064c10f8746ad436ac7fc3 100644 (file)
@@ -41,7 +41,7 @@ transform = @program_transform_name@
 AUTOMAKE_OPTIONS = gnits
 
 TESTS = mdate.test vtexi.test acoutput.test instexec.test checkall.test \
-acoutnoq.test acouttbs.test
+acoutnoq.test acouttbs.test libobj.test
 
 DIST_OTHER = $(TESTS)
 DIST_COMMON = ChangeLog Makefile.am Makefile.in
diff --git a/tests/libobj.test b/tests/libobj.test
new file mode 100755 (executable)
index 0000000..10ca8a1
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Test for bug reported by Jim Meyering:
+# automake-0.29 didn't handle this line properly.
+#   LIBOBJS="$LIBOBJS fsusage.o mountlist.o"
+
+. $srcdir/defs
+
+cat > configure.in << 'END'
+AC_ARG_PROGRAM
+AC_PROG_INSTALL
+LIBOBJS="$LIBOBJS fsusage.o mountlist.o"
+AC_OUTPUT(Makefile)
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = tu
+tu_SOURCES =
+tu_LIBADD = @LIBOBJS@
+END
+
+: > fsusage.c
+: > mountlist.c
+
+$AUTOMAKE
This page took 0.040163 seconds and 5 git commands to generate.