ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: help formulating an <uptodate>?
Date Wed, 24 Apr 2002 12:27:52 GMT
On Wed, 24 Apr 2002, stephan beal <stephan@einsurance.de> wrote:

> The dependency chain goes something like this:
> 
> - if foo.txt is newer than foo.xml, rebuild.
> - if *.tmpl are newer than foo.txt, rebuild.
> - if generator.pl is newer than foo.txt, rebuild.
> 
> (Note that when i say "rebuild", i mean "sets a flag which will
> eventually kick off the build.")
> 
> My instinct is to use several <uptodate> blocks to set a single
> flag,

Would work, you could also use dependset to delete foo.xml if either
foo.txt or *.tml or generator.pl is newer than it and then use
available to see if it still is there.

> but i'm really not sure how ant's "property immutability" applies
> there,

What you really want is to check for the opposite of uptodate, right?

<condition>
  <not>
    <and>
      <uptodate ...>  <!-- foo.xml is newer than foo.txt -->
      <uptodate ...>  <!-- foo.txt is newer than *.tmpl -->
      <uptodate ...>  <!-- foo.txt is newer than generator.pl -->
    </and>
  </not>
</condition>

may be better.

Stefan

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


Mime
View raw message