ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan.C...@milliman.com
Subject Re: How to generate a C header file using ANT?
Date Tue, 21 Oct 2003 21:20:56 GMT
Hi Robert:

I looked at every ant task but echo, the obvious is always overlooked.

This is exactly what I was looking for.
Thanks!





Robert Clark <Robert.Clark@quest.com>
10/21/2003 03:59 PM
Please respond to "Ant Users List"

 
        To:     Ant Users List <user@ant.apache.org>
        cc: 
        Subject:        Re: How to generate a C header file using ANT? 


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





**************************************************************************************
This communication is intended solely for the addressee and is
confidential. If you are not the intended recipient, any disclosure, 
copying, distribution or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. Unless indicated
to the contrary: it does not constitute professional advice or 
opinions upon which reliance may be made by the addressee or any
other party, and it should be considered to be a work in progress.
**************************************************************************************


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


Mime
View raw message