bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pointless 'aclocal' warning


From: Ralf Wildenhues
Subject: Re: pointless 'aclocal' warning
Date: Mon, 11 May 2009 20:39:57 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Bruno,

thanks for the report.

* Bruno Haible wrote on Sun, May 10, 2009 at 05:52:49PM CEST:
> In the automake HEAD from today, but *not* in automake-1.10.2, this code
> in a .m4 file
> 
>   m4_ifdef([AM_XGETTEXT_OPTION],
>     [AM_XGETTEXT_OPTION([--flag=error:3:c-format])
>      AM_XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
> 
> triggers an 'aclocal' warning:
> 
> gnulib-m4/gnulib-comp.m4:176: warning: macro `AM_XGETTEXT_OPTION' not found 
> in library
> 
> How to reproduce:
> - Unpack libunistring-0.9.tar.gz from ftp.gnu.org
> $ cd libunistring-0.9.tar.gz
> $ build-aux/fixaclocal aclocal -I m4 -I gnulib-m4
> gnulib-m4/gnulib-comp.m4:176: warning: macro `AM_XGETTEXT_OPTION' not found 
> in library

I get this warning with aclocal-1.10 but not with aclocal-1.10c.
the difference between our setups is that my aclocal-1.10 also sees a
definition of AM_XGETTEXT_OPTION in its $prefix/share/aclocal, whereas
the other does not.

> I know I can work around the warning by using
> 
>   m4_ifdef([AM_XGETTEXT_OPTION],
>     [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
>      AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
> 
> but am I supposed to do such hacks?

No.  You are supposed to not use the AM_.* namespace, as that is
Automake's domain, and this warning is special for macros that belong to
Automake, and AM_XGETTEXT_OPTION is a gettext macro and has nothing to
do with Automake.  Yes, I know about and respect historic baggage, and
if you would prefer that we exclude a hard-coded list of exceptions for
old gettext macros, I would be fine with that, but in that case I'd say
that you shouldn't use the namespace for new macros.  Or, at the very
least, you should put new gettext macros in some easily regonizable
namespace only, maybe AM_.?GETTEXT.* or so.  That would help both code
distinguishing both, and users in finding the package a given macro
belongs to.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]