From ce9484c96186a6d5d8b3c903240e890f7f0054a3 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Thu, 31 Oct 2002 11:55:27 +0000 Subject: [PATCH] * tests/location.test (Makefile.am): Strengthen. * lib/Automake/Channels.pm (_print_message): Be sure to flush $partial when the message is output. Thanks to Alexandre Duret-Lutz. --- ChangeLog | 7 +++++++ lib/Automake/Channels.pm | 1 + tests/location.test | 32 +++++++++++++++++++++++++------- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74b820e..c48ecb6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2002-10-31 Akim Demaille + * tests/location.test (Makefile.am): Strengthen. + * lib/Automake/Channels.pm (_print_message): Be sure to flush + $partial when the message is output. + Thanks to Alexandre Duret-Lutz. + +2002-10-31 Akim Demaille + * automake.in (&read_am_file): Use $last_where to register the _first_ line of a variable definition as location instead of the last one. diff --git a/lib/Automake/Channels.pm b/lib/Automake/Channels.pm index 37201e8..eaeed1c 100644 --- a/lib/Automake/Channels.pm +++ b/lib/Automake/Channels.pm @@ -421,6 +421,7 @@ sub _print_message ($$%) { # Prefix with any partial message send so far. $msg = $partial . $msg; + $partial = ''; } # Check for duplicate message if requested. diff --git a/tests/location.test b/tests/location.test index ad97f3c..7cb5052 100755 --- a/tests/location.test +++ b/tests/location.test @@ -51,10 +51,28 @@ END $ACLOCAL $AUTOMAKE 2>stderr && exit 1 cat stderr -grep 'Makefile\.am:1:.*program.*libfoo\.a' stderr -grep 'Makefile\.am:3:.*library.*libfoo\.a' stderr -grep 'Makefile\.am:6:.*program.*ctags' stderr -grep 'redefinition of.*libfoo\.a' stderr -grep 'redefinition of.*ctags' stderr -grep 'Makefile.am:12: VAR multiply defined in condition TRUE' stderr -grep 'Makefile.am:8: ... .VAR. previously defined here' stderr + +# Smash the useless difference of lib file locations. +sed 's,^.*lib/am/\([a-z]*\.am\),\1,' stderr >observed +cat >expected <<\EOF +Makefile.am:12: VAR multiply defined in condition TRUE ... +Makefile.am:8: ... `VAR' previously defined here +automake: libfoo_a_OBJECTS should not be defined +Makefile.am:3: while processing library `libfoo.a' +automake: use `libfoo_a_LDADD', not `libfoo_a_LIBADD' +Makefile.am:3: while processing library `libfoo.a' +library.am: deprecated feature: target `libfoo.a' overrides `libfoo.a$(EXEEXT)' +library.am: change your target to read `libfoo.a$(EXEEXT)' +Makefile.am:3: while processing library `libfoo.a' +program.am: target `libfoo.a$(EXEEXT)' was defined here +Makefile.am:1: while processing program `libfoo.a' +program.am: redefinition of `libfoo.a' in condition `TRUE'... +Makefile.am:1: while processing program `libfoo.a' +library.am: ... `libfoo.a' previously defined here +Makefile.am:3: while processing library `libfoo.a' +tags.am: redefinition of `ctags' in condition `TRUE'... +program.am: ... `ctags' previously defined here +Makefile.am:6: while processing program `ctags' +EOF + +diff expected observed || exit 1 -- 2.7.4