What's the Ant equivalent of the following pattern in Make files?
.flagfile : someSourceFiles
someCommand someSourceFiles && \
touch .flagfile
That is, I want to run some command only if I need to. The state
updated by the command is not accessible to make. (It's not a simple
output file whose timestamp can be checked by make.) Therefore, I use
a flag file to indicate when the command was last run, and modify the
build commands to update the timestamp of the flag file.
For a general-purpose command (not a specific defined task, but something
run with Exec or done with a sequence of file-system tasks (e.g., Copy)),
how would the above case be handled in Ant?
Is there any general way of comparing file timestamps? Can the results
of such a comparison be used in a target's "if" or "unless" attributes?
Can scripting features handle such timestamp checks and conditional
execution?
Thanks,
Daniel
--
Daniel Barclay
Digital Focus
[EMAIL PROTECTED]