From 54ac708b5f40bc34305ce55b1756c616afe7443a Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 29 Jan 2010 02:38:22 +0000 Subject: [PATCH] 6917466: Should set bootclasspath for javadoc in jdk build Summary: javadoc needs to reference the newly built classes so as not to hit APIs which differ between the boot JDK and the source files of the JDK being built. Reviewed-by: ohair --- make/common/shared/Defs-java.gmk | 9 +++++++-- make/javax/swing/beaninfo/SwingBeans.gmk | 9 ++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/make/common/shared/Defs-java.gmk b/make/common/shared/Defs-java.gmk index f9ed63531..1d13c2169 100644 --- a/make/common/shared/Defs-java.gmk +++ b/make/common/shared/Defs-java.gmk @@ -138,6 +138,10 @@ JAVACFLAGS += $(OTHER_JAVACFLAGS) # Needed for javah JAVAHFLAGS += -bootclasspath $(CLASSBINDIR) +# Needed for javadoc to ensure it builds documentation +# against the newly built classes +JAVADOCFLAGS += -bootclasspath $(CLASSBINDIR) + # Needed for JAVADOC and BOOT_JAVACFLAGS NO_PROPRIETARY_API_WARNINGS = -XDignore.symbol.file=true @@ -155,14 +159,15 @@ ifdef LANGTOOLS_DIST -jar $(JAVAH_JAR) $(JAVAHFLAGS) JAVADOC_CMD = $(BOOT_JAVA_CMD) \ "-Xbootclasspath/p:$(JAVADOC_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)$(CLASSPATH_SEPARATOR)$(DOCLETS_JAR)" \ - -jar $(JAVADOC_JAR) + -jar $(JAVADOC_JAR) $(JAVADOCFLAGS) else # If no explicit tools, use boot tools (add VM flags in this case) JAVAC_CMD = $(JAVA_TOOLS_DIR)/javac $(JAVAC_JVM_FLAGS) \ $(JAVACFLAGS) JAVAH_CMD = $(JAVA_TOOLS_DIR)/javah \ $(JAVAHFLAGS) - JAVADOC_CMD = $(JAVA_TOOLS_DIR)/javadoc $(JAVA_TOOLS_FLAGS:%=-J%) + JAVADOC_CMD = $(JAVA_TOOLS_DIR)/javadoc $(JAVA_TOOLS_FLAGS:%=-J%) \ + $(JAVADOCFLAGS) endif # Override of what javac to use (see deploy workspace) diff --git a/make/javax/swing/beaninfo/SwingBeans.gmk b/make/javax/swing/beaninfo/SwingBeans.gmk index 20a716e07..61fcf0b79 100644 --- a/make/javax/swing/beaninfo/SwingBeans.gmk +++ b/make/javax/swing/beaninfo/SwingBeans.gmk @@ -25,7 +25,7 @@ # # Makefile to build the BeanInfo generation tool (ie, a doclet), and -# then the beaninfo itself. Swing versions prior to 1.2 is no longer +# then the beaninfo itself. Swing versions prior to 1.2 are no longer # built. # # This makefile could be a lot simpler if we made it more regular. @@ -44,13 +44,12 @@ swing-1.2-beans-debug: $(MAKE) DEBUG_FLAG=true make-swing-beans -LOCAL_JAVADOC = $(JAVADOC_CMD) $(JAVADOCFLAGS) # get the absolute path to the jar command. PREFIX = 1.2 -JAVADOCFLAGS = $(NO_PROPRIETARY_API_WARNINGS) $(LANGUAGE_VERSION) +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 +# since JAVADOC_CMD 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 @@ -114,7 +113,7 @@ mkbeaninfo: $(BEANSRCDIR) .delete.beanlist $(FILES_beans) .javadoc.beanlist .javadoc.beanlist: if [ -s $(TEMPDIR)/.beans.list ]; \ - then $(LOCAL_JAVADOC) $(DOCLETFLAGS) -x $(DEBUG_FLAG) -d $(BEANSRCDIR) -t $(DOCLETSRC)/SwingBeanInfo.template -docletpath $(DOCLETDST) \ + then $(JAVADOC_CMD) $(DOCLETFLAGS) -x $(DEBUG_FLAG) -d $(BEANSRCDIR) -t $(DOCLETSRC)/SwingBeanInfo.template -docletpath $(DOCLETDST) \ $(shell if [ -s $(TEMPDIR)/.beans.list ]; then $(CAT) $(TEMPDIR)/.beans.list; fi); \ fi @$(java-vm-cleanup) -- GitLab