In a Makefile, I would simply specify
.a.b:
do_something_with_a $< --output=$*.b
How do I do exactly that in ant? I haven’t seen this in any documentation, and can’t get it to work with ant.
For those who don’t know make, the first part specifies two kind of files, those with .a extension and those with .b extension. Further it specifies that the bs are dependent on the as, such that if filename.b does not exist or is older than filename.a, the command rule should be applied. The command rule specifies that the command “do_something_with_a” is called with the arguments “filename.a” and “–output==filename.b” for every such filename.
I will test your solution with ant-1.8.4 and accept the first that works. File locations may be specified.
This abstract dependency is not possible in ant.