[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Error and warning message formatting cleanups.
From: |
Ralf Wildenhues |
Subject: |
Error and warning message formatting cleanups. |
Date: |
Sun, 25 Apr 2010 19:26:02 +0200 |
User-agent: |
Mutt/1.5.20 (2009-10-28) |
Another fairly trivial cleanup/GCS compliance patch for messages, analog
to the change in Automake. I used simple greps/seds to find potential
offenders, so this is probably not complete.
OK to commit?
Thanks,
Ralf
Error and warning message formatting cleanups.
* doc/autoconf.texi (Autoconf Language, Generic Structures):
Do not capitalize the first word in error messages, do not end
them with a period.
* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS, AC_MSG_FAILURE):
Likewise.
* lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Likewise.
* lib/autotest/general.m4 (AT_INIT, at_fn_group_prepare):
Likewise.
* m4/m4.m4 (AC_PROG_GNU_M4): Likewise.
* tests/base.at (AC_TRY_COMMAND): Likewise.
* tests/torture.at (datarootdir workaround): Adjust expected
message.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 1ffaeab..fb4710b 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -1175,7 +1175,7 @@ Autoconf Language
AC_CHECK_HEADER([stdio.h],
[AC_DEFINE([HAVE_STDIO_H], [1],
[Define to 1 if you have <stdio.h>.])],
- [AC_MSG_ERROR([Sorry, can't do anything for you])])
+ [AC_MSG_ERROR([sorry, can't do anything for you])])
@end example
@noindent
@@ -1185,7 +1185,7 @@ Autoconf Language
AC_CHECK_HEADER([stdio.h],
[AC_DEFINE([HAVE_STDIO_H], 1,
[Define to 1 if you have <stdio.h>.])],
- [AC_MSG_ERROR([Sorry, can't do anything for you])])
+ [AC_MSG_ERROR([sorry, can't do anything for you])])
@end example
@noindent
@@ -1204,7 +1204,7 @@ Autoconf Language
AC_CHECK_HEADER(stdio.h,
[AC_DEFINE(HAVE_STDIO_H, 1,
[Define to 1 if you have <stdio.h>.])],
- [AC_MSG_ERROR([Sorry, can't do anything for you])])
+ [AC_MSG_ERROR([sorry, can't do anything for you])])
@end example
@noindent
@@ -1220,7 +1220,7 @@ Autoconf Language
AC_CHECK_HEADER(stdio.h,
AC_DEFINE(HAVE_STDIO_H, 1,
Define to 1 if you have <stdio.h>.),
- AC_MSG_ERROR([Sorry, can't do anything for you]))
+ AC_MSG_ERROR([sorry, can't do anything for you]))
@end example
In other cases, you may have to use text that also resembles a macro
@@ -6465,7 +6465,7 @@ Generic Structures
@example
AC_CHECK_MEMBER([struct passwd.pw_gecos], [],
- [AC_MSG_ERROR([We need `passwd.pw_gecos'!])],
+ [AC_MSG_ERROR([we need `passwd.pw_gecos'])],
[[#include <pwd.h>]])
@end example
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index dfcc2b3..b7ac62f 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -873,7 +873,7 @@ do
x_libraries=$ac_optarg ;;
-*) AC_MSG_ERROR([unrecognized option: `$ac_option'
-Try `$[0] --help' for more information.])
+Try `$[0] --help' for more information])
;;
*=*)
@@ -942,8 +942,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used.])
+ AC_MSG_WARN([if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used])
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -2223,7 +2223,7 @@ m4_copy([AS_ERROR], [AC_MSG_ERROR])
m4_define([AC_MSG_FAILURE],
[{ AS_MESSAGE([error: in `$ac_pwd':], 2)
AC_MSG_ERROR([$1
-See `config.log' for more details.], [$2]); }])
+See `config.log' for more details], [$2]); }])
# _AC_MSG_LOG_CONFTEST
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index 63ac5ae..b12a4bd 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -673,7 +673,7 @@ m4_ifndef([AC_DATAROOTDIR_CHECKED],
{ ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[[ ]]*datarootdir[[ ]]*:*=/p' "$tmp/out"`;
test -z "$ac_out"; } &&
AC_MSG_WARN([$ac_file contains a reference to the variable `datarootdir'
-which seems to be undefined. Please make sure it is defined.])
+which seems to be undefined. Please make sure it is defined])
])dnl
rm -f "$tmp/stdin"
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index 1aa147d..ac8f523 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -631,7 +631,7 @@ m4_divert_push([PARSE_ARGS_END])dnl
done
# Verify our last option didn't require an argument
-AS_IF([test -n "$at_prev"], [AS_ERROR([`$at_prev' requires an argument.])])
+AS_IF([test -n "$at_prev"], [AS_ERROR([`$at_prev' requires an argument])])
# Selected test groups.
if test -z "$at_groups"; then
@@ -1096,7 +1096,7 @@ at_fn_group_prepare ()
at_group_dir=$at_suite_dir/$at_group_normalized
at_group_log=$at_group_dir/$as_me.log
_AS_CLEAN_DIR("$at_group_dir") ||
- AS_WARN([test directory for $at_group_normalized could not be cleaned.])
+ AS_WARN([test directory for $at_group_normalized could not be cleaned])
# Be tolerant if the above `rm' was not able to remove the directory.
AS_MKDIR_P(["$at_group_dir"])
diff --git a/m4/m4.m4 b/m4/m4.m4
index 4a2d0d1..277b9c0 100644
--- a/m4/m4.m4
+++ b/m4/m4.m4
@@ -51,8 +51,8 @@ GNU M4 1.4.6 or later is required; 1.4.14 is recommended])])])
if test x$ac_had_posixly_correct = xyes; then
POSIXLY_CORRECT=:
if test $ac_cv_prog_gnu_m4_gnu = no; then
- AC_MSG_WARN([The version of M4 that was found does not support -g.])
- AC_MSG_WARN([Using it with POSIXLY_CORRECT set may cause problems.])
+ AC_MSG_WARN([the version of M4 that was found does not support -g])
+ AC_MSG_WARN([using it with POSIXLY_CORRECT set may cause problems])
fi
fi
AC_CACHE_CHECK([how m4 supports trace files], [ac_cv_prog_gnu_m4_debugfile],
diff --git a/tests/base.at b/tests/base.at
index 5ce3e89..19b8f88 100644
--- a/tests/base.at
+++ b/tests/base.at
@@ -291,13 +291,13 @@ if AC_TRY_COMMAND([(echo "The Cat in the Hat";
grep \^The\ Cat\ in\ the\ Hat\$ >/dev/null]); then
:
else
- AC_MSG_ERROR([Didn't see the Cat in the Hat!])
+ AC_MSG_ERROR([didn't see the Cat in the Hat])
fi
if AC_TRY_COMMAND([(echo "The Cat in the Hat";
echo "The Hat in the Cat" >&2) |
grep \^The\ Hat\ in\ the\ Cat\$ >/dev/null]); then
- AC_MSG_ERROR([Saw the Hat in the Cat!])
+ AC_MSG_ERROR([saw the Hat in the Cat])
fi
]])
diff --git a/tests/torture.at b/tests/torture.at
index b68a21d..1eefd71 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -1094,7 +1094,7 @@ AT_CHECK_AUTOCONF
AT_CHECK_CONFIGURE([], [], [],
[config.status: WARNING: 'Foo.in' seems to ignore the --datarootdir setting
config.status: WARNING: Bar contains a reference to the variable `datarootdir'
-which seems to be undefined. Please make sure it is defined.
+which seems to be undefined. Please make sure it is defined
])
AT_CHECK([grep datarootdir Foo], 1, [])
- Error and warning message formatting cleanups.,
Ralf Wildenhues <=