ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harkness, David" <>
Subject RE: Trying to get rid of makefiles
Date Thu, 24 Jul 2003 00:06:45 GMT
Wow, you've reproduced all the same functionality of makefiles using
Ant, and they're going to get hung up on *one* feature because it
doesn't work *exactly* like the makefile? Sheesh, that's pretty damn
anal retentive. Nevertheless... :)

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

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

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

Anyway, good luck!

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

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

Hi all,

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

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

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

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

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

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

Thanks in advance,
Leonardo Barros

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

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

View raw message