[RFT/RFA] Per-directory libjava builds (take 3)

Paolo Bonzini paolo.bonzini@lu.unisi.ch
Thu May 12 08:30:00 GMT 2005


> What is Makefile.deps for?  Browsing the top of it wasn't enlightening.

I added a note to the patch.  Here it is.

Dependencies from Java to .class files
--------------------------------------
Each directory's filelist file depends on the corresponding Java source 
files.  The stamp file depends on the filelist (using a `Static Pattern 
Rule').  Each class file depends on the its directory's .stamp file. 
This reflects the fact that 1) all classfiles are compiled in one go 
when the .stamp file is built and 2) anything which depends on a 
particular .class file must wait until its directory is processed and 
the .stamp file is created.

Dependencies from Java to .lo files
-----------------------------------
As above, each directory's filelist file depends on the corresponding 
Java source files, and the stamp file depends on the filelist.  For 
native compilation, the lo file depends on the stamp file (also using a 
`Static Pattern Rule').  So, when one Java file changes, the filelist 
file is updated, the stamp file rule builds the .class files, and the 
.lo file rule recompiles to native code.

> through a temporary file at all?  You can do this directly with 
> gnu make functions.  Note that $(sort) also does uniq.

I did not know this.  Thank you.

Updated patch attached, tested as before.  Timings are

real    24m21.752s
user    23m5.340s
sys     1m6.440s

on the same machine as before.  Worse than my first patch, but still a 
25% improvement over the current status.  Ok?

Paolo
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libjava-build-per-directory.patch
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20050512/1894d492/attachment.ksh>


More information about the Java-patches mailing list