[Top][All Lists]

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

Re: Process only sections of a file? (newbie)

From: Tom Browder
Subject: Re: Process only sections of a file? (newbie)
Date: Fri, 17 Sep 2010 11:58:44 -0500

On Fri, Sep 17, 2010 at 10:40, Gary <address@hidden> wrote:
> Eric Blake wrote:
>> On 09/15/2010 03:49 AM, Gary wrote:
>>> Sorry if this is obviously documented somewhere, but I couldn't find it
>>> (or perhaps found it and didn't understand it...).
>>> What I would like to do is only have m4 process certain sections of a
>>> file delimited by some given sequence (in my case outside<?php ... ?>
>>> tags). Is that possible?
>> changecom(`<?php', `?>') will treat all <?php...?> sequences as
>> comments, and thus not do any m4 processing of that portion of the text.
> Oh heck. TFM says "the first newline after a # ends the comment", so I
> don't think I can use this.
> I've got the problem that m4's include macro clashes with php's include
> statement. Any ideas how I can get around it? Could I, say, tell m4 that
> it should use #include instead of include?

Would undefining the m4 include macro do part of what you need?

With help from Eric I was able to work around cpp '#<word>' problems
to enable m4 filtering of c header files.


Thomas M. Browder, Jr.
Niceville, Florida

reply via email to

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