[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-149-
From: |
Ralf Wildenhues |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-149-g1655285 |
Date: |
Sun, 11 Apr 2010 20:32:59 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=1655285990bc5ff11335b7a03e683cb4062bf0ef
The branch, master has been updated
via 1655285990bc5ff11335b7a03e683cb4062bf0ef (commit)
via f7587e184a52785913eda87fbb6ff6f0bc2aeb29 (commit)
via bda8d57b6af0bf3dfe2524514304856a16766b7d (commit)
via 483b962ed7e87600ee0f1581a15f747ea8195452 (commit)
via da765822f02f0e66b6e3b4a01e2ac08f5c837164 (commit)
from b853db4ad65aff6affab534a5dffa39a4a07a8bd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1655285990bc5ff11335b7a03e683cb4062bf0ef
Author: Ralf Wildenhues <address@hidden>
Date: Sun Apr 11 22:00:09 2010 +0200
Print 'warnings are treated as errors' note if needed.
* lib/Automake/Channels.pm: Fix typo in comment.
(_print_message): If -Werror is enabled, print a 'warnings are
treated as errors' note before the first such warning.
* tests/warnopts.test: Adjust comment to mention expected warning.
Adjust code to ignore 'warnings are treated as errors' note.
* tests/location.test: Adjust expected output with -Werror.
* tests/werror4.test: New test.
* tests/Makefile.am: Update.
* NEWS: Update.
Signed-off-by: Ralf Wildenhues <address@hidden>
commit f7587e184a52785913eda87fbb6ff6f0bc2aeb29
Author: Ralf Wildenhues <address@hidden>
Date: Sun Apr 11 21:30:34 2010 +0200
Ensure we don't print 'warning:' or 'error:' twice.
* Makefile.am (sc_ensure_testsuite_has_run): New helper rule.
(sc_tests_logs_duplicate_prefixes): New rule, to check for
wrong-looking warning and error messages in the test suite logs.
* aclocal.in (scan_configure_dep, scan_file): Remove duplicate
`warning: ' prefix.
* tests/vars3.test: Rename variable to avoid false positive.
Signed-off-by: Ralf Wildenhues <address@hidden>
commit bda8d57b6af0bf3dfe2524514304856a16766b7d
Author: Ralf Wildenhues <address@hidden>
Date: Sun Apr 11 21:04:13 2010 +0200
Prepend type to warning, error, and fatal messages.
For the first part of messages of types `error' or `fatal',
prepend `error: ' to the message. Prepend `warning: ' to
warning messages, whatever the setting of -Werror.
* lib/Automake/Channels.pm (partial): Move up definition.
(_format_message): Emit `header' and `footer' strings only with
the first resp. last part of a set of partial messages.
* lib/Automake/ChannelDefs.pm: Add missing '1;' statement at the
end of the module.
(Automake::ChannelDefs): Setup warning channels with header
`warning: ', error and fatal messages with header `error: '.
* tests/condinc2.test, tests/ltinstloc.test: Adjust expected
error messages.
* tests/comment5.test: Likewise. Also, include stack notes
should not start with `error:'.
* tests/location.test: Likewise. Also, try both -Werror and
-Wno-error.
* NEWS: Update.
Report by Bruno Haible.
Signed-off-by: Ralf Wildenhues <address@hidden>
commit 483b962ed7e87600ee0f1581a15f747ea8195452
Author: Ralf Wildenhues <address@hidden>
Date: Sun Apr 11 20:49:38 2010 +0200
Fix capitalization of error messages, reword one message.
* lib/Automake/Variable.pm (define): Do not capitalize the first
word in the error message.
* automake.in (require_file_internal): Likewise. Also, reword
and line-wrap for better readability.
* tests/distcom7.test, tests/pluseq5.test, tests/pluseq9.test:
Adjust tests.
Signed-off-by: Ralf Wildenhues <address@hidden>
commit da765822f02f0e66b6e3b4a01e2ac08f5c837164
Author: Ralf Wildenhues <address@hidden>
Date: Sun Apr 11 20:31:19 2010 +0200
Fix connected warnings about obsolete exeext override.
* lib/Automake/Rule.pm (define): Merge two warnings that belong
together, by setting the 'partial' flag for the first one.
Signed-off-by: Ralf Wildenhues <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 51 ++++++++++++++++++++++++++++++++++
Makefile.am | 19 ++++++++++++
Makefile.in | 14 +++++++++
NEWS | 3 ++
aclocal.in | 6 ++--
automake.in | 5 ++-
lib/Automake/ChannelDefs.pm | 6 ++++
lib/Automake/Channels.pm | 26 ++++++++++------
lib/Automake/Rule.pm | 6 ++-
lib/Automake/Variable.pm | 4 +-
tests/Makefile.am | 1 +
tests/Makefile.in | 1 +
tests/comment5.test | 9 +++--
tests/condinc2.test | 6 ++--
tests/distcom7.test | 4 +-
tests/location.test | 22 +++++++++-----
tests/ltinstloc.test | 6 ++--
tests/pluseq5.test | 7 ++--
tests/pluseq9.test | 6 ++--
tests/vars3.test | 6 ++--
tests/warnopts.test | 9 +++--
tests/{werror3.test => werror4.test} | 33 +++++++++++++++++----
22 files changed, 191 insertions(+), 59 deletions(-)
copy tests/{werror3.test => werror4.test} (56%)
diff --git a/ChangeLog b/ChangeLog
index 19b7772..d7f3c23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,56 @@
2010-04-11 Ralf Wildenhues <address@hidden>
+ Print 'warnings are treated as errors' note if needed.
+ * lib/Automake/Channels.pm: Fix typo in comment.
+ (_print_message): If -Werror is enabled, print a 'warnings are
+ treated as errors' note before the first such warning.
+ * tests/warnopts.test: Adjust comment to mention expected warning.
+ Adjust code to ignore 'warnings are treated as errors' note.
+ * tests/location.test: Adjust expected output with -Werror.
+ * tests/werror4.test: New test.
+ * tests/Makefile.am: Update.
+ * NEWS: Update.
+
+ Ensure we don't print 'warning:' or 'error:' twice.
+ * Makefile.am (sc_ensure_testsuite_has_run): New helper rule.
+ (sc_tests_logs_duplicate_prefixes): New rule, to check for
+ wrong-looking warning and error messages in the test suite logs.
+ * aclocal.in (scan_configure_dep, scan_file): Remove duplicate
+ `warning: ' prefix.
+ * tests/vars3.test: Rename variable to avoid false positive.
+
+ Prepend type to warning, error, and fatal messages.
+ For the first part of messages of types `error' or `fatal',
+ prepend `error: ' to the message. Prepend `warning: ' to
+ warning messages, whatever the setting of -Werror.
+ * lib/Automake/Channels.pm (partial): Move up definition.
+ (_format_message): Emit `header' and `footer' strings only with
+ the first resp. last part of a set of partial messages.
+ * lib/Automake/ChannelDefs.pm: Add missing '1;' statement at the
+ end of the module.
+ (Automake::ChannelDefs): Setup warning channels with header
+ `warning: ', error and fatal messages with header `error: '.
+ * tests/condinc2.test, tests/ltinstloc.test: Adjust expected
+ error messages.
+ * tests/comment5.test: Likewise. Also, include stack notes
+ should not start with `error:'.
+ * tests/location.test: Likewise. Also, try both -Werror and
+ -Wno-error.
+ * NEWS: Update.
+ Report by Bruno Haible.
+
+ Fix capitalization of error messages, reword one message.
+ * lib/Automake/Variable.pm (define): Do not capitalize the first
+ word in the error message.
+ * automake.in (require_file_internal): Likewise. Also, reword
+ and line-wrap for better readability.
+ * tests/distcom7.test, tests/pluseq5.test, tests/pluseq9.test:
+ Adjust tests.
+
+ Fix connected warnings about obsolete exeext override.
+ * lib/Automake/Rule.pm (define): Merge two warnings that belong
+ together, by setting the 'partial' flag for the first one.
+
Fix per-Makefile.am setting of -Werror.
Before this patch, 'AUTOMAKE_OPTIONS = -Werror' in one
Makefile.am would carry over to other Makefile.am files
diff --git a/Makefile.am b/Makefile.am
index 6c24285..f5ab44f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -190,6 +190,7 @@ sc_tests_required_after_defs \
sc_tests_overriding_macros_on_cmdline \
sc_tests_plain_sleep \
sc_tests_plain_egrep_fgrep \
+sc_tests_logs_duplicate_prefixes \
sc_mkdir_p \
sc_perl_at_substs \
sc_unquoted_DESTDIR \
@@ -458,6 +459,24 @@ sc_tests_plain_egrep_fgrep:
exit 1; \
fi
+## Rule to ensure that the testsuite has been run before. We don't depend on
`check'
+## here, because that would be very wasteful in the common case. We could run
+## `make check RECHECK_LOGS=' and avoid toplevel races with
AM_RECURSIVE_TARGETS.
+sc_ensure_testsuite_has_run:
+ @if test ! -f tests/test-suite.log; then \
+ echo "Run \`make check' before \`maintainer-check'" >&2; \
+ exit 1; \
+ fi
+.PHONY: sc_ensure_testsuite_has_run
+
+## Ensure our warning and error messages do not contain duplicate 'warning:'
prefixes.
+## This test actually depends on the testsuite having been run before; but it
would be
+sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run
+ @if grep -E '(warning|error):.*(warning|error):' tests/*.log; then \
+ echo 'Duplicate warning/error message prefixes seen in above tests.'
>&2; \
+ exit 1; \
+ fi
+
sc_mkdir_p:
@if grep 'mkdir_p' $(srcdir)/automake.in \
$(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
diff --git a/Makefile.in b/Makefile.in
index d8e60c0..15d81ba 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -312,6 +312,7 @@ sc_tests_required_after_defs \
sc_tests_overriding_macros_on_cmdline \
sc_tests_plain_sleep \
sc_tests_plain_egrep_fgrep \
+sc_tests_logs_duplicate_prefixes \
sc_mkdir_p \
sc_perl_at_substs \
sc_unquoted_DESTDIR \
@@ -1180,6 +1181,19 @@ sc_tests_plain_egrep_fgrep:
exit 1; \
fi
+sc_ensure_testsuite_has_run:
+ @if test ! -f tests/test-suite.log; then \
+ echo "Run \`make check' before \`maintainer-check'" >&2; \
+ exit 1; \
+ fi
+.PHONY: sc_ensure_testsuite_has_run
+
+sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run
+ @if grep -E '(warning|error):.*(warning|error):' tests/*.log; then \
+ echo 'Duplicate warning/error message prefixes seen in above tests.'
>&2; \
+ exit 1; \
+ fi
+
sc_mkdir_p:
@if grep 'mkdir_p' $(srcdir)/automake.in \
$(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
diff --git a/NEWS b/NEWS
index 74887fb..13b28c0 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,9 @@ New in 1.11a:
- "make dist" can now create lzip-compressed tarballs.
+ - Messages of types warning or error from `automake' and `aclocal' are now
+ prefixed with the respective type, and presence of -Werror is noted.
+
Bugs fixed in 1.11a:
- Lots of minor bugfixes.
diff --git a/aclocal.in b/aclocal.in
index dc84762..9622711 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -435,7 +435,7 @@ sub scan_configure_dep ($)
# Make this just a warning, because we do not know whether
# the macro is actually used (it could be called conditionally).
msg ('unsupported', "$file:$line",
- "warning: macro `$2' not found in library");
+ "macro `$2' not found in library");
}
}
@@ -507,7 +507,7 @@ sub scan_file ($$$)
if ($number !~ /$serial_number_rx/go)
{
msg ('syntax', "$file:$.",
- "warning: ill-formed serial number `$number', "
+ "ill-formed serial number `$number', "
. "expecting a version string with only digits and dots");
}
elsif ($defun_seen)
@@ -559,7 +559,7 @@ sub scan_file ($$$)
$defun_seen = 1;
if (! defined $1)
{
- msg ('syntax', "$file:$.", "warning: underquoted definition of $2"
+ msg ('syntax', "$file:$.", "underquoted definition of $2"
. "\n run info '(automake)Extending aclocal'\n"
. " or see http://sources.redhat.com/automake/"
. "automake.html#Extending-aclocal")
diff --git a/automake.in b/automake.in
index d5e3ec2..4a753db 100644
--- a/automake.in
+++ b/automake.in
@@ -7914,8 +7914,9 @@ sub require_file_internal ($$$@)
# the top level Makefile. Furthermore Automake
# hasn't been asked to create the Makefile.in
# that distributes the aux dir files.
- error ($where, 'Please make a full run of automake'
- . " so $fullfile gets distributed.");
+ error ($where, 'please rerun automake without '
+ . "Makefile arguments\n"
+ . "so $fullfile gets distributed.");
}
}
}
diff --git a/lib/Automake/ChannelDefs.pm b/lib/Automake/ChannelDefs.pm
index ce6bf29..26ef575 100644
--- a/lib/Automake/ChannelDefs.pm
+++ b/lib/Automake/ChannelDefs.pm
@@ -163,6 +163,10 @@ register_channel 'verb', type => 'debug', silent => 1,
uniq_part => UP_NONE,
ordered => 0;
register_channel 'note', type => 'debug', silent => 0;
+setup_channel_type 'warning', header => 'warning: ';
+setup_channel_type 'error', header => 'error: ';
+setup_channel_type 'fatal', header => 'error: ';
+
=head2 FUNCTIONS
=over 4
@@ -381,6 +385,8 @@ Written by Alexandre Duret-Lutz E<lt>F<address@hidden>E<gt>.
=cut
+1;
+
### Setup "GNU" style for perl-mode and cperl-mode.
## Local Variables:
## perl-indent-level: 2
diff --git a/lib/Automake/Channels.pm b/lib/Automake/Channels.pm
index 050ba05..35897a5 100644
--- a/lib/Automake/Channels.pm
+++ b/lib/Automake/Channels.pm
@@ -164,7 +164,7 @@ functions. The possible keys, with their default value are:
The type of the channel. One of C<'debug'>, C<'warning'>, C<'error'>, or
C<'fatal'>. Fatal messages abort the program when they are output.
Error messages update the exit status. Debug and warning messages are
-harmless, except that warnings can be treated as errors of
+harmless, except that warnings are treated as errors if
C<$warnings_are_errors> is set.
=item C<exit_code =E<gt> 1>
@@ -204,10 +204,14 @@ C<US_LOCAL>, and C<US_GLOBAL> constants above.
=item C<header =E<gt> ''>
A string to prepend to each message emitted through this channel.
+With partial messages, only the first part will have C<header>
+prepended.
=item C<footer =E<gt> ''>
A string to append to each message emitted through this channel.
+With partial messages, only the final part will have C<footer>
+appended.
=item C<backtrace =E<gt> 0>
@@ -399,20 +403,24 @@ sub _format_sub_message ($$)
return $leader . join ("\n" . $leader, split ("\n", $message)) . "\n";
}
+# Store partial messages here. (See the 'partial' option.)
+use vars qw ($partial);
+$partial = '';
+
# _format_message ($LOCATION, $MESSAGE, %OPTIONS)
# -----------------------------------------------
# Format the message. Return a string ready to print.
sub _format_message ($$%)
{
my ($location, $message, %opts) = @_;
- my $msg = '';
+ my $msg = ($partial eq '' ? $opts{'header'} : '') . $message
+ . ($opts{'partial'} ? '' : $opts{'footer'});
if (ref $location)
{
# If $LOCATION is a reference, assume it's an instance of the
# Automake::Location class and display contexts.
my $loc = $location->get || $me;
- $msg = _format_sub_message ("$loc: ", $opts{'header'}
- . $message . $opts{'footer'});
+ $msg = _format_sub_message ("$loc: ", $msg);
for my $pair ($location->get_contexts)
{
$msg .= _format_sub_message ($pair->[0] . ": ", $pair->[1]);
@@ -421,8 +429,7 @@ sub _format_message ($$%)
else
{
$location ||= $me;
- $msg = _format_sub_message ("$location: ", $opts{'header'}
- . $message . $opts{'footer'});
+ $msg = _format_sub_message ("$location: ", $msg);
}
return $msg;
}
@@ -484,10 +491,6 @@ sub _dequeue ($)
}
-# Store partial messages here. (See the 'partial' option.)
-use vars qw ($partial);
-$partial = '';
-
# _print_message ($LOCATION, $MESSAGE, %OPTIONS)
# ----------------------------------------------
# Format the message, check duplicates, and print it.
@@ -511,6 +514,9 @@ sub _print_message ($$%)
$partial = '';
}
+ msg ('note', '', 'warnings are treated as errors', uniq_scope => US_GLOBAL)
+ if ($opts{'type'} eq 'warning' && $warnings_are_errors);
+
# Check for duplicate message if requested.
my $to_filter;
if ($opts{'uniq_part'} ne UP_NONE)
diff --git a/lib/Automake/Rule.pm b/lib/Automake/Rule.pm
index 68b3ea5..d7e7105 100644
--- a/lib/Automake/Rule.pm
+++ b/lib/Automake/Rule.pm
@@ -1,4 +1,5 @@
-# Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006, 2007, 2010 Free Software Foundation,
+# Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -615,7 +616,8 @@ sub define ($$$$$)
msg ('obsolete', $tdef->location,
"deprecated feature: target `$noexe' overrides "
. "`$noexe\$(EXEEXT)'\n"
- . "change your target to read `$noexe\$(EXEEXT)'");
+ . "change your target to read `$noexe\$(EXEEXT)'",
+ partial => 1);
msg ('obsolete', $where, "target `$target' was defined here");
}
# Don't `return ()' now, as this might hide target clashes
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index c340dc7..bf44c38 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -996,10 +996,10 @@ sub define ($$$$$$$$)
if (! $undef_cond->false)
{
error ($where,
- "Cannot apply `+=' because `$var' is not defined "
+ "cannot apply `+=' because `$var' is not defined "
. "in\nthe following conditions:\n "
. join ("\n ", map { $_->human } $undef_cond->conds)
- . "\nEither define `$var' in these conditions,"
+ . "\neither define `$var' in these conditions,"
. " or use\n`+=' in the same conditions as"
. " the definitions.");
}
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f51ebd7..2255af6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -763,6 +763,7 @@ warnopts.test \
werror.test \
werror2.test \
werror3.test \
+werror4.test \
whoami.test \
xsource.test \
xz.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 387af70..beb1ac9 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1003,6 +1003,7 @@ warnopts.test \
werror.test \
werror2.test \
werror3.test \
+werror4.test \
whoami.test \
xsource.test \
xz.test \
diff --git a/tests/comment5.test b/tests/comment5.test
index 21b5e87..6c66b53 100755
--- a/tests/comment5.test
+++ b/tests/comment5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ EOF
$ACLOCAL
AUTOMAKE_fails
-grep '^Makefile.am:5: blank line following trailing backslash' stderr
+grep '^Makefile.am:5: error: blank line following trailing backslash' stderr
## Here is a second test because head comments are
@@ -54,7 +54,7 @@ var = foo
EOF
AUTOMAKE_fails
-grep '^Makefile.am:2: blank line following trailing backslash' stderr
+grep '^Makefile.am:2: error: blank line following trailing backslash' stderr
## Make sure we print an 'included' stack on errors.
@@ -66,8 +66,9 @@ cat > Makefile.inc << 'EOF'
EOF
AUTOMAKE_fails
-grep '^Makefile.inc:2: blank line following trailing backslash' stderr
+grep '^Makefile.inc:2: error: blank line following trailing backslash' stderr
grep '^Makefile.am:1: .*included from here' stderr
+grep -v '^Makefile.am:1: .*error:' stderr
## Make sure backslashes are still allowed within a comment.
diff --git a/tests/condinc2.test b/tests/condinc2.test
index 69eff59..451c56f 100755
--- a/tests/condinc2.test
+++ b/tests/condinc2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2009, 2010 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ END
$ACLOCAL
AUTOMAKE_fails
-grep 'adjunct:3: too many conditionals closed' stderr
+grep 'adjunct:3: error: too many conditionals closed' stderr
cat > adjunct << 'END'
if TOBE
diff --git a/tests/distcom7.test b/tests/distcom7.test
index 500c909..646275c 100755
--- a/tests/distcom7.test
+++ b/tests/distcom7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2009, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -38,4 +38,4 @@ echo bin_PROGRAMS = foo > subdir/Makefile.am
$ACLOCAL
AUTOMAKE_fails --add-missing subdir/Makefile
-grep 'full run' stderr
+grep 'without.*Makefile.*arguments' stderr
diff --git a/tests/location.test b/tests/location.test
index 13a2183..21cfb4e 100755
--- a/tests/location.test
+++ b/tests/location.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -45,29 +45,35 @@ VAR = 1 \
END
$ACLOCAL
-AUTOMAKE_fails
+AUTOMAKE_fails -Wno-error
# 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:12: warning: VAR multiply defined in condition TRUE ...
Makefile.am:8: ... `VAR' previously defined here
-automake: libfoo_a_OBJECTS should not be defined
+automake: error: libfoo_a_OBJECTS should not be defined
Makefile.am:3: while processing library `libfoo.a'
-automake: use `libfoo_a_LDADD', not `libfoo_a_LIBADD'
+automake: error: 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: warning: 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$(EXEEXT)'...
+program.am: warning: redefinition of `libfoo.a$(EXEEXT)'...
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'...
+tags.am: warning: redefinition of `ctags'...
program.am: ... `ctags$(EXEEXT)' previously defined here
Makefile.am:6: while processing program `ctags'
EOF
diff expected observed || Exit 1
+
+AUTOMAKE_fails -Werror
+sed 's,^.*lib/am/\([a-z]*\.am\),\1,' stderr >observed
+( echo 'automake: warnings are treated as errors'; cat expected ) \
+ | diff - observed || Exit 1
+:
diff --git a/tests/ltinstloc.test b/tests/ltinstloc.test
index bb3203a..1b7fd83 100755
--- a/tests/ltinstloc.test
+++ b/tests/ltinstloc.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -49,10 +49,10 @@ AUTOMAKE_fails --add-missing
# whether automake installs config.guess and config.sub.
cat >expected <<'END'
-Makefile.am:5: sub/liba2.la multiply defined in condition COND
+Makefile.am:5: error: sub/liba2.la multiply defined in condition COND
Makefile.am:5: `sub/liba2.la' should be installed below `lib' in condition
COND ...
Makefile.am:2: ... and should also be installed in `lib' in condition COND.
-Makefile.am:4: liba1.la multiply defined in condition COND
+Makefile.am:4: error: liba1.la multiply defined in condition COND
Makefile.am:4: `liba1.la' should be installed in `pkglib' in condition COND ...
Makefile.am:2: ... and should also be installed in `lib' in condition COND.
Makefile.am:2: Libtool libraries can be built for only one destination.
diff --git a/tests/pluseq5.test b/tests/pluseq5.test
index 1f1c98c..5efe34e 100755
--- a/tests/pluseq5.test
+++ b/tests/pluseq5.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2010 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -34,10 +35,10 @@ AUTOMAKE_fails
# We expect the following diagnostic:
#
-# Makefile.am:4: Cannot apply `+=' because `INCLUDES' is not defined in
+# Makefile.am:4: cannot apply `+=' because `INCLUDES' is not defined in
# Makefile.am:4: the following conditions:
# Makefile.am:4: !CHECK
-# Makefile.am:4: Either define `INCLUDES' in these conditions, or use
+# Makefile.am:4: either define `INCLUDES' in these conditions, or use
# Makefile.am:4: `+=' in the same conditions as the definitions.
# Is !CHECK mentioned?
diff --git a/tests/pluseq9.test b/tests/pluseq9.test
index 31e1c8d..b7d6643 100755
--- a/tests/pluseq9.test
+++ b/tests/pluseq9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -55,10 +55,10 @@ AUTOMAKE_fails
# We expect the following diagnostic:
#
-# Makefile.am:19: Cannot apply `+=' because `B' is not defined in
+# Makefile.am:19: cannot apply `+=' because `B' is not defined in
# Makefile.am:19: the following conditions:
# Makefile.am:19: !COND1 and !COND3
-# Makefile.am:19: Either define `B' in these conditions, or use
+# Makefile.am:19: either define `B' in these conditions, or use
# Makefile.am:19: `+=' in the same conditions as the definitions.
#
# It would be nice if Automake could print only COND3_FALSE and
diff --git a/tests/vars3.test b/tests/vars3.test
index 3d10a90..3f61c90 100755
--- a/tests/vars3.test
+++ b/tests/vars3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ L05 = "$(bad boy)"
L06 = $(this:is= ok)
L07 = ${three errors}${on this} $(long line)
L08$(o u c h): $(wildcard *.c)
- ${another error}
+ ${another Error}
echo $${ok-this is}
L11: $(thisis) $(ok)
${here}
@@ -69,7 +69,7 @@ grep 'on this' stderr
grep 'long line' stderr
grep 'o u c h' stderr
grep 'wildcard' stderr
-grep 'another error' stderr
+grep 'another Error' stderr
grep 'thisis' stderr && Exit 1
grep 'here' stderr && Exit 1
diff --git a/tests/warnopts.test b/tests/warnopts.test
index 6d96400..b472164 100755
--- a/tests/warnopts.test
+++ b/tests/warnopts.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,14 +46,15 @@ END
$ACLOCAL
AUTOMAKE_fails
# The expected diagnostic is
-# Makefile.am:3: unused variable: `foo_SOURCES'
-# sub/Makefile.am:2: `INCLUDES' is the old name for `AM_CPPFLAGS'
+# Makefile.am:3: warning: variable `foo_SOURCES' is defined but no program or
+# library has `foo' as canonical name (possible typo)
+# sub/Makefile.am:2: warning: `INCLUDES' is the old name for `AM_CPPFLAGS'
grep '^Makefile.am:.*foo_SOURCES' stderr
grep '^sub/Makefile.am:.*INCLUDES' stderr
grep '^sub/Makefile.am:.*foo_SOURCES' stderr && Exit 1
grep '^Makefile.am:.*INCLUDES' stderr && Exit 1
# Only three lines of warnings.
-test `wc -l < stderr` = 3
+test `grep -v 'warnings are treated as errors' stderr | wc -l` = 3
# On fast machines the autom4te.cache created during the above run of
# $AUTOMAKE is likely to have the same time stamp as the configure.in
diff --git a/tests/werror3.test b/tests/werror4.test
similarity index 56%
copy from tests/werror3.test
copy to tests/werror4.test
index 96b4ff3..831d0fd 100755
--- a/tests/werror3.test
+++ b/tests/werror4.test
@@ -14,8 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure a per-Makefile.am -Werror setting is not carried over
-# to another Makefile.am.
+# -Werror and local -Werror settings should be flagged for the user.
. ./defs || Exit 1
@@ -29,21 +28,41 @@ END
mkdir sub
cat >sub/Makefile.am <<\END
AUTOMAKE_OPTIONS = -Werror
+SUB = foo
+SUB = bar
END
cat >Makefile.am <<\END
+AUTOMAKE_OPTIONS = -Werror
VAR = foo
VAR = bar
END
$ACLOCAL
-# The issue would not manifest with threaded execution.
-unset AUTOMAKE_JOBS || :
-AUTOMAKE_run 0 -Wno-error
+AUTOMAKE_fails -Wno-error
+grep 'VAR multiply defined' stderr
+grep 'SUB multiply defined' stderr
+test `grep -c 'warnings are treated as errors' stderr` -eq 1
+
+sed '/AUTOMAKE_OPTIONS/d' sub/Makefile.am > t
+mv -f t sub/Makefile.am
+
+AUTOMAKE_fails -Wno-error
grep 'VAR multiply defined' stderr
+grep 'SUB multiply defined' stderr
+test `grep -c 'warnings are treated as errors' stderr` -eq 1
+
+sed '/AUTOMAKE_OPTIONS/d' Makefile.am > t
+mv -f t Makefile.am
+
+AUTOMAKE_fails -Werror
+grep 'VAR multiply defined' stderr
+grep 'SUB multiply defined' stderr
+test `grep -c 'warnings are treated as errors' stderr` -eq 1
-AUTOMAKE_JOBS=2
-export AUTOMAKE_JOBS
AUTOMAKE_run 0 -Wno-error
grep 'VAR multiply defined' stderr
+grep 'SUB multiply defined' stderr
+grep 'warnings are treated as errors' stderr && Exit 1
+
:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-149-g1655285,
Ralf Wildenhues <=