ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject Re: A question about "available" and doing conditionals in a build xml file.
Date Thu, 18 May 2000 09:49:15 GMT
>>>>> "KW" == Ken Wood <kwood@i2.com> writes:

 KW> If I make the compile target depend on the idl2java target, then
 KW> every time I compile, the idl2java processing occurs and the
 KW> generated java files' time stamps change,

 KW> If I could set and TEST a property to see if one of the generated
 KW> files was present, I could suppress the idl2java processing, and
 KW> solve this problem.

This is where you would need an unless attribute on your target,
right?

I'd prefer another approach where idl2java would be a task of its own
that could check whether it needs to recompile anything at all. What
would you do if one of the generated files still lingered around but
you had changed you IDL files?

I think tasks that generate files from other files like javac, copy,
rmic and the not yet available idl2java or javacc should all check
whether they need to do anything themselves.

There have been idl2java tasks (two of them IIRC) sent to this list
during the last two weeks but I recall them to be vendor
specific. I've never been using CORBA myself and don't know whether a
generic idl2java task with vendor specific implementations (like javac
is the generic interface to javac and jikes) could be feasible.

As long as there is no unless attribute to targets and there is no
smart idl2java task, let's see what we can do:

1. Make your idl2java target depend on a property that can only be set
on the command line. This way idl2java wouldn't be run unless you
explicitly say so. Not nice but should work.

2. exclude the idl2java generated files from compilation if you know
they've been there before. This way idl2java would be run every time
but the generated files wouldn't be compiled unless needed.

Stefan

Mime
View raw message