ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lyndon Samson <>
Subject Re[2]: Trying to get rid of makefiles
Date Thu, 24 Jul 2003 18:42:02 GMT
Hello John,

Wednesday, July 23, 2003, 7:12:29 PM, you wrote:

JB> How about just doing a recursive find immediately prior to a build and
JB> doing a `touch' on the .java files?

JB> In other words, force them to have been modified more recently than the
JB> resulting .class files.

JB> Not pretty, but still infinitely prettier than sticking with Makefiles.

How about using jikes, from the manpage.

    Recompile all used classes


JB> -----Original Message-----
JB> From: Harkness, David [] 
JB> Posted At: 24 July 2003 01:07
JB> Posted To: Ant
JB> Conversation: Trying to get rid of makefiles
JB> Subject: RE: Trying to get rid of makefiles

JB> Wow, you've reproduced all the same functionality of makefiles using
JB> Ant, and they're going to get hung up on *one* feature because it
JB> doesn't work *exactly* like the makefile? Sheesh, that's pretty damn
JB> anal retentive. Nevertheless... :)

JB> Do you have multiple sets of .class files mixed into the same directory?
JB> In other words, do you compile two sets of .java files into the same
JB> "classes" directory? If not, then just delete the "classes" dir in your
JB> clean target (very typical behavior). This will be very fast compared to
JB> deleting all of the .class files individually.

JB> Most developers I know view incremental compilation not only as
JB> *standard* but as a positive feature. Change a class, recompile it.
JB> Getting odd build behavior, do a clean build.

JB> As another option, you might want to check out jdepends and the
JB> <depends> task (IIRC). It tracks which classes actually depend on each
JB> other and performs a more thorough incremental build based on timestamps
JB> and the dependency graph. I haven't looked into this as it hasn't been a
JB> big issue on even the bigger projects I've been on.

JB> Anyway, good luck!

JB> David Harkness
JB> Sony Pictures Digital Networks
JB> (310) 482-4756

JB> -----Original Message-----
JB> From: Leonardo Abreu de Barros [] 
JB> Sent: Wednesday, July 23, 2003 4:02 PM
JB> To:
JB> Subject: Trying to get rid of makefiles

JB> Hi all,

JB> I work in a company that has a long history using makefiles. Since I 
JB> joined it, I proposed to migrate to Ant. Some people resist to 
JB> changes, some people agree, as long as all benefits provided by the 
JB> makefiles are covered by Ant.

JB> I've already reproduced all behaviors but one: currently, all java 
JB> classes names are declared explicitly in the makefile, and sent to 
JB> the java compiler. It rebuilds all the class files, at each build. 

JB> They want this behavior in order to detect broken code, due to 
JB> changes on a base class, for example.

JB> The problem is that Ant, specifically the <javac> task, only 
JB> recompiles ".class" if the timestamp differs from the related ".java" 
JB> file. I've read on documentation that to detect this kind of broken 
JB> dependencies, you should perform "clean builds" from time to time.

JB> I proposed this solution, but it wasn't accepted. They think it's a 
JB> loss of time (even if it's ridiculous) to delete all ".class" files 
JB> before calling the compiler. If I'm not able to reproduce this 
JB> behavior with Ant, they prefer to keep the makefiles.

JB> Does anyone have any idea of how I could reproduce this behavior 
JB> using Ant? Any other possible solution?

JB> Thanks in advance,
JB> Leonardo Barros

JB> ---------------------------------------------------------------------
JB> To unsubscribe, e-mail:
JB> For additional commands, e-mail:

JB> ---------------------------------------------------------------------
JB> To unsubscribe, e-mail:
JB> For additional commands, e-mail:

JB> ---------------------------------------------------------------------
JB> To unsubscribe, e-mail:
JB> For additional commands, e-mail:

Best regards,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message