[EMAIL PROTECTED] writes:
> Paul Jarc wrote:
>> [EMAIL PROTECTED] (Himanshu Garg) wrote:
>> > Could you give me an example by which I could use m4 for c
>> > preprocessing such as that for replacing #include<file.h> by its
>> > contents.
>>
>> m4 wouldn't use the same syntax or search path as the C preprocessor,
>> but it can do file inclusion:
>> include(`/usr/include/file.h')
>> See the m4 documentation for more.
>
> Thanks for the reply Paul. This won't do for me. In my case I would
> like to treat statements beginning with % as preprocessor stmts.
So just write
define([%include], [include([$1])])
or whatever variation you like. You can extend m4 with you own custom
macros to do whatever you like.
Regards,
Roger
--
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
_______________________________________________
help-gnu-utils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnu-utils