ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Crickmer <jcrick...@hire.com>
Subject Re: basic file dependency
Date Wed, 02 May 2001 15:35:09 GMT
Conor,

Thanks, that seemed to do the trick.  It seems a little more verbose,
and the variable name-space is going to get pretty cluttered.  Although
we moved to Ant from Make because most developers deplored the
"Makefile in each directory" architecture that we had, I am thinking
the "all-in-one" approach may get pretty cumbersome after a while,
too.  Is there an include mechanism, or even better, a
run-this-ant-file-in-a-separate-name-space-while-exporting-these-variables
mechanism?

Thanks,
Jason


Conor MacNeill writes:
> Checkout the uptodate task.
> 
> ----- Original Message ----- 
> From: "Jason Crickmer" <jcrickmer@hire.com>
> To: <ant-user@jakarta.apache.org>
> 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
> > 

Mime
View raw message