ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Clark <Robert.Cl...@quest.com>
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, Dan.Crea@milliman.com 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 */
</echo>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message