Re: m4/autoconf quoting difference in include()

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

 



# nbowler@xxxxxxxxxxxxxxxx / 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

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux