ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <>
Subject Re: A couple of usefull tasks
Date Mon, 10 Mar 2003 12:53:55 GMT
Slightly modified versions of them are in ant-contrib cvs now.
(using paths for targetfiles and sourcefiles, and useing
 sequential/parrallel for do) They are a little more verbose,
but are better organized.

Before placing the tasks on the list on friday, I did have a 
quick look at dependset, which I only noticied last week,
but was too tired to figure out how to modify it.

On Friday 07 March 2003 22:37, Dominique Devienne wrote:
> Well, it seems your tasks made it to Ant-Contrib, so I guess their not lost
> after all... --DD
> -----Original Message-----
> From: Dominique Devienne []
> Sent: Friday, March 07, 2003 4:27 PM
> To: 'Ant Users List'
> Subject: RE: A couple of usefull tasks
> Thanks for sharing that. Do you know about the <dependset> task? It sounds
> a lot like your <outofdate>, except that it just deletes all target files
> if out of date, does *not* tell you it did, and doesn't allow a nested <do>
> as in your task. Your task fills all these deficiencies nicely it seems.
> This is just to say that your chances, if incorporated to <dependset>,
> would have a much better chance to make it to Ant itself, provided you
> invested the time to add unit tests and doc for them. This would make them
> available to a lot of people, as opposed to a few that pick up custom tasks
> on the mailing list...
> Just thought you might be interested to know. --DD
> -----Original Message-----
> From: peter reilly []
> Sent: Friday, March 07, 2003 11:08 AM
> To:;
> Subject: A couple of usefull tasks
> Included is a couple of useful tasks. I am currently moving
> a load of makefiles to ant and found that there were a number
> of make targets like:
> generated.h generated.cpp : mib.mib ../include/common.h
>     mibgen -i ../include mib.mib -c generated.cpp
>     mibgen -i ../include mib.mib -h generated.h
> In other words multiple targets depend on multiple sources.
> This is possible to do in ant with uptodate and exec or script, however
> it is not nice.
> The two tasks I use are outoutdate and shellscript. Shellscript is
> a modification of a task submitted to ant-contrib by stephan beal (sgbeal)
> patch number 547018 (modified to use a temp file and not a fixed file)
> and outofdate is a modification of uptodate which allows multible targets
> and contains an embedded do element.
> Using these tasks the make extract above can be encoded as (assuming
> defines for gen.dir, include.dir and mib.dir):
> <outofdate>
>     <targetfile name="${gen.dir}/generated.h"/>
>     <targetfile name="${gen.dir}/generated.cpp"/>
>     <srcfile name="${mib.dir}/mib.mib"/>
>     <srcfile name="${include.dir}/common.h"/>
>     <do>
>         <shellscript shell="bash">
>                 mibgen -i ../include mib.mib -c generated.cpp
>                 mibgen -i ../include mib.mib -h generated.h
>        </shellscript>
>     </do>
> </outofdate>
> This is a bit more verbose than the make extract, but it is quite
> easy to understand.
> Peter
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message