6790292: BOOTDIR of jdk6 u12 will not work with jdk7 builds
authorohair
Wed, 11 Mar 2009 14:38:02 -0700
changeset 2199 05f4bf151242
parent 2193 820a800364b1
child 2200 69f669804c0a
6790292: BOOTDIR of jdk6 u12 will not work with jdk7 builds Reviewed-by: tbell
corba/make/common/Rules.gmk
--- a/corba/make/common/Rules.gmk	Mon Mar 09 13:33:56 2009 -0700
+++ b/corba/make/common/Rules.gmk	Wed Mar 11 14:38:02 2009 -0700
@@ -191,14 +191,18 @@
 # Make sure all newer sources are compiled (in a batch)
 classes : $(CLASSES_INIT) .delete.classlist .compile.classlist
 
+# Use this javac option to force it to favor the sourcepath file classes
+#   rather than any bootclasspath classes.
+JAVAC_PREFER_SOURCE = -Xprefer:source
+
 .compile.classlist : $(JAVA_SOURCE_LIST)
 	@$(MKDIR) -p $(CLASSDESTDIR)
 	@if [ `$(CAT) $(JAVA_SOURCE_LIST) | $(WC) -l` -ge 1 ] ; then \
 	  $(ECHO) "# Java sources to be compiled: (listed in file $(JAVA_SOURCE_LIST))"; \
 	  $(CAT) $(JAVA_SOURCE_LIST); \
 	  $(ECHO) "# Running javac:"; \
-	  $(ECHO) $(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$(JAVA_SOURCE_LIST); \
-	  $(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$(JAVA_SOURCE_LIST); \
+	  $(ECHO) $(JAVAC_CMD) $(JAVAC_PREFER_SOURCE) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$(JAVA_SOURCE_LIST); \
+	  $(JAVAC_CMD) $(JAVAC_PREFER_SOURCE) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$(JAVA_SOURCE_LIST); \
 	fi
 	@$(java-vm-cleanup)