Re: Better error message for aclocal.m4 mismatch

2006-10-14 Thread Ralf Wildenhues
* Alexandre Duret-Lutz wrote on Sat, Oct 14, 2006 at 04:03:33PM CEST:
> >>> "RW" == Ralf Wildenhues <[EMAIL PROTECTED]> writes:
> 
>  RW> I'm pretty sure users will be confused about this error message --
>  RW> I even was.  I think the one below would be a bit better.

> I'm wary of suggesting to run `aclocal' as some people will feel
> compelled to run it as-is, without the necessary -I, and then
> send us hate mails.

Yes, that's not a good outcome.

> ISTR you complained against gettextize for something similar some days
> ago.

Yes.  I hope you didn't mean to imply that that was a hate mail.

> Personally I'd love to be able
> to suggest autoreconf, but its use is unfortunately not universal.

Yep.  :-/

> How about something like this:
> 
> aclocal.m4:17: error: this file was generated for autoconf 2.60.
> You have another version of autoconf.  If you want to use that, you
> should regenerate the build system entirely.
> aclocal.m4:17: the top level

Yeah, I guess that's good enough.  I've just used that and applied it.

> and we let the user choose its preferred course for regen?

Well, it may still generate maintenance traffic, but I guess that's
difficult to avoid.  (And if not for that message, then the same
question arises in other circumstances.)

> Or was there another source of confusion you were trying to address?

Nope.

Cheers,
Ralf




Re: Better error message for aclocal.m4 mismatch

2006-10-14 Thread Alexandre Duret-Lutz
>>> "RW" == Ralf Wildenhues <[EMAIL PROTECTED]> writes:

 RW> I'm pretty sure users will be confused about this error message --
 RW> I even was.  I think the one below would be a bit better.

 RW> One open issue with this is that the multiline warning isn't nicely
 RW> prefixed with everywhere:
 >> aclocal.m4:17: error: this file was generated for autoconf 2.60.
 >> To regenerate, remove `aclocal.m4' and rerun `aclocal';
 >> make sure the `autom4te' from the right Autoconf package is found.
 >> aclocal.m4:17: the top level

I agree the message could be improved.  

aclocal always erase the file if the Autoconf version changed,
you need not erase it by hand.

I'm wary of suggesting to run `aclocal' as some people will feel
compelled to run it as-is, without the necessary -I, and then
send us hate mails.  ISTR you complained against gettextize for
something similar some days ago.  Personally I'd love to be able
to suggest autoreconf, but its use is unfortunately not universal.


How about something like this:

aclocal.m4:17: error: this file was generated for autoconf 2.60.
You have another version of autoconf.  If you want to use that, you
should regenerate the build system entirely.
aclocal.m4:17: the top level

and we let the user choose its preferred course for regen?
Or was there another source of confusion you were trying to address?


Anyway, this is just a suggestion. Feel free to install whatever
wording you prefer.
-- 
Alexandre Duret-Lutz

Shared books are happy books. http://www.bookcrossing.com/friend/gadl





Better error message for aclocal.m4 mismatch

2006-10-13 Thread Ralf Wildenhues
I'm pretty sure users will be confused about this error message --
I even was.  I think the one below would be a bit better.

One open issue with this is that the multiline warning isn't nicely
prefixed with everywhere:
| aclocal.m4:17: error: this file was generated for autoconf 2.60.
| To regenerate, remove `aclocal.m4' and rerun `aclocal';
| make sure the `autom4te' from the right Autoconf package is found.
| aclocal.m4:17: the top level

But IMVHO it's still better to accept that than to wait for
m4_fatal_multiline and get a flood of bug reports.

OK?

Cheers,
Ralf

2006-10-14  Ralf Wildenhues  <[EMAIL PROTECTED]>

* aclocal.in (write_aclocal): Improve warning for mismatched
Autoconf version.

Index: aclocal.in
===
RCS file: /cvs/automake/automake/aclocal.in,v
retrieving revision 1.139
diff -u -r1.139 aclocal.in
--- aclocal.in  4 Aug 2006 08:42:54 -   1.139
+++ aclocal.in  14 Oct 2006 04:21:11 -
@@ -783,7 +783,9 @@
   # use it in the header below.  autom4te will output the name of
   # the file in the diagnostic anyway.
   $output = "m4_if(m4_PACKAGE_VERSION, [$ac_version],,
-[m4_fatal([this file was generated for autoconf $ac_version], [63])])
+[m4_fatal([this file was generated for autoconf $ac_version.
+To regenerate, remove `aclocal.m4' and rerun `aclocal';
+make sure the `autom4te' from the right Autoconf package is found.], [63])])
 
 $output";
 }