2010-04-25 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Warning and error message formatting cleanups.
+ * aclocal.in (parse_arguments, main): Remove trailing period or
+ newline in error or warning messages, avoid capitalization of
+ the first word of a message.
+ * automake.in (check_user_variables, handle_languages)
+ (handle_ltlibraries, scan_aclocal_m4, scan_autoconf_config_files)
+ (scan_autoconf_files, cond_stack_if, require_file_internal)
+ (usage, generate_makefile, parse_arguments): Likewise.
+ * lib/Automake/ChannelDefs.pm (set_strictness): Likewise.
+ * lib/Automake/Configure_ac.pm (find_configure_ac): Likewise.
+ * lib/Automake/Options.pm (set_strictness): Likewise.
+ * lib/Automake/Rule.pm (define): Likewise.
+ * lib/Automake/Variable.pm (define, variables_dump): Likewise.
+ * tests/ltinstloc.test, tests/suffix11.test: Adjust expected
+ error message.
+ * lib/Automake/Channels.pm (setup_channel): Reword error message
+ to be the same as in msg.
+
Fix placing of ellipses in English text and synopses.
* Makefile.am: Be sure to add a space before `...' in natural
language text.
}
if (exists $argopts{$ARGV[0]})
{
- fatal ("option `$ARGV[0]' requires an argument\n"
- . "Try `$0 --help' for more information.");
+ fatal ("option `$ARGV[0]' requires an argument.\n"
+ . "Try `$0 --help' for more information");
}
else
{
fatal ("unrecognized option `$ARGV[0]'\n"
- . "Try `$0 --help' for more information.");
+ . "Try `$0 --help' for more information");
}
}
if ($install && !@user_includes)
{
fatal ("--install should copy macros in the directory indicated by the"
- . "\nfirst -I option, but no -I was supplied.");
+ . "\nfirst -I option, but no -I was supplied");
}
if (! -d $system_includes[0])
while (1)
{
++$loop;
- prog_error "Too many loops." if $loop > 2;
+ prog_error "too many loops" if $loop > 2;
reset_maps;
scan_m4_files;
msg_cond_var ('gnu', $cond, $flag,
"`$flag' is a user variable, "
. "you should not override it;\n"
- . "use `AM_$flag' instead.");
+ . "use `AM_$flag' instead");
}
}
}
my $srcdir = dirname ($source);
if ($lang->ansi && $obj =~ /\$U/)
{
- prog_error "`$obj' contains \$U, but `$source' doesn't."
+ prog_error "`$obj' contains \$U, but `$source' doesn't"
if $source !~ /\$U/;
(my $source_ = $source) =~ s/\$U/_/g;
my $onlyone = ($dir ne $adir) ?
("\nLibtool libraries can be built for only one "
- . "destination.") : "";
+ . "destination") : "";
error ($liblocations{$val}{$acond},
"... and should also be $adirtxt$adircond.$onlyone");
push (@ac_deps, '$(ACLOCAL_M4_SOURCES)');
msg_var ('obsolete', 'ACLOCAL_M4_SOURCES',
"`ACLOCAL_M4_SOURCES' is obsolete.\n"
- . "It should be safe to simply remove it.");
+ . "It should be safe to simply remove it");
}
# Note that it might be possible that aclocal.m4 doesn't exist but
my ($local, @rest) = split (/:/);
@rest = ("$local.in",) unless @rest;
msg ('portability', $where,
- "Omit leading `./' from config file names such as `$local',"
- . "\nas not all make implementations treat `file' and `./file' equally.")
+ "omit leading `./' from config file names such as `$local',"
+ . "\nas not all make implementations treat `file' and `./file' equally")
if ($local =~ /^\.\//);
my $input = locate_am @rest;
if ($input)
. "should verify that $configure_ac invokes AM_INIT_AUTOMAKE,"
. "\nthat aclocal.m4 is present in the top-level directory,\n"
. "and that aclocal.m4 was recently regenerated "
- . "(using aclocal).");
+ . "(using aclocal)");
}
else
{
error ($seen_init_automake,
"your implementation of AM_INIT_AUTOMAKE comes from " .
"an\nold Automake version. You should recreate " .
- "aclocal.m4\nwith aclocal and run automake again.\n",
+ "aclocal.m4\nwith aclocal and run automake again",
# $? = 63 is used to indicate version mismatch to missing.
exit_code => 63);
}
{
error ($seen_init_automake,
"no proper implementation of AM_INIT_AUTOMAKE was " .
- "found,\nprobably because aclocal.m4 is missing...\n" .
+ "found,\nprobably because aclocal.m4 is missing.\n" .
"You should run aclocal to create this file, then\n" .
- "run automake again.\n");
+ "run automake again");
}
}
}
my $mac = $_am_macro_for_cond{$cond};
$text .= "\n The usual way to define `$cond' is to add ";
$text .= ($mac =~ / /) ? $mac : "`$mac'";
- $text .= "\n to `$configure_ac' and run `aclocal' and `autoconf' again.";
+ $text .= "\n to `$configure_ac' and run `aclocal' and `autoconf' again";
# These warnings appear in Automake files (depend2.am),
# so there is no need to display them more than once:
$scope = US_GLOBAL;
$trailer2 = "\n Consider adding the COPYING file"
. " to the version control system"
. "\n for your code, to avoid questions"
- . " about which license your project uses.";
+ . " about which license your project uses";
}
# Windows Perl will hang if we try to delete a
# that distributes the aux dir files.
error ($where, 'please rerun automake without '
. "Makefile arguments\n"
- . "so $fullfile gets distributed.");
+ . "so $fullfile gets distributed");
}
}
}
if (-e $out_file)
{
unlink ($out_file)
- or fatal "cannot remove $out_file: $!\n";
+ or fatal "cannot remove $out_file: $!";
}
my $gm_file = new Automake::XFile "> $out_file";
if (defined $output_directory)
{
- msg 'obsolete', "`--output-dir' is deprecated\n";
+ msg 'obsolete', "`--output-dir' is deprecated";
}
else
{
}
elsif (exists $argopts{$ARGV[0]})
{
- fatal ("option `$ARGV[0]' requires an argument\n"
- . "Try `$0 --help' for more information.");
+ fatal ("option `$ARGV[0]' requires an argument.\n"
+ . "Try `$0 --help' for more information");
}
else
{
fatal ("unrecognized option `$ARGV[0]'.\n"
- . "Try `$0 --help' for more information.");
+ . "Try `$0 --help' for more information");
}
}
my $errspec = 0;
foreach my $arg (@ARGV)
{
- fatal ("empty argument\nTry `$0 --help' for more information.")
+ fatal ("empty argument\nTry `$0 --help' for more information")
if ($arg eq '');
# Handle $local:$input syntax.
}
else
{
- prog_error "level `$name' not recognized\n";
+ prog_error "level `$name' not recognized";
}
}
sub setup_channel ($%)
{
my ($name, %opts) = @_;
- confess "channel $name doesn't exist" unless exists $channels{$name};
+ confess "unknown channel $name" unless exists $channels{$name};
_merge_options %{$channels{$name}}, %opts;
}
-# Copyright (C) 2003, 2005, 2006, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2006, 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
{
msg ('unsupported',
"`$configure_ac' and `$configure_in' both present.\n"
- . "proceeding with `$configure_ac'.");
+ . "proceeding with `$configure_ac'");
}
return $configure_ac
}
}
else
{
- prog_error "level `$strictness_name' not recognized\n";
+ prog_error "level `$strictness_name' not recognized";
}
}
-# Copyright (C) 2003, 2004, 2006, 2007, 2010 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
}
}
# Never reached.
- prog_error ("Unreachable place reached.");
+ prog_error ("unreachable place reached");
}
# Conditions for which the rule should be defined.
# definitions of multiple inference rules. It's also
# disallowed to mix plain targets with inference rules.
msg ('portability', $where,
- "Inference rules can have only one target before the colon (POSIX).")
+ "inference rules can have only one target before the colon (POSIX)")
if $inference_rule_count > 0 && $target_count > 1;
return @conds;
. $def->type . "=' here ...", partial => 1);
error ($where, "... and is now set with `$type=' here.");
prog_error ("Automake variable assignments should be consistently\n"
- . "defined with the same sign.");
+ . "defined with the same sign");
}
# If Automake tries to override a value specified by the user,
sub variables_dump ()
{
- my $text = "All variables:\n{\n";
+ my $text = "all variables:\n{\n";
foreach my $var (sort { $a->name cmp $b->name } variables)
{
$text .= $var->dump;
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.
+Makefile.am:2: Libtool libraries can be built for only one destination
END
grep '^Makefile.am' stderr | diff - expected
#! /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
$AUTOCONF
# What we do is not portable. Automake should warn.
AUTOMAKE_fails -a
-grep 'Inference rules can have only one target before the colon' stderr
+grep 'inference rules can have only one target before the colon' stderr
# But this should work anyway.
$AUTOMAKE -a -Wno-portability
./configure