2010-04-26 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ 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.
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
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
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
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
@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
x_libraries=$ac_optarg ;;
-*) AC_MSG_ERROR([unrecognized option: `$ac_option'
-Try `$[0] --help' for more information.])
+Try `$[0] --help' for more information])
;;
*=*)
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
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
{ 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"
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
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"])
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],
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
]])
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, [])