changeset 2920:345857eb0f3b

6827026: Change javac source and target default to 7 Reviewed-by: darcy, ohair
author jjg
date Wed, 20 May 2009 13:55:50 -0700
parents 85e23f3ff211
children d9d491a5a169
files jdk/make/common/shared/Defs-control.gmk jdk/make/common/shared/Defs-java.gmk jdk/make/javax/swing/beaninfo/SwingBeans.gmk
diffstat 3 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/make/common/shared/Defs-control.gmk	Wed May 20 10:12:37 2009 +0800
+++ b/jdk/make/common/shared/Defs-control.gmk	Wed May 20 13:55:50 2009 -0700
@@ -91,6 +91,8 @@
 
 dummy := $(shell $(MKDIR) -p $(TEMP_DIR))
 
+# The language version we want for this jdk build
+SOURCE_LANGUAGE_VERSION=5
 # The class version we want for this jdk build
 TARGET_CLASS_VERSION=5
 
--- a/jdk/make/common/shared/Defs-java.gmk	Wed May 20 10:12:37 2009 +0800
+++ b/jdk/make/common/shared/Defs-java.gmk	Wed May 20 13:55:50 2009 -0700
@@ -123,7 +123,8 @@
 endif
 
 # Add the source level (currently all source is 1.5, should this be 1.6?)
-LANGUAGE_VERSION = -source 1.5
+SOURCE_LANGUAGE_VERSION = 5
+LANGUAGE_VERSION = -source $(SOURCE_LANGUAGE_VERSION)
 JAVACFLAGS  += $(LANGUAGE_VERSION)
 
 # Add the class version we want (currently this is 5, should it be 6 or even 7?)
--- a/jdk/make/javax/swing/beaninfo/SwingBeans.gmk	Wed May 20 10:12:37 2009 +0800
+++ b/jdk/make/javax/swing/beaninfo/SwingBeans.gmk	Wed May 20 13:55:50 2009 -0700
@@ -50,6 +50,8 @@
 JAVADOCFLAGS    = $(NO_PROPRIETARY_API_WARNINGS) $(LANGUAGE_VERSION)
 SWINGPKG        = javax/swing
 LOCAL_JAVAC_FLAGS = $(OTHER_JAVACFLAGS)
+# since LOCAL_JAVADOC runs on ALT_BOOTDIR, the doclet and all its classes must be compiled to match
+DOCLET_JAVAC_FLAGS = -source 6 -target 6
 
 include FILES.gmk
 include $(BUILDDIR)/common/Release.gmk
@@ -86,7 +88,7 @@
 	@$(MKDIR) -p $@
 
 $(DOCLETDST)/%.class: $(DOCLETSRC)/%.java
-	$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -classpath "$(CLASSBINDIR)$(CLASSPATH_SEPARATOR)$(DOCLETSRC)" -d $(DOCLETDST) $?
+	$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -classpath "$(CLASSBINDIR)$(CLASSPATH_SEPARATOR)$(DOCLETSRC)" -d $(DOCLETDST) $?
 	@$(java-vm-cleanup)
 
 # To run, the doclet needs SwingBeanInfoBase class.  Also Notice the lie
@@ -95,11 +97,11 @@
 .SwingBeanInfo: $(OBJDIR) $(BEANCLASSDIR) $(BEANSRCDIR) $(SWINGPKG)/BeanInfoUtils.class $(SWINGPKG)/SwingBeanInfoBase.class 
 
 $(SWINGPKG)/BeanInfoUtils.class: $(BEANSRCDIR)/BeanInfoUtils.java
-	$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -d $(BEANCLASSDIR) $<
+	$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -d $(BEANCLASSDIR) $<
 	@$(java-vm-cleanup)
 
 $(SWINGPKG)/SwingBeanInfoBase.class: $(BEANSRCDIR)/SwingBeanInfoBase.java $(BEANSRCDIR)/BeanInfoUtils.java
-	$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -classpath $(BEANCLASSDIR) -d $(BEANCLASSDIR) $<
+	$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -classpath $(BEANCLASSDIR) -d $(BEANCLASSDIR) $<
 	@$(java-vm-cleanup)
 
 #