I once used gcc for this purpose. You can just run the pre-processor and save the output.
I also have used m4. It's a bit more powerful than gcc and is language agnostic. I have since bagged both of those and use ant's filterchains. I use the ExpandProperties and ReplaceTokens filterchains instead of #defines. I use the ConcatFilter filterchain or the Concat task instead of #includes. -----Original Message----- From: Tim Gordon [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 13, 2005 8:30 AM To: user@ant.apache.org Subject: C preprocessor driven from ANT? Hi Does anyone know of a pure-Java pre-processor that can handle c-style multiple #include and nested #defines? Our DB build is preceded by the SQL being subject to some C-style pre-processing before the stored procs are run into the DB. Our DB build is done outside of ANT using make at the moment but the only barrier to driving it from ANT is the fact that this C-style pre-processing has to take place. Obviously I'm after a pure-Java implementation so that I don't have to worry about cross-platform issues, otherwise I'd just exec a resident native binary pre-processor. Tim Allustra Limited 85 Gracechurch Street London EC3V 0AA Tel +44 (0)20 7469 8640 Fax +44 (0)20 7469 8689 http://www.allustra.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]