ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shug Boabby" <>
Subject Detecting modified times and exiting a target
Date Sat, 26 Jul 2008 12:21:53 GMT
Hi all,

I am utterly failing at attempting to implement some logic in an ant
script, I was hoping somebody here could help.

I have a target which calls an external (non-standard) compiler. The
compiler takes a directory as a parameter and recursively compiles
everything inside that folder to an output folder, but it is not smart
enough to know when it is not necessary to do the compilation. (i.e. 2
calls to the target will result in the compilation step being started
from scratch each time, despite the source folder not changing).

In this target, I need to implement the following logic:-

- get the latest modified time of the source folder (looking
recursively at all files)
- get the latest modified time of the output folder (looking
recursively at all files)
- if the output folder has been modified since the source folder, then
exit the task

Could somebody please help me implement this in ant-speak?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message