ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Clark <>
Subject Re: How to generate a C header file using ANT?
Date Tue, 21 Oct 2003 20:59:02 GMT
On Tue, 2003-10-21 at 16:36, wrote:
> I am trying to integrate versioning into our build process and I am 
> looking for a way to have ANT generate a C header file as one of its 
> targets.  Is there any built-in functionality I can use to do this?

 If you want, you can do this the easy way:

<echo file="${ouput}/include/version.h" append="false">
/* This is a generated file, do not edit */
#ifndef VERSION_H
#define VERSION_H

#define BUILD_NUMBER   ${build.number}
#define VERSION_NUMBER ${version.number}
#define ANT_HOME       "${ant.home}"

#endif /* VERSION_H */

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message