Howto re-compile ony parts?

Andrew Haley aph at redhat.com
Mon May 12 11:10:37 UTC 2008


Kelly O'Hair wrote:
> We already use 'make -j' when building the .o files, and the dependencies
> should be ok for the .o files. So for native compilations I don't
> think we have a problem.

That's interesting; it certainly didn't used to work.  I'll try again.

> But with Java building, it's not clear 'make -j' is the answer or will
> even work.
> First, a .java can create multiple .class files, and second all the
> javac builds read and write to the classes directory.
> If a bunch of javac compilations were done in parallel I don't think
> it would be a pretty sight. In general, make and java compilation
> has always been complicated or non-robust to say the least.

Yes, I gathered that.  

> Most people don't realize that compiling an explicit list of sources
> can sometimes compile more than that, and that often the output directory
> is also used in the classpath as an input directory.
> You might think this is a bad idea, but it's done, has been for some time.

It's a bad idea.  :-)

> There are multiple possibilities for improving the javac compile time,
> but doing it via make is not on my list.

Fair enough.  One thing that would be of huge benefit is the ability to
distribute compilation, a la distcc.  Please don't do anything that might
restrict building to a single box.

Andrew.



More information about the build-dev mailing list