8035473: [javadoc] Revamp the existing Doclet APIs

8146529: Update the new Doclet API
8146427: "-nohelp" option issue
8146475: "-helpfile" option issue

Reviewed-by: alanb, bpatel, ihse, jjg, jlahoda, mchung, ogb, vromero
This commit is contained in:
Kumar Srinivasan 2015-11-12 13:26:07 -08:00
parent fb33a09179
commit f458381f25
4 changed files with 76 additions and 6 deletions

View File

@ -500,7 +500,7 @@ JAVAC_FLAGS?=@JAVAC_FLAGS@
INTERIM_LANGTOOLS_JAR = $(BUILDTOOLS_OUTPUTDIR)/interim_langtools.jar
INTERIM_LANGTOOLS_ARGS = "-Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR)" -cp $(INTERIM_LANGTOOLS_JAR)
NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javac.Main
NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javadoc.Main
NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) jdk.javadoc.internal.tool.Main
# Base flags for RC
# Guarding this against resetting value. Legacy make files include spec multiple

View File

@ -418,7 +418,7 @@ DOCLETAPI_WINDOWTITLE := Doclet API
DOCLETAPI_HEADER := <strong>Doclet API</strong>
DOCLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(DOCLETAPI_FIRST_COPYRIGHT_YEAR))
DOCLETAPI_GROUPNAME := Packages
DOCLETAPI_REGEXP := com.sun.javadoc
DOCLETAPI_REGEXP := jdk.javadoc.doclet.*
# DOCLETAPI_PKGS is located in NON_CORE_PKGS.gmk
# The index.html, options, and packages files
@ -460,14 +460,71 @@ $(DOCLETAPI_PACKAGES_FILE): $(call PackageDependencies,$(DOCLETAPI_PKGS))
$(prep-target)
$(call PackageFilter,$(DOCLETAPI_PKGS))
#############################################################
#
# old docletapidocs
#
ALL_OTHER_TARGETS += olddocletapidocs
OLD_DOCLET_DIR := $(JDK_API_DOCSDIR)/javadoc/old
OLD_DOCLETAPI_DOCDIR := $(OLD_DOCLET_DIR)/doclet
OLD_DOCLETAPI2COREAPI := ../../../$(JDKJRE2COREAPI)
OLD_DOCLETAPI_DOCTITLE := Doclet API
OLD_DOCLETAPI_WINDOWTITLE := Doclet API
OLD_DOCLETAPI_HEADER := <strong>Doclet API</strong>
OLD_DOCLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(DOCLETAPI_FIRST_COPYRIGHT_YEAR))
OLD_DOCLETAPI_GROUPNAME := Packages
OLD_DOCLETAPI_REGEXP := com.sun.javadoc
# OLD_DOCLETAPI_PKGS is located in NON_CORE_PKGS.gmk
# The index.html, options, and packages files
OLD_DOCLETAPI_INDEX_FILE = $(OLD_DOCLETAPI_DOCDIR)/index.html
OLD_DOCLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/old-docletapi.options
OLD_DOCLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/old-docletapi.packages
olddocletapidocs: $(OLD_DOCLETAPI_INDEX_FILE)
# Set relative location to core api document root
$(OLD_DOCLETAPI_INDEX_FILE): GET2DOCSDIR=$(OLD_DOCLETAPI2COREAPI)/..
# Run javadoc if the index file is out of date or missing
$(OLD_DOCLETAPI_INDEX_FILE): $(OLD_DOCLETAPI_OPTIONS_FILE) $(OLD_DOCLETAPI_PACKAGES_FILE) $(COREAPI_INDEX_FILE)
$(prep-javadoc)
$(call JavadocSummary,$(OLD_DOCLETAPI_OPTIONS_FILE),$(OLD_DOCLETAPI_PACKAGES_FILE))
$(JAVADOC_CMD_SMALL) -d $(@D) \
@$(OLD_DOCLETAPI_OPTIONS_FILE) @$(OLD_DOCLETAPI_PACKAGES_FILE)
# Create file with javadoc options in it
$(OLD_DOCLETAPI_OPTIONS_FILE):
$(prep-target)
@($(call COMMON_JAVADOCFLAGS) ; \
$(call COMMON_JAVADOCTAGS) ; \
$(call OptionOnly,-Xdoclint:all) ; \
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
$(call OptionPair,-encoding,ascii) ; \
$(call OptionOnly,-breakiterator) ; \
$(call OptionPair,-doctitle,$(OLD_DOCLETAPI_DOCTITLE)) ; \
$(call OptionPair,-windowtitle,$(OLD_DOCLETAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
$(call OptionPair,-header,$(OLD_DOCLETAPI_HEADER)$(DRAFT_HEADER)) ; \
$(call OptionPair,-bottom,$(OLD_DOCLETAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
$(call OptionTrip,-group,$(OLD_DOCLETAPI_GROUPNAME),$(OLD_DOCLETAPI_REGEXP)); \
$(call OptionTrip,-linkoffline,$(OLD_DOCLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
) >> $@
# Create a file with the package names in it
$(OLD_DOCLETAPI_PACKAGES_FILE): $(call PackageDependencies,$(OLD_DOCLETAPI_PKGS))
$(prep-target)
$(call PackageFilter,$(OLD_DOCLETAPI_PKGS))
#############################################################
#
# tagletapidocs
#
ALL_OTHER_TARGETS += tagletapidocs
TAGLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/taglet
TAGLETAPI2COREAPI := ../../$(JDKJRE2COREAPI)
TAGLETAPI_DOCDIR := $(OLD_DOCLET_DIR)/taglet
TAGLETAPI2COREAPI := ../../../$(JDKJRE2COREAPI)
TAGLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_YEAR))
# TAGLETAPI_FILE is located in NON_CORE_PKGS.gmk

View File

@ -66,7 +66,10 @@ HTTPSERVER_PKGS = com.sun.net.httpserver \
NIO_PKGS = com.sun.nio.file
DOCLETAPI_PKGS = com.sun.javadoc
OLD_DOCLETAPI_PKGS = com.sun.javadoc
DOCLETAPI_PKGS = jdk.javadoc.doclet \
jdk.javadoc.doclet.taglet
TAGLETAPI_FILE = com/sun/tools/doclets/Taglet.java

View File

@ -2,7 +2,7 @@
<!--
Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
@ -1643,6 +1643,10 @@
<to>jdk.javadoc</to>
<to>jdk.jdeps</to>
</export>
<export>
<name>com.sun.tools.javac.model</name>
<to>jdk.javadoc</to>
</export>
</module>
<module>
<name>jdk.crypto.ec</name>
@ -1772,6 +1776,12 @@
<export>
<name>com.sun.tools.javadoc</name>
</export>
<export>
<name>jdk.javadoc.doclet</name>
</export>
<export>
<name>jdk.javadoc.doclet.taglet</name>
</export>
</module>
<module>
<name>jdk.jcmd</name>