changeset 2101:b3b10d45778a

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
author andrew
date Fri, 29 Jan 2010 02:38:22 +0000
parents b250e6c5a9e5
children 69ef657320ad
files make/common/shared/Defs-java.gmk make/javax/swing/beaninfo/SwingBeans.gmk
diffstat 2 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/shared/Defs-java.gmk	Thu Jan 28 21:01:13 2010 +0000
+++ b/make/common/shared/Defs-java.gmk	Fri Jan 29 02:38:22 2010 +0000
@@ -138,6 +138,10 @@
 # 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 @@
 		-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)
--- a/make/javax/swing/beaninfo/SwingBeans.gmk	Thu Jan 28 21:01:13 2010 +0000
+++ b/make/javax/swing/beaninfo/SwingBeans.gmk	Fri Jan 29 02:38:22 2010 +0000
@@ -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 @@
 	$(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 @@
 
 .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)