Well, it seems your tasks made it to Ant-Contrib, so I guess their not lost after all... --DD
-----Original Message----- From: Dominique Devienne [mailto:[EMAIL PROTECTED] 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 [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2003 11:08 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]