From: peter r. <pet...@co...> - 2003-03-10 13:51:17
|
Hi, Yes, it would be better to patch uptodate, however it may be difficult to do that as the assumptions (one target file -> multiple file= s) have changed. Also, the task/condition uses a fileset for sourcefiles, which meant that for multiple source files, the task would succeed if some of the source files were missing. Also, I wanted to reverse the logic as the targets being outofdate would cause actions more often than them not been outofdate. Initialially my build scripts where using constructions like: <if> <and> <uptodate srcfile=3D"xxx" targetfile=3D"xxx.out"/> <uptodate srcfile=3D"yyy" targetfile=3D"yy.out"/> </and> <else> </else> </if> which was a bit offputting... Using my custom extension patch (ant bugzilla 17199) one can use outofdate with if as follows: <typedef name=3D"outofdate"=20 classname=3D"net.sf.antcontrib.logic.OutOfDate"/> <if> <outofdate> <sourcefiles> <filelist dir=3D"." files=3D"xxx,yyy"/> </sourcefile> <targetfiles> <filelist dir=3D"." files=3D"xxx.out,yyy.out"/> </targetfile> </outofdate> <then> </then> </if> Which is a bit verbose :-) but easy to understand. Would it be better to use the "dependset" sub elements=20 (srcfileset, srcfilelist, targetfilelist, targetfileset) instead (from=20 e-mail by Dominique Devienne) <if> <outofdate> <srcfilelist dir=3D"." files=3D"xxx,yyy"/> <targetfilellist dir=3D"." files=3D"xxx.out,yyy.out"/> </outofdate> <then> </then> </if> Peter. On Monday 10 March 2003 07:01, Stefan Bodewig wrote: > On Fri, 07 Mar 2003, Matt Inger <mat...@us...> > > wrote: > > This is an extension of uptodate which allows multible > > targets and contains an embedded <parallel> or > > <sequential> element. > > Wouldn't it be better to patch <uptodate> for the multiple targets > part? > > > If any of the target file's dates are earlier than any of the > > source file's dates, then the specified <parallel> or > > >sequential> block is executed.</p> > > How is this different from putting the <parallel> or <sequential> into > the <then> part of an <if> task? I'm a little concerned about > duplication here. > > Stefan > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The debu= gger > for complex code. Debugging C/C++ programs can leave you feeling lost a= nd > disoriented. TotalView can help you find your way. Available on major U= NIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > Ant-contrib-developers mailing list > Ant...@li... > https://lists.sourceforge.net/lists/listinfo/ant-contrib-developers |