[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: m4/autoconf quoting difference in include()
From: |
Roman Neuhauser |
Subject: |
Re: m4/autoconf quoting difference in include() |
Date: |
Thu, 17 Jul 2014 14:08:17 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
# address@hidden / 2014-07-16 14:33:34 -0400:
> On 2014-07-16 17:17 +0200, Roman Neuhauser wrote:
> > (this is a resend with a proper subject, sorry)
> >
> > i had some trouble figuring out how to get the include macro inside
> > another (parameterized) macro.
> [...]
> > this fails in configure.ac (autoconf 2.69):
> >
> > m4_define([nodot], [[\([_0-9a-zA-Z]+\)]])
> > m4_define([reversion], [^nodot\.nodot\.nodot$])
> > m4_define([getver], [regexp($1, reversion, $2)])
> > m4_define([readver], [getver(m4_include($1), [\&])])
> > m4_define([ver], readver([VERSION]))
> >
> > messages:
> >
> > aclocal: error: configure.ac:7: file '$1' does not exist
> > autoreconf: aclocal failed with exit status: 1
>
> Autoconf/m4 have no problem with using m4_include in this manner
> (although you have some quoting issues).
Nick, can you help me with those quoting issues a bit? i'm getting
really confused here. one thing i'm really curious about: why do i have
to double-quote the nodot value? if i don't, ver is empty no matter if
i quote the $1, $2 in getver or not.
--
roman