Checkout the uptodate task.
----- Original Message -----
From: "Jason Crickmer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 11:15 PM
Subject: basic file dependency
> I am new to the list, so please pardon me if this question has been
> asked before...
>
> We have moved from Make to Ant, but there are some lingering issues
> that I need to try to resolve. The most important is, how does file
> dependency work?
>
> Take this Makefile for example:
>
> .PHONY: mytarget
>
> CP_XERCES=/opt/ApacheGroup/xerces-1.2.3/xerces.jar
>
> mytarget: ../rel/etc/product.conf
>
> ../rel/etc/product.conf: Makefile etc/product.conf
> perl -p -e 's(_CP_XERCES_)(${CP_XERCES});' etc/product.conf > $@
>
>
> So, when run, if Makefile OR etc/product.conf is newer than
> ../rel/etc/product.conf, then the Perl command will be run. If not,
> nothing happens.
>
> The only way I see to do this in Ant would be to create a new variable
> and some how set it to true or false depending on the file age
> compared to its source. But, the only thing I have found based on
> modification times is the "copy" task.
>
> Any assistance is appreciated!
>
> Thanks,
> Jason
>