autoconf
[Top][All Lists]
Advanced

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

sadf


From: Roman Neuhauser
Subject: sadf
Date: Wed, 16 Jul 2014 16:55:59 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

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), [\&])])

  readver([VERSION])

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

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).

-- 
roman



reply via email to

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