PATCH: Java patch for generated-source-files

Mark Mitchell
Sat Mar 17 12:55:00 GMT 2007

This patch fixes the problem which Joseph discovered with
bootstrapping of the 4.2 branch, when using
--enable-generated-files-in-srcdir.  With this patch applied, I shall
try once again to build 4.2.0 RC1.

Joseph, I understand that the .pot regeneration process will now have
to be updated.  Would you please update the documentation that
explains how to do that?


Mark Mitchell
(650) 331-3385 x713

2007-03-16  Mark Mitchell  <>

	* (java.srcextra): Remove dependency.
	(java_parse_c): New variable.
	(java/parse.c): Replace with ...
	($(java_parse_c)): ... this.
	(java/parse.o): Depend on $(java_parse_c).
---	(revision 123010)
+++	(working copy)
@@ -77,10 +77,14 @@ $(GCJ)-cross$(exeext): $(GCJ)$(exeext)
 	-rm -f $(GCJ)-cross$(exeext)
 	cp $(GCJ)$(exeext) $(GCJ)-cross$(exeext)
-java.srcextra: java/parse.c java/parse-scan.c
-	-cp -p $^ $(srcdir)/java
-java/parse.c: java/parse.y
+java_parse_c := java/parse.c
+ifeq ($(GENINSRC),)
+java_parse_c := $(srcdir)/$(java_parse_c)
+$(java_parse_c): java/parse.y
 	-$(BISON) -t --name-prefix=java_ $(BISONFLAGS) -o $@ $<
 java/parse-scan.c: java/parse-scan.y
@@ -354,7 +358,7 @@ java/java-gimplify.o: java/java-gimplify
 java/parse-scan.o: java/parse-scan.c $(CONFIG_H) $(SYSTEM_H) \
   coretypes.h $(TM_H) toplev.h $(JAVA_LEX_C) java/parse.h java/lex.h input.h
-java/parse.o: java/parse.c java/jcf-reader.c $(CONFIG_H) $(SYSTEM_H) \
+java/parse.o: $(java_parse_c) java/jcf-reader.c $(CONFIG_H) $(SYSTEM_H) \
   coretypes.h $(TM_H) $(FUNCTION_H) $(JAVA_TREE_H) $(JAVA_LEX_C) java/parse.h \
   java/lex.h input.h $(GGC_H) debug.h gt-java-parse.h gtype-java.h $(TARGET_H) \

More information about the Gcc-patches mailing list