[Top][All Lists]

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

m4/autoconf quoting difference in include()

From: Roman Neuhauser
Subject: m4/autoconf quoting difference in include()
Date: Wed, 16 Jul 2014 17:17:46 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

(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 works in m4:

  changequote(`[', `]')

  define([nodot], [[\([_0-9a-zA-Z]+\)]])
  define([reversion], [^nodot\.nodot\.nodot$])
  define([getver], [regexp($1, reversion, $2)])
  define([readver], [getver(include($1), [\&])])


this fails in (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]))


  aclocal: error: file '$1' does not exist
  autoreconf: aclocal failed with exit status: 1

i can get it to work by quoting the m4_include macro name:

  m4_define([readver], [getver([m4_include]($1), [\&])])

why is this?  can you point me to the relevant passages in the manual?
i admit i haven't read it all (yet).


reply via email to

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