diff --git a/make/common/shared/Defs-control.gmk b/make/common/shared/Defs-control.gmk index 592f26de13b2a68cd5936069b553d8e9930ba01b..9c62bf6f7e0db3577a2461bb14ab2f6960ca211c 100644 --- a/make/common/shared/Defs-control.gmk +++ b/make/common/shared/Defs-control.gmk @@ -91,6 +91,8 @@ ABS_TEMP_DIR = $(ABS_OUTPUTDIR)/tmp 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 diff --git a/make/common/shared/Defs-java.gmk b/make/common/shared/Defs-java.gmk index 78f87294fbed936254ae63da45e61048554a01fc..16db68b111303f5694e6709744dd5c2b355e8185 100644 --- a/make/common/shared/Defs-java.gmk +++ b/make/common/shared/Defs-java.gmk @@ -123,7 +123,8 @@ ifeq ($(JAVAC_WARNINGS_FATAL), true) 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?) diff --git a/make/javax/swing/beaninfo/SwingBeans.gmk b/make/javax/swing/beaninfo/SwingBeans.gmk index cae9873e0c39d0cdd6b71259979e4dbe87b0ba9c..20a716e0742dcf806a16ea2f6618c36ef432a0bb 100644 --- a/make/javax/swing/beaninfo/SwingBeans.gmk +++ b/make/javax/swing/beaninfo/SwingBeans.gmk @@ -50,6 +50,8 @@ PREFIX = 1.2 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 @@ $(OBJDIR) $(BEANCLASSDIR) $(BEANSRCDIR) $(DOCLETDST):: @$(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 @@ $(DOCLETDST)/%.class: $(DOCLETSRC)/%.java .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) #