From: Ralf Wildenhues Date: Sun, 25 Apr 2010 15:02:47 +0000 (+0200) Subject: Error and warning message formatting cleanups. X-Git-Tag: v2.66~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dc7189c00f37f9542ad8dba0c9266d372b0e117;p=thirdparty%2Fautoconf.git 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. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index b55bf7a1..454f5aaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,19 @@ 2010-04-26 Ralf Wildenhues + 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. + Fix placing of ellipses in English text. * lib/autoconf/general.m4 (_AC_INIT_HELP): Be sure to add a space before `...' in natural language text. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index fa6015f6..d6a08bc1 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -1175,7 +1175,7 @@ For instance: AC_CHECK_HEADER([stdio.h], [AC_DEFINE([HAVE_STDIO_H], [1], [Define to 1 if you have .])], - [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 @@ is quoted properly. You may safely simplify its quotation to: AC_CHECK_HEADER([stdio.h], [AC_DEFINE([HAVE_STDIO_H], 1, [Define to 1 if you have .])], - [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 @@ annoying, and would rewrite the example as follows: AC_CHECK_HEADER(stdio.h, [AC_DEFINE(HAVE_STDIO_H, 1, [Define to 1 if you have .])], - [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 @@ The following example is wrong and dangerous, as it is underquoted: AC_CHECK_HEADER(stdio.h, AC_DEFINE(HAVE_STDIO_H, 1, Define to 1 if you have .), - 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 @@ If no @var{includes} are specified, the default includes are used @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 ]]) @end example diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index dfcc2b31..b7ac62f2 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 63ac5ae7..b12a4bd5 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 1aa147d8..ac8f5239 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 4a2d0d17..277b9c02 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 5ce3e890..19b8f884 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 b68a21d8..1eefd71b 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, [])