[Gllug] Make was Bison question

Pete Ryland pdr at pdr.cx
Thu Dec 5 11:55:17 UTC 2002


On Thu, Dec 05, 2002 at 11:06:17AM +0000, Paul Roberts wrote:
> Pete Ryland <pdr at pdr.cx> writes:
> > Nah, the problem lies with the fact that when you invoke javac on a
> > .java file, it will compile it *and all its dependencies*.  So, your for
> > loop above is slow, not just because javac is written in java, but
> > because you will end up compiling a lot of stuff multiple times.  This
> > is what ant fixes.
> 
> I may be wrong, but I thought javac worked like make, in that it only
> compiles code if the class file is out of date in relation to the
> source-code. Is that not right?

Sort of.  It will recompile if the file is explicitly listed on the command
line, even if up-to-date.  However, it may be better now than it used to be.

<anecdote>
A few years ago, I was build manager for a java project which took over 13
hours to build.  I got it down to 6 in the end, but I've never seen Java in
the same light since, especially after finding a rather serious bug in Sun's
javac for HP (which meant that all floating-point constants were wrong).
</anecdote>

Pete

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list