autoconf-patches
[Top][All Lists]
Advanced

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

Re: aclocal problems


From: Ralf Wildenhues
Subject: Re: aclocal problems
Date: Fri, 10 Apr 2009 08:32:51 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

<http://thread.gmane.org/gmane.comp.sysutils.automake.general/10429/focus=10431>

Hi Eric, John,

* John Calcote wrote on Sat, Apr 04, 2009 at 06:55:46AM CEST:
> On 4/3/2009 5:31 PM, Ralf Wildenhues wrote:
>> * John Calcote wrote on Fri, Apr 03, 2009 at 09:33:40PM CEST:
>>    
>>> On page 158, paragraph 3 of the 2.63 Autoconf manual, it states:
>>>
>>> "If a macro doesn’t use AC_REQUIRE, is expected to never be the object
>>> of an AC_REQUIRE directive, and macros required by other macros inside
>>> arguments do not need to be expanded before this macro, then use
>>> m4_define."
> ...
>>> Is this a bug in aclocal?

>> I don't think so.  Do you think the quote is an encouragement not to use
>> AC_REQUIRE?

> Hmmm. No, I don't think it's an encouragement not to use AC_REQUIRE.
[...]
> I agree completely with your assessment, but I think the manual should  
> make it clear that the only proper way to write a macro is with  
> AC_DEFUN, don't you? I mean, if the only way I can write a macro outside  
> of adding it directly to configure.ac (which is pointless in all but the  
> strangest cases) is to use AC_DEFUN, then *when* would I ever be able to  
> successfully use m4_define? I suppose it might work in acsite.m4, as  
> that's not included by aclocal.m4.
>
> My only point is that the manual is a bit unclear on this point - almost  
> misleading, in fact.
>
> I'd call it a documentation bug at this point. (Eric - comments?)

Good point.  Public third-party macros should be AC_DEFUNed for this
reason.  OK to apply?

Thanks,
Ralf

    Note that AC_DEFUN is needed for aclocal.
    
    * doc/autoconf.texi (Coding Style): Public third-party macros
    should be AC_DEFUN'ed.
    Report by John Calcote.

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 47c4c24..d715fe4 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -13554,6 +13554,9 @@ macro doesn't use @code{AC_REQUIRE}, is expected to 
never be the object
 of an @code{AC_REQUIRE} directive, and macros required by other macros
 inside arguments do not need to be expanded before this macro, then
 use @code{m4_define}.  In case of doubt, use @code{AC_DEFUN}.
+Also take into account that public third-party macros need to use
address@hidden in order to be found by @command{aclocal}
+(@pxref{Extending aclocal,,, automake, @acronym{GNU} Automake}).
 All the @code{AC_REQUIRE} statements should be at the beginning of the
 macro, and each statement should be followed by @code{dnl}.
 




reply via email to

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