[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] {maint} Document in detail some limitations of aclocal.
From: |
Nick Bowler |
Subject: |
Re: [PATCH] {maint} Document in detail some limitations of aclocal. |
Date: |
Thu, 4 Nov 2010 17:47:42 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On 2010-11-04 22:28 +0100, Stefano Lattarini wrote:
> On Thursday 04 November 2010, Nick Bowler wrote:
> > On 2010-11-04 20:47 +0100, Stefano Lattarini wrote:
> > > +AC_DEFUN([MY_DEFUN], [m4_apply([AC_DEFUN], [$1], [$2])])
> >
> > This is insufficiently quoted, it should be:
> > [m4_apply([AC_DEFUN], [[$1], [$2]])]
> I'm not an m4 quoting guru, but I think that one single level of quotes
> is sufficient to avoid *spurious* expansions. Do you have any reason or
> example showing that two levels of quotes are indeed needed?
"Insufficient quoting" was probably the wrong term to use here -- you
are right that spurious expansion is avoided. The problem is the use
of m4_apply, which takes two arguments: the first is the (quoted) name
of the macro, and the second is the (quoted) list of arguments. So in
effect, this MY_DEFUN macro will only ever call AC_DEFUN with one
argument (because the third argument to m4_apply is discarded).
For a specific example, try running the configure script generated by
the following configure.ac:
AC_INIT([test], [1.0])
AC_DEFUN([DEFONE], [m4_apply([AC_DEFUN], [$1], [$2])])
AC_DEFUN([DEFTWO], [m4_apply([AC_DEFUN], [[$1], [$2]])])
DEFONE([HELLO], [echo "Hello, World"])
DEFTWO([GOODBYE], [echo "Goodbye, World"])
HELLO
GOODBYE
AC_OUTPUT
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
- [PATCH] {maint} Document in detail some limitations of aclocal. (was: Re: Strangeness with m4_include and aclocal.), Stefano Lattarini, 2010/11/04
- Re: [PATCH] {maint} Document in detail some limitations of aclocal. (was: Re: Strangeness with m4_include and aclocal.), Nick Bowler, 2010/11/04
- Re: [PATCH] {maint} Document in detail some limitations of aclocal., Stefano Lattarini, 2010/11/04
- Re: [PATCH] {maint} Document in detail some limitations of aclocal.,
Nick Bowler <=
- Re: [PATCH] {maint} Document in detail some limitations of aclocal., Stefano Lattarini, 2010/11/04
- Re: [PATCH] {maint} Document in detail some limitations of aclocal., Stefano Lattarini, 2010/11/04
- Re: [PATCH] {maint} Document in detail some limitations of aclocal., Gary V. Vaughan, 2010/11/04
- Re: [PATCH] {maint} Document in detail some limitations of aclocal., Stefano Lattarini, 2010/11/05
Re: [PATCH] {maint} Document in detail some limitations of aclocal., Ralf Wildenhues, 2010/11/04