------- Additional Comments From wilson at gcc dot gnu dot org  2005-07-30 
01:02 -------
The problem is the compile-classes rule in the libjava/classpath/lib/Makefile.am
file.  This rule contains a line $(JAVAC) that has a recursive make hidden
inside it.  make -j requires that all lines that perform a recursive make
contain the string $(MAKE), the string ${MAKE}, or start with +.  This is before
variable substitution, etc.

Three possible solutions off the top of my head:
1) Add a comment that mentions $(MAKE), e.g. change the line
        $(JAVAC)
to
        $(JAVAC) # $(MAKE)
2) Add a + to indicate this line does a recursive make.  This is apparently
POSIX (though my manual isn't here to double check).  E.g. change the line
        $(JAVAC)
to
        +$(JAVAC)
3) Delete the JAVAC variable, and put the line in question directly into the
compile-classes rule.

I verified that the first two suggestions work.  I didn't try the third, it
seems less practical.

Since JAVAC is being conditionally set, and only the GCJ version has the hidden
recursive make, we probably need a conditional fix here.

I'll leave it to the java and/or classpath folks to decide how they want to fix
this.  You may want to check the make manual for info on the MAKE variable, -j,
jobserver, and +.

My libjava build is still going, so it is possible that there are other similar
problems I haven't noticed yet.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22580

Reply via email to