ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Crickmer <>
Subject basic file dependency
Date Wed, 02 May 2001 13:15:16 GMT
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


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!


View raw message