ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Fisher" <>
Subject RE: incremental building
Date Thu, 10 May 2001 15:29:52 GMT

We are dealing with the same problem, and unfortunately, the solution is not
that easy. The main problem is that the generated .java file names are
derived from the *content* of the .idl files, not the filenames of the .idl
files. In other words, does not come from Foo.idl. Rather,
would come from XXX.idl, where XXX.idl contains an *interface* called Foo.
This makes everything quite harder.

But, I've found that for Visibroker, the idl2java tool is actually pretty
smart; it only regenerates files that it needs to generate (i.e., that have
changed). Unfortunately, with a lot of IDL files present, the result is
still rather slow, so I've made an "idl" target, a "compile" target, and a
"build" target (which contains both idl and compile as dependencies).


> 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" />
> </uptodate>
> <target .... unless="no-idl-regen">
>   run idl2java on Foo.idl
> </target>
> 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" />
> </apply>
> 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.
> Stefan

View raw message