ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: incremental building
Date Thu, 10 May 2001 06:36:15 GMT
John Camelon <> wrote:

> the inherent timestamping using </tstamp> doesn't determine that
> these IDL's don't need to be regenerated

I think you are expecting far too much from the tstamp task - it just
sets a couple of properties initializing them from the current time.

What you really want is either <uptodate> or <apply>.  Assuming an
idlcompiler named idl2java that creates from Foo.idl (totally
made up, I'm sure things are little bit more complicated at your site,
but to give you an idea) you could do:

<uptodate property="no-idl-regen" targetfile="">
  <srcfiles dir="." includes="Foo.idl" />

<target .... unless="no-idl-regen">
  run idl2java on Foo.idl

or to do this in one pass (mapping all .idl files to .java files and
processing them in a single task):

<apply executable="idl2java">
  <srcfile />

  <fileset dir="." includes="**/*.idl" />
  <mapper type="glob" from="*.idl" to="*.java" />

which will recursively scan your basedir for files with the extension
.idl, compare their last modification time with the one of the
corresponding .java file (if present) and run the command if (1) the
.java file is not there or (2) is older than the .idl file.


View raw message