changeset 55:53d5b45f73ab

6790292: BOOTDIR of jdk6 u12 will not work with jdk7 builds Reviewed-by: tbell
author ohair
date Wed, 11 Mar 2009 14:38:02 -0700
parents 3174f87bcd7c
children 9c0cc0d0eca2
files make/common/Rules.gmk
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/Rules.gmk	Mon Mar 09 13:33:56 2009 -0700
+++ b/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)