search path when suggesting to add a macro in configure.ac.
People are confused when Automake suggests adding a macro (such as
AC_PROG_LIBTOOL) that is already in configure.ac.
* automake.in (require_file_internal): Suggest `automake --add-missing'
for missing files that can be installed.
* tests/library3.test: Adjust.
+2005-07-27 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * lib/Automake/Variable.pm (require_variables): Mention aclocal's
+ search path when suggesting to add a macro in configure.ac.
+ People are confused when Automake suggests adding a macro (such as
+ AC_PROG_LIBTOOL) that is already in configure.ac.
+ * automake.in (require_file_internal): Suggest `automake --add-missing'
+ for missing files that can be installed.
+ * tests/library3.test: Adjust.
+
2005-07-27 Stepan Kasal <kasal@ucw.cz>
* tests/defs.in: When required matches both `*libtool*' and
my $message = "required file `$fullfile' not found";
if ($add_missing)
{
- if (-f ("$libdir/$file"))
+ if (-f "$libdir/$file")
{
$suppress = 1;
}
}
}
+ else
+ {
+ $trailer = "\n `automake --add-missing' can install `$file'"
+ if -f "$libdir/$file";
+ }
# If --force-missing was specified, and we have
# actually found the file, then do nothing.
next VARIABLE
if $undef_cond->false;
$text .= ("in the following conditions:\n "
- . join ("\n ", map { $_->human } $undef_cond->conds));
+ . join ("\n ", map { $_->human } $undef_cond->conds)
+ . "\n");
}
++$res;
if (exists $_am_macro_for_var{$var})
{
- $text .= "\nThe usual way to define `$var' is to add "
- . "`$_am_macro_for_var{$var}'\nto `$configure_ac' and "
- . "run `aclocal' and `autoconf' again.";
+ my $mac = $_am_macro_for_var{$var};
+ $text .= " The usual way to define `$var' is to add "
+ . "`$mac'\n to `$configure_ac' and run `aclocal' and "
+ . "`autoconf' again.";
+ # aclocal will not warn about undefined macros unless it
+ # starts with AM_.
+ $text .= "\n If `$mac' is in `$configure_ac', make sure\n"
+ . " its definition is in aclocal's search path."
+ unless $mac =~ /^AM_/;
}
elsif (exists $_ac_macro_for_var{$var})
{
- $text .= "\nThe usual way to define `$var' is to add "
- . "`$_ac_macro_for_var{$var}'\nto `$configure_ac' and "
+ $text .= " The usual way to define `$var' is to add "
+ . "`$_ac_macro_for_var{$var}'\n to `$configure_ac' and "
. "run `autoconf' again.";
}
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
AUTOMAKE_fails
grep '^Makefile.am:.*: !A and !C and !D$' stderr
# Is there only one missing condition?
-test `grep ': ' stderr | wc -l` = 1 || exit 1
+test `grep ': !' stderr | wc -l` = 1 || exit 1