Re: Process only sections of a file? (newbie)
Gary <[email protected]>
| Newsgroups | gmane.comp.gnu.m4.general |
|---|---|
| Message-ID | <[email protected]> |
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?