Unfortunately that has the same problem as I'm currently suffering
from. To quote from the depend.html:

"Classes are considered out of date ... using the same mechanism
as the javac task"

I need to be able to say:

  IF a.class NEWER THAN b.class THEN compile b.java

Both the javac and depend tasks rely on analyzing the class files
to find out whether to compile. I need a rule which gives regard
only to the file timestamp, as is the case with Make.


Ian

> -----Original Message-----
> From: Conor MacNeill [mailto:[EMAIL PROTECTED]]
> Sent: 06 April 2001 14:25
> To: [EMAIL PROTECTED]
> Subject: Re: Make Dependencies
> 
> 
> Check out the <depend> task
> http://jakarta.apache.org/ant/manual/OptionalTasks/depend.html
> 
> ----- Original Message ----- 
> From: "Macey, Ian" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, April 06, 2001 10:39 PM
> Subject: Make Dependencies
> 
> 
> > How can I tell Ant that there is a dependency between two
> > .java files? ie Given a.java and b.java, how do I say in Ant,
> > if a.java is compiled then you must also compile b.java.
> >  
> > Have had various attempts, the problems are getting javac 
> > to compile b.java even though b.class is later than b.java, 
> > and using something like touch, as in Ant every rule fires 
> > and I can't restrict the touch to occur only if a.java is 
> compiled.  
> >  
> > Doing this with Make would be easy, but I just don't see 
> > how to do it with Ant... Is this a fundamental problem due
> > to Ant relying on javac to know whether a file needs to be
> > compiled?
> >  
> > Ian
> > 
> > 
> > ___________________________________________________
> > CAZENOVE & CO.
> > 
> > DISCLAIMER, PLEASE NOTE:
> > 
> > This communication is for the attention of the
> > named recipient only and should not be passed
> > on to any other person. Information relating to
> > any company or security, is for information
> > purposes only and should not be interpreted as
> > a solicitation or offer to buy or sell any security.
> > The information on which this communication is based
> > has been obtained from sources we believe to be reliable,
> > but we do not guarantee its accuracy or completeness.
> > All expressions of opinion are subject to change
> > without notice.
> > ___________________________________________________
> > 
> 

Reply via email to