From: Tom Tromey Date: Tue, 13 Feb 1996 19:09:15 +0000 (+0000) Subject: Fixed bug in LIBOBJS handling X-Git-Tag: Release-0-30~23 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=a9797a74bdc4ee15d526636a8cc3dc102056fbae;p=automake.git Fixed bug in LIBOBJS handling --- diff --git a/ChangeLog b/ChangeLog index 8731ad81..a41d222d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 13 12:06:51 1996 Tom Tromey + + * 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 * automake.in (scan_configure): Ignore "\" in AC_OUTPUT line. diff --git a/automake.in b/automake.in index 2f56423e..b6234f32 100755 --- a/automake.in +++ b/automake.in @@ -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 () { # 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. diff --git a/tests/ChangeLog b/tests/ChangeLog index eabfe8f1..1b75194d 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Tue Feb 13 11:54:39 1996 Tom Tromey + + * libobj.test: New file. + Mon Feb 12 10:05:48 1996 Tom Tromey * acouttbs.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 675b95c1..099a5e36 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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) diff --git a/tests/Makefile.in b/tests/Makefile.in index 1ed49398..3c071441 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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 index 00000000..10ca8a14 --- /dev/null +++ b/tests/libobj.test @@ -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