ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: custom 'compiler' dependencies
Date Thu, 07 Jun 2007 16:24:35 GMT
Use the <uptodate> task to check the verify the source vs. the target
files. This will allow you to set a property if the target is up to
date. Then, you can use this property when you call a target using the
"unless" parameter. That way, you don't run the target if the property
is set.

A bit easier to use is the <outofdate> task in the Ant Contrib tasks.
The <outofdate> task, like the <uptodate> task checks the timestamp of
your target vs. the timestamp of your sources. However, instead of
just setting a property, it will allow you to specify the tasks that
need to be executed.

The <dependset> task is just weird. It does the same thing as the
<uptodate> task, but removes all the targets if any of the targets are
not up to date. This really is only for tasks that do not regenerate
the targets if the targets are up to date, but you want to force all
targets to be rebuilt if any of them are out of date.

However, if you have a task that generates targets, but doesn't do a
good job to see if the target is already up to date, the <dependset>
task isn't what you want.

Hope this helps.

On 6/7/07, Dave Brosius <dbrosius@apache.org> wrote:
> Hello,
>
>     I'm trying to figure out how to build custom dependency rules for a
> custom 'compiler' i have written.
>
> I see the DependSet task which is sort of what i need, but i don't see in
> the docs where you can specify
>
>     if *.xml is newer than *.java, than run the tool that generates *.java
> from *.xml
>
> Anyone point me to the right info? thanks
>
> dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
--
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message