[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: improve two diagnostics for newcomers
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: improve two diagnostics for newcomers |
Date: |
Wed, 27 Jul 2005 13:09:37 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) |
I'm installing this on HEAD.
2005-07-27 Alexandre Duret-Lutz <address@hidden>
* 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.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1608
diff -u -r1.1608 automake.in
--- automake.in 30 Jun 2005 22:23:10 -0000 1.1608
+++ automake.in 27 Jul 2005 11:05:55 -0000
@@ -7140,7 +7140,7 @@
my $message = "required file `$fullfile' not found";
if ($add_missing)
{
- if (-f ("$libdir/$file"))
+ if (-f "$libdir/$file")
{
$suppress = 1;
@@ -7183,6 +7183,11 @@
}
}
}
+ 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.
Index: lib/Automake/Variable.pm
===================================================================
RCS file: /cvs/automake/automake/lib/Automake/Variable.pm,v
retrieving revision 1.38
diff -u -r1.38 Variable.pm
--- lib/Automake/Variable.pm 23 Jun 2005 22:19:55 -0000 1.38
+++ lib/Automake/Variable.pm 27 Jul 2005 11:05:56 -0000
@@ -1125,21 +1125,28 @@
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.";
}
Index: tests/library3.test
===================================================================
RCS file: /cvs/automake/automake/tests/library3.test,v
retrieving revision 1.4
diff -u -r1.4 library3.test
--- tests/library3.test 14 May 2005 20:28:55 -0000 1.4
+++ tests/library3.test 27 Jul 2005 11:05:56 -0000
@@ -1,5 +1,5 @@
#! /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.
#
@@ -55,4 +55,4 @@
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
--
Alexandre Duret-Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: improve two diagnostics for newcomers,
Alexandre Duret-Lutz <=