Makefile performance tweak
Bryce McKinlay
bryce@waitaki.otago.ac.nz
Wed May 22 21:18:00 GMT 2002
This fixes the libjava build slowdown I noticed since Mark's parallel
make patch. The problem was that Class.java and Object.java were not
being built until after all the other class files. The CNI headers are
the first thing built from all-recursive, and the headers depend on the
class files. But since the headers for Class and Object are maintained
by hand rather than generated, there was nothing forcing Class and
Object to be compiled until it got to the libgcj.jar rule. These classes
need to be read for every compilation, so it helps to be able to load
them from class files rather than re-parse them every time.
regards
Bryce.
2002-05-23 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* Makefile.am (all-recursive): Depend on $all_java_class_files so that
they build first.
* Makefile.in: Rebuilt.
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.218
diff -u -r1.218 Makefile.am
--- Makefile.am 13 May 2002 20:10:33 -0000 1.218
+++ Makefile.am 23 May 2002 04:04:45 -0000
@@ -1895,7 +1895,9 @@
## internally by libgcj. We can't make the .o files depend on nat_headers,
## because in that case we'll force a complete rebuild of
## the C++ code whenever any .java file is touched.
-all-recursive: $(nat_headers) $(x_nat_headers)
+## Also force all the class files to build first. This makes them build in
+## the right order to improve performance.
+all-recursive: $(all_java_class_files) $(nat_headers) $(x_nat_headers)
## ################################################################
More information about the Java-patches
mailing list