Posted By:
Bent_Dalager
Posted On:
Tuesday, October 16, 2001 09:30 AM
I am currently doing a an apply task to compile a bunch of IDL files to Java source files. This always happens since there is no sensible timestamping to stop it when it isn't necessary. For example, I have no idea which generated Java files belong to which IDL source file. The java-to-idl tool I use just generates unconditionally so there is no help there. What I want to do is touch a file when I start building each IDL and use this touched file to determine whether or not to build each IDL file. My apply statement typically looks something like; (there's also some command line switches to jidl but you get the
More>>
I am currently doing a an apply task to compile a bunch of IDL
files to Java source files. This always happens since there is
no sensible timestamping to stop it when it isn't necessary.
For
example, I have no idea which generated Java files belong to
which IDL source file.
The java-to-idl tool I use just generates unconditionally so there
is no help there.
What I want to do is touch a file when I start building
each IDL and use this touched file to determine whether or not
to build each IDL file.
My apply statement typically looks something like;
(there's also some command line switches to jidl but you get the
idea)
I don't know how many IDL files there are so I can't make one
target per file. So, what I need to happen is for the apply task
to process each file in its fileset conditionally based either
upon properties or a timestamp check that I can specify.
This doesn't appear to be possible. This surprises me a bit
as I had expected Ant to allow some degree of creativity in
timestamp checking :-). Am I missing something?
The candidates for a solution that I have found do not seem
very useful in this case. There is dependset, which only removes
target files and that isn't very helpful since jidl doesn't
care. There is
condistion/uptodate, which
set a property, but I can see no way to have this property
affect the behaviour of apply except by making each jidl
call a separate target.
<<Less