On 07/17/2011 01:15 AM, John Allsup (M4) wrote:
Hi,
I am relatively new to m4, but can't seem to find an equivalent to include that
bypasses macro expansion.
If you are okay with GNU extensions, then the 'undivert' macro is what
you are looking for:
http://www.gnu.org/software/m4/manual/m4.html#Undivert
Suppose file 'a' contains
hello world
and file 'b' contains
goodbye world
and in my m4 I have defined
define(world,and).
I'd recommend getting in the habit of using full quoting:
define(`world', `and')
I a macro which I will call 'oinclude' such that
include(a) oinclude(b)
expands to
hello and goodbye world.
include(`a') undivert(`b').
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org