8038233: Fix unsafe strcpy in Java_sun_tools_attach_{Aix,Bsd,Linux}VirtualMachine_connect()
Reviewed-by: alanb
# Copyright (c) 1997, 2013, 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# under the terms of the GNU General Public License version 2 only, as# published by the Free Software Foundation. Oracle designates this# particular file as subject to the "Classpath" exception as provided# by Oracle in the LICENSE file that accompanied this code.## This code is distributed in the hope that it will be useful, but WITHOUT# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License# version 2 for more details (a copy is included in the LICENSE file that# accompanied this code).## You should have received a copy of the GNU General Public License version# 2 along with this work; if not, write to the Free Software Foundation,# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.## Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA# or visit www.oracle.com if you need additional information or have any# questions.#include $(SPEC)include MakeBase.gmk.SUFFIXES: # Delete the default suffixes.SUFFIXES: .java## Definitions for $(DOCSDIR), $(MKDIR), $(BINDIR), etc.#DOCSDIR=$(OUTPUT_ROOT)/docsTEMPDIR=$(OUTPUT_ROOT)/docstempJDK_SHARE_SRC=$(JDK_TOPDIR)/src/shareJDK_SHARE_CLASSES=$(JDK_SHARE_SRC)/classesJDK_IMPSRC = $(JDK_OUTPUTDIR)/impsrcJDK_GENSRC = $(JDK_OUTPUTDIR)/gensrcHOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_OUTPUTDIR)/docsBUILD_NUMBER=$(JDK_BUILD_NUMBER)JAVADOC_CMD = $(JAVA) \ -Xmx1024m \ -Djava.awt.headless=true \ $(NEW_JAVADOC) \ -bootclasspath $(JDK_OUTPUTDIR)/classes# Copyright year for beginning of Java and some of the apis# (Needed when creating the javadocs)FIRST_COPYRIGHT_YEAR = 1993DOMAPI_FIRST_COPYRIGHT_YEAR = 2005MIRROR_FIRST_COPYRIGHT_YEAR = 2004DOCLETAPI_FIRST_COPYRIGHT_YEAR = 1993TAGLETAPI_FIRST_COPYRIGHT_YEAR = 1993JDI_FIRST_COPYRIGHT_YEAR = 1999JAAS_FIRST_COPYRIGHT_YEAR = 1998JGSS_FIRST_COPYRIGHT_YEAR = 2000SMARTCARDIO_FIRST_COPYRIGHT_YEAR = 2005HTTPSERVER_FIRST_COPYRIGHT_YEAR = 2005MGMT_FIRST_COPYRIGHT_YEAR = 2003ATTACH_FIRST_COPYRIGHT_YEAR = 2005JCONSOLE_FIRST_COPYRIGHT_YEAR = 2006SCTPAPI_FIRST_COPYRIGHT_YEAR = 2009TRACING_FIRST_COPYRIGHT_YEAR = 2008TREEAPI_FIRST_COPYRIGHT_YEAR = 2005JNLP_FIRST_COPYRIGHT_YEAR = 1998PLUGIN2_FIRST_COPYRIGHT_YEAR = 2007# Oracle nameFULL_COMPANY_NAME = Oracle and/or its affiliates# Copyright addressCOMPANY_ADDRESS = 500 Oracle Parkway<br>Redwood Shores, CA 94065 USA.# The trademark symbolTRADEMARK = ™# Common copyright lines used# The word "Copyright" might optionally be a link to the file cpyr.html.# The first year of copyright may vary or not be available.# The address to the company might be optional.COMMA:= ,EMPTY:=SPACE:=$(EMPTY) $(EMPTY)COPYRIGHT_SYMBOL = &\#x00a9;# Macro to construct the copyright line# (The GNU make 3.78.1 "if" conditional is broken, fixed in GNU make 3.81)define CopyrightLine # optionalurl optionalfirstyear optionaladdress$(if $(strip $1),<a href="$(strip $1)">Copyright</a>,Copyright) \$(COPYRIGHT_SYMBOL) $(if $2,$2${COMMA},) $(COPYRIGHT_YEAR),\$(FULL_COMPANY_NAME). $3 All rights reserved.endef# Url to root of documentsDOCSDIR_URL = {@docroot}/$(GET2DOCSDIR)# Url to copyright html fileCOPYRIGHT_URL-7 = $(DOCSDIR_URL)/legal/cpyr.html# This isn't added in old build yet.#COPYRIGHT_URL-8 = $(DOCSDIR_URL)/legal/cpyr.htmlCOPYRIGHT_URL = $(COPYRIGHT_URL-$(JDK_MINOR_VERSION))# Url to bug filing siteBUG_SUBMIT_URL = http://bugreport.sun.com/bugreport/# Common line for how to submit a bug or rfeBUG_SUBMIT_LINE = <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a># Url to devdocs page# Was: http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.htmlDEV_DOCS_URL-7 = http://download.oracle.com/javase/7/docs/index.htmlDEV_DOCS_URL-8 = http://download.oracle.com/javase/8/docs/index.htmlDEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION))DOCS_BASE_URL = http://download.oracle.com/javase/7/docs# Common Java trademark lineJAVA_TRADEMARK_LINE = Java is a trademark or registered trademark of \$(FULL_COMPANY_NAME) in the US and other countries.################################################################## Macros:# List of all possible directories for javadoc to look for sources# NOTE: Quotes are required around sourcepath argument only on Windows.# Otherwise, you get "No packages or classes specified." due# to $(PATH_SEP) being interpreted as an end of# command (newline or shell ; character)ALL_SOURCE_DIRS = $(JDK_SHARE_CLASSES) \ $(JDK_IMPSRC) \ $(JDK_GENSRC) \ $(JDK_OUTPUTDIR)/gendocsrc_rmic \ $(JDK_TOPDIR)/src/solaris/classes \ $(JDK_TOPDIR)/src/windows/classes \ $(JDK_SHARE_SRC)/doc/stub# List of directories that actually existALL_EXISTING_SOURCE_DIRS := $(wildcard $(ALL_SOURCE_DIRS))# List with classpath separator between themEMPTY:=SPACE:= $(EMPTY) $(EMPTY)RELEASEDOCS_SOURCEPATH = \ $(subst $(SPACE),$(PATH_SEP),$(strip $(ALL_SOURCE_DIRS)))define prep-target $(MKDIR) -p $(@D) $(RM) $@endef# Prep for javadoc creation, assumes $@ is an index.html filedefine prep-javadoc @if [ -f "$@" -a "$?" != "" ] ; then \ $(ECHO) "# Dependencies have changed: $?"; \ fi $(RM) -r $(@D) $(MKDIR) -p $(@D)endef# A cache of the directories in ALL_SOURCE_DIRSDIRECTORY_CACHE = $(DOCSTMPDIR)/directory.cache# Given a list of packages, return a list of files or dirs to be dependent on# (Currently only returning a list of directories)define PackageDependencies # packages $(shell \ if [ "$1" != "" -a -f $(DIRECTORY_CACHE) ] ; then \ for p in $1 ; do \ pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`; \ $(CAT) $(DIRECTORY_CACHE) | $(GREP) "/$${pd}/" ; \ done; \ fi \ )endef# Given a list of packages, add packages that exist to $@, print summarydefine PackageFilter # packages @if [ "$1" != "" ] ; then \ for p in $1 ; do \ pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`; \ found="false"; \ for cp in $(ALL_SOURCE_DIRS) ; do \ if [ -d $${cp}/$${pd} ] ; then \ $(ECHO) "$${p}" >> $@; \ found="true"; \ break; \ fi; \ done; \ if [ "$${found}" = "false" ] ; then \ $(ECHO) "WARNING: Package not found: $${p}"; \ fi; \ done; \ fiendef# Print out a summary of the javadoc command about to be rundefine JavadocSummary # optionsfile packagesfile @$(ECHO) "# Summary for $@"; \ $(ECHO) "# Options (`$(BASENAME) $1`):"; $(SED) -e 's@^@# @' $1; \ $(ECHO) "# Packages (`$(BASENAME) $2`):";$(SED) -e 's@^@# @' $2endef## Temporary directory for javadoc creation#DOCSTMPDIR = $(TEMPDIR)/doctmp## Different api directories created from root directory#COREAPI_DOCSDIR = $(DOCSDIR)/apiJDK_API_DOCSDIR = $(DOCSDIR)/jdk/apiJRE_API_DOCSDIR = $(DOCSDIR)/jre/apiPLATFORM_DOCSDIR = $(DOCSDIR)/platform# The non-core api javadocs need to be able to access the root of the core# api directory, so for jdk/api or jre/api to get to the core api/# directory we would use this:JDKJRE2COREAPI = ../../api# Common bottom argumentdefine CommonBottom # year<font size="-1"><br> $(call CopyrightLine,,$1,)</font>endef# Common trademark bottom argument (Not sure why this is used sometimes)define CommonTrademarkBottom # year<font size="-1">\$(BUG_SUBMIT_LINE)<br>$(JAVA_TRADEMARK_LINE)<br>\$(call CopyrightLine,,$1,$(COMPANY_ADDRESS))\</font>endef# Common echo of optiondefine OptionOnly # opt $(PRINTF) "%s\n" "$1"endefdefine OptionPair # opt arg $(PRINTF) "%s '%s'\n" "$1" '$2'endefdefine OptionTrip # opt arg arg $(PRINTF) "%s '%s' '%s'\n" "$1" '$2' '$3'endef# Core api bottom argument (with special sauce)COREAPI_BOTTOM = <font size="-1"> $(BUG_SUBMIT_LINE)\<br>For further API reference and developer documentation, \see <a href="$(DEV_DOCS_URL)" target="_blank">Java SE Documentation</a>. \That documentation contains more detailed, developer-targeted descriptions, \with conceptual overviews, definitions of terms, workarounds, \and working code examples.<br>\$(call CopyrightLine,$(COPYRIGHT_URL),$(FIRST_COPYRIGHT_YEAR),)\</font># Common javadoc options used by allCOMMON_JAVADOCFLAGS = \ -XDignore.symbol.file=true \ -quiet \ -use \ -keywords \ -Xprofilespath $(JDK_TOPDIR)/make/profile-rtjar-includes.txt \ $(ADDITIONAL_JAVADOCFLAGS)ifdef OPENJDK ADDITIONAL_JAVADOCFLAGS = \ -Xdocrootparent $(DOCS_BASE_URL)else ADDITIONAL_JAVADOCFLAGS =endif# Draft used for non-fcs documentsDRAFT_HEADER =ifneq ($(MILESTONE), fcs) DRAFT_HEADER = <br><strong>DRAFT $(MILESTONE)-$(BUILD_NUMBER)</strong> DRAFT_BOTTOM = <br><strong>DRAFT $(MILESTONE)-$(BUILD_NUMBER)</strong> DRAFT_WINTITLE = $(BUILD_NUMBER) # Early access top text (not used in FCS releases) COREAPI_TOP_EARLYACCESS = \<div style="background-color: \#EEEEEE"> \<div style="padding: 6px; margin-top: 2px; margin-bottom: 6px; \margin-left: 6px; margin-right: 6px; text-align: justify; \font-size: 80%; font-family: Helvetica, Arial, sans-serif; \font-weight: normal;"> \Please note that the specifications and other information \contained herein are not final and are subject to change. \The information is being made available to you solely for purpose of \evaluation. \</div> </div>endif################################################################### CORE_PKGS environment variable has been moved to the following file#include CORE_PKGS.gmk## Load environment variables for API package names that are not part of# the Java SE platform#include NON_CORE_PKGS.gmk################################################################### Default target is same as docs target, create core api and all others it can#all: docsdocs: coredocs otherdocs################################################################## Production Targets -- USE THESE TARGETS WHEN:# a) You're generating docs outside of release engineering's# standard control build.# b) The docs will be pushed to the web and/or included in# the downloaded doc bundle.## See: Notes.html#releaseTargets# Note: Spaces precede ifdef/ifndef indents. Tabs precede target commands (!)#sanitycheckcoredocs: @$(ECHO) "" @$(ECHO) "Building core api docs with these values:" @$(ECHO) " BUILD_NUMBER = $(BUILD_NUMBER)" @$(ECHO) " MILESTONE = $(MILESTONE)" @$(ECHO) "" ifeq ($(BUILD_NUMBER), b00) @$(ECHO) "ERROR: Build number must be defined" @$(ECHO) "MILESTONE is set to $(MILESTONE)" @$(ECHO) "" exit 1 endif############################################################### coredocs#COREAPI_DOCTITLE = Java$(TRADEMARK) Platform, Standard Edition \$(JDK_MINOR_VERSION)<br>API SpecificationCOREAPI_WINDOWTITLE = Java Platform SE $(JDK_MINOR_VERSION)COREAPI_HEADER = \<strong>Java$(TRADEMARK) Platform<br>Standard Ed. $(JDK_MINOR_VERSION)</strong># Java language specification citeTAG_JLS = jls:a:See <cite> \The Java™ Language Specification</cite>:# Overview file for core apisCOREAPI_OVERVIEW = $(JDK_SHARE_CLASSES)/overview-core.html# The index.html, options, and packages filesCOREAPI_INDEX_FILE = $(COREAPI_DOCSDIR)/index.htmlCOREAPI_OPTIONS_FILE = $(DOCSTMPDIR)/coredocs.optionsCOREAPI_PACKAGES_FILE = $(DOCSTMPDIR)/coredocs.packagescoredocs: $(COREAPI_INDEX_FILE)# Set relative location to core api document root$(COREAPI_INDEX_FILE): GET2DOCSDIR=..# Run javadoc if the index file is out of date or missing$(COREAPI_INDEX_FILE): $(COREAPI_OPTIONS_FILE) $(COREAPI_PACKAGES_FILE) $(prep-javadoc) $(call JavadocSummary,$(COREAPI_OPTIONS_FILE),$(COREAPI_PACKAGES_FILE)) $(JAVADOC_CMD) -d $(@D) \ @$(COREAPI_OPTIONS_FILE) @$(COREAPI_PACKAGES_FILE)# Create file with javadoc options in it$(COREAPI_OPTIONS_FILE): $(COREAPI_OVERVIEW) $(prep-target) @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \ $(call OptionOnly,-Xdoclint:none) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-encoding,ISO-8859-1) ; \ $(call OptionPair,-tag,beaninfo:X) ; \ $(call OptionPair,-tag,revised:X) ; \ $(call OptionPair,-tag,since.unbundled:X) ; \ $(call OptionPair,-tag,spec:X) ; \ $(call OptionPair,-tag,specdefault:X) ; \ $(call OptionPair,-tag,Note:X) ; \ $(call OptionPair,-tag,ToDo:X) ; \ $(call OptionPair,-tag,apiNote:a:API Note:) ; \ $(call OptionPair,-tag,implSpec:a:Implementation Requirements:) ; \ $(call OptionPair,-tag,implNote:a:Implementation Note:) ; \ $(call OptionPair,-tag,param) ; \ $(call OptionPair,-tag,return) ; \ $(call OptionPair,-tag,throws) ; \ $(call OptionPair,-tag,since) ; \ $(call OptionPair,-tag,version) ; \ $(call OptionPair,-tag,serialData) ; \ $(call OptionPair,-tag,factory) ; \ $(call OptionPair,-tag,see) ; \ $(call OptionPair,-tag,$(TAG_JLS)) ; \ $(call OptionOnly,-splitIndex) ; \ $(call OptionPair,-overview,$(COREAPI_OVERVIEW)) ; \ $(call OptionPair,-doctitle,$(COREAPI_DOCTITLE)) ; \ $(call OptionPair,-windowtitle,$(COREAPI_WINDOWTITLE) $(DRAFT_WINTITLE)) ; \ $(call OptionPair,-header,$(COREAPI_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-bottom,$(COREAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \ ) >> $@ ifdef COREAPI_TOP_EARLYACCESS @$(call OptionPair,-top,$(COREAPI_TOP_EARLYACCESS)) >> $@ endif# Create a file with the package names in it$(COREAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(CORE_PKGS)) $(prep-target) $(call PackageFilter,$(CORE_PKGS))############################################################### docletapidocs#ALL_OTHER_TARGETS += docletapidocsDOCLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/docletDOCLETAPI2COREAPI := ../../$(JDKJRE2COREAPI)DOCLETAPI_DOCTITLE := Doclet APIDOCLETAPI_WINDOWTITLE := Doclet APIDOCLETAPI_HEADER := <strong>Doclet API</strong>DOCLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(DOCLETAPI_FIRST_COPYRIGHT_YEAR))DOCLETAPI_GROUPNAME := PackagesDOCLETAPI_REGEXP := com.sun.javadoc# DOCLETAPI_PKGS is located in NON_CORE_PKGS.gmk# The index.html, options, and packages filesDOCLETAPI_INDEX_FILE = $(DOCLETAPI_DOCDIR)/index.htmlDOCLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/docletapi.optionsDOCLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/docletapi.packagesdocletapidocs: $(DOCLETAPI_INDEX_FILE)# Set relative location to core api document root$(DOCLETAPI_INDEX_FILE): GET2DOCSDIR=$(DOCLETAPI2COREAPI)/..# Run javadoc if the index file is out of date or missing$(DOCLETAPI_INDEX_FILE): $(DOCLETAPI_OPTIONS_FILE) $(DOCLETAPI_PACKAGES_FILE) coredocs $(prep-javadoc) $(call JavadocSummary,$(DOCLETAPI_OPTIONS_FILE),$(DOCLETAPI_PACKAGES_FILE)) $(JAVADOC_CMD) -d $(@D) \ @$(DOCLETAPI_OPTIONS_FILE) @$(DOCLETAPI_PACKAGES_FILE)# Create file with javadoc options in it$(DOCLETAPI_OPTIONS_FILE): $(prep-target) @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \ $(call OptionOnly,-Xdoclint:none) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-encoding,ascii) ; \ $(call OptionOnly,-breakiterator) ; \ $(call OptionPair,-doctitle,$(DOCLETAPI_DOCTITLE)) ; \ $(call OptionPair,-windowtitle,$(DOCLETAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \ $(call OptionPair,-header,$(DOCLETAPI_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-bottom,$(DOCLETAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionTrip,-group,$(DOCLETAPI_GROUPNAME),$(DOCLETAPI_REGEXP)); \ $(call OptionTrip,-linkoffline,$(DOCLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \ ) >> $@# Create a file with the package names in it$(DOCLETAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(DOCLETAPI_PKGS)) $(prep-target) $(call PackageFilter,$(DOCLETAPI_PKGS))############################################################### tagletapidocs#ALL_OTHER_TARGETS += tagletapidocsTAGLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/tagletTAGLETAPI2COREAPI := ../../$(JDKJRE2COREAPI)TAGLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_YEAR))# TAGLETAPI_FILE is located in NON_CORE_PKGS.gmk# Temporary directory (special generation rules)TAGLETAPI_TEMPDIR = $(DOCSTMPDIR)/taglets_temp# The index.html, options, and packages filesTAGLETAPI_INDEX_FILE = $(TAGLETAPI_DOCDIR)/index.htmlTAGLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/tagletapi.optionsTAGLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/tagletapi.packagestagletapidocs: $(TAGLETAPI_INDEX_FILE)# Set relative location to core api document root$(TAGLETAPI_INDEX_FILE): GET2DOCSDIR=$(TAGLETAPI2COREAPI)/..# Run javadoc if the index file is out of date or missing$(TAGLETAPI_INDEX_FILE): $(TAGLETAPI_OPTIONS_FILE) $(TAGLETAPI_PACKAGES_FILE) coredocs $(prep-javadoc) $(RM) -r $(TAGLETAPI_TEMPDIR) $(MKDIR) -p $(TAGLETAPI_TEMPDIR) $(call JavadocSummary,$(TAGLETAPI_OPTIONS_FILE),$(TAGLETAPI_PACKAGES_FILE)) $(JAVADOC_CMD) -d $(TAGLETAPI_TEMPDIR) \ @$(TAGLETAPI_OPTIONS_FILE) @$(TAGLETAPI_PACKAGES_FILE) cp -r $(TAGLETAPI_TEMPDIR)/com $(@D) cp $(TAGLETAPI_TEMPDIR)/stylesheet.css $(@D) $(RM) -r $(TAGLETAPI_TEMPDIR)# Create file with javadoc options in it$(TAGLETAPI_OPTIONS_FILE): $(prep-target) @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \ $(call OptionOnly,-Xdoclint:none) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-encoding,ascii) ; \ $(call OptionOnly,-nonavbar) ; \ $(call OptionOnly,-noindex) ; \ $(call OptionPair,-bottom,$(TAGLETAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionTrip,-linkoffline,$(TAGLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \ ) >> $@# Create a file with the package names in it$(TAGLETAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TAGLETAPI_PKGS)) $(prep-target) @($(ECHO) "$(JDK_IMPSRC)/$(TAGLETAPI_FILE)" ) > $@############################################################### domapidocs#ALL_OTHER_TARGETS += domapidocsDOMAPI_DOCDIR := $(JRE_API_DOCSDIR)/plugin/domDOMAPI2COREAPI := ../../$(JDKJRE2COREAPI)DOMAPI_DOCTITLE := Common DOM APIDOMAPI_WINDOWTITLE := Common DOM APIDOMAPI_HEADER := <strong>Common DOM API</strong>DOMAPI_BOTTOM := $(call CommonTrademarkBottom,$(DOMAPI_FIRST_COPYRIGHT_YEAR))DOMAPI_GROUPNAME := PackagesDOMAPI_REGEXP := com.sun.java.browser.dom:org.w3c.dom*# DOMAPI_PKGS is located in NON_CORE_PKGS.gmk# The index.html, options, and packages filesDOMAPI_INDEX_FILE = $(DOMAPI_DOCDIR)/index.htmlDOMAPI_OPTIONS_FILE = $(DOCSTMPDIR)/domapi.optionsDOMAPI_PACKAGES_FILE = $(DOCSTMPDIR)/domapi.packagesdomapidocs: $(DOMAPI_INDEX_FILE)# Set relative location to core api document root$(DOMAPI_INDEX_FILE): GET2DOCSDIR=$(DOMAPI2COREAPI)/..# Run javadoc if the index file is out of date or missing$(DOMAPI_INDEX_FILE): $(DOMAPI_OPTIONS_FILE) $(DOMAPI_PACKAGES_FILE) coredocs $(prep-javadoc) $(call JavadocSummary,$(DOMAPI_OPTIONS_FILE),$(DOMAPI_PACKAGES_FILE)) $(JAVADOC_CMD) -d $(@D) \ @$(DOMAPI_OPTIONS_FILE) @$(DOMAPI_PACKAGES_FILE)# Create file with javadoc options in it$(DOMAPI_OPTIONS_FILE): $(prep-target) @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \ $(call OptionOnly,-Xdoclint:none) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-encoding,ascii) ; \ $(call OptionOnly,-splitIndex) ; \ $(call OptionPair,-doctitle,$(DOMAPI_DOCTITLE)) ; \ $(call OptionPair,-windowtitle,$(DOMAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \ $(call OptionPair,-header,$(DOMAPI_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-bottom,$(DOMAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionTrip,-group,$(DOMAPI_GROUPNAME),$(DOMAPI_REGEXP)); \ $(call OptionTrip,-linkoffline,$(DOMAPI2COREAPI),$(COREAPI_DOCSDIR)/); \ ) >> $@# Create a file with the package names in it$(DOMAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(DOMAPI_PKGS)) $(prep-target) $(call PackageFilter,$(DOMAPI_PKGS))############################################################### jpdadocs#ALL_OTHER_TARGETS += jpdadocsjpdadocs: jdidocs jdwpdocs jvmtidocs############################################################### jdidocs#ALL_OTHER_TARGETS += jdidocsJDI_DOCDIR := $(JDK_API_DOCSDIR)/jpda/jdiJDI2COREAPI := ../../$(JDKJRE2COREAPI)JDI_DOCTITLE := Java$(TRADEMARK) Debug InterfaceJDI_WINDOWTITLE := Java Debug InterfaceJDI_HEADER := <strong>Java Debug Interface</strong>JDI_BOTTOM := $(call CommonBottom,$(JDI_FIRST_COPYRIGHT_YEAR))JDI_OVERVIEW := $(JDK_SHARE_CLASSES)/jdi-overview.html# JDI_PKGS is located in NON_CORE_PKGS.gmk# The index.html, options, and packages filesJDI_INDEX_FILE = $(JDI_DOCDIR)/index.htmlJDI_OPTIONS_FILE = $(DOCSTMPDIR)/jdi.optionsJDI_PACKAGES_FILE = $(DOCSTMPDIR)/jdi.packagesjdidocs: $(JDI_INDEX_FILE)# Set relative location to core api document root$(JDI_INDEX_FILE): GET2DOCSDIR=$(JDI2COREAPI)/..# Run javadoc if the index file is out of date or missing$(JDI_INDEX_FILE): $(JDI_OPTIONS_FILE) $(JDI_PACKAGES_FILE) coredocs $(prep-javadoc) $(call JavadocSummary,$(JDI_OPTIONS_FILE),$(JDI_PACKAGES_FILE)) $(JAVADOC_CMD) -d $(@D) \ @$(JDI_OPTIONS_FILE) @$(JDI_PACKAGES_FILE)# Create file with javadoc options in it$(JDI_OPTIONS_FILE): $(JDI_OVERVIEW) $(prep-target) @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \ $(call OptionOnly,-Xdoclint:none) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-encoding,ascii) ; \ $(call OptionPair,-overview,$(JDI_OVERVIEW)) ; \ $(call OptionPair,-doctitle,$(JDI_DOCTITLE)) ; \ $(call OptionPair,-windowtitle,$(JDI_WINDOWTITLE) $(DRAFT_WINTITLE)); \ $(call OptionPair,-header,$(JDI_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-bottom,$(JDI_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionTrip,-linkoffline,$(JDI2COREAPI),$(COREAPI_DOCSDIR)/); \ ) >> $@# Create a file with the package names in it$(JDI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JDI_PKGS)) $(prep-target) $(call PackageFilter,$(JDI_PKGS))############################################################### jdwpdocs#ALL_OTHER_TARGETS += jdwpdocsJDWP_DOCDIR = $(PLATFORM_DOCSDIR)/jpda/jdwpjdwpdocs: $(JDWP_DOCDIR)/jdwp-protocol.html$(JDWP_DOCDIR)/jdwp-protocol.html : $(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html $(MKDIR) -p $(@D) $(RM) $@ $(CP) $< $@############################################################### jvmtidocs#ALL_OTHER_TARGETS += jvmtidocsJVMTI_DOCDIR = $(PLATFORM_DOCSDIR)/jvmtiJVMTI_HTML = $(HOTSPOT_DIST)/docs/platform/jvmti/jvmti.htmljvmtidocs: $(JVMTI_DOCDIR)/jvmti.html$(JVMTI_DOCDIR)/jvmti.html: @$(prep-javadoc) @if [ -f $(JVMTI_HTML) ] ; then \ $(ECHO) "$(CP) $(JVMTI_HTML) $@"; \ $(CP) $(JVMTI_HTML) $@; \ else \ $(ECHO) "WARNING: Generated file does not exist: $(JVMTI_HTML)"; \ fi############################################################### jaasdocs#ALL_OTHER_TARGETS += jaasdocsJAAS_DOCDIR := $(JRE_API_DOCSDIR)/security/jaas/specJAAS2COREAPI := ../../../$(JDKJRE2COREAPI)JAAS_DOCTITLE := Java$(TRADEMARK) Authentication and Authorization ServiceJAAS_WINDOWTITLE := Java Authentication and Authorization ServiceJAAS_HEADER := <strong>Java Authentication and Authorization Service</strong>JAAS_BOTTOM := $(call CommonBottom,$(JAAS_FIRST_COPYRIGHT_YEAR))# JAAS_PKGS is located in NON_CORE_PKGS.gmkJAAS_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/security/auth/jaas-overview.html# The index.html, options, and packages filesJAAS_INDEX_FILE = $(JAAS_DOCDIR)/index.htmlJAAS_OPTIONS_FILE = $(DOCSTMPDIR)/jaas.optionsJAAS_PACKAGES_FILE = $(DOCSTMPDIR)/jaas.packagesjaasdocs: $(JAAS_INDEX_FILE)# Set relative location to core api document root$(JAAS_INDEX_FILE): GET2DOCSDIR=$(JAAS2COREAPI)/..# Run javadoc if the index file is out of date or missing$(JAAS_INDEX_FILE): $(JAAS_OPTIONS_FILE) $(JAAS_PACKAGES_FILE) coredocs $(prep-javadoc) $(call JavadocSummary,$(JAAS_OPTIONS_FILE),$(JAAS_PACKAGES_FILE)) $(JAVADOC_CMD) -d $(@D) \ @$(JAAS_OPTIONS_FILE) @$(JAAS_PACKAGES_FILE)# Create file with javadoc options in it$(JAAS_OPTIONS_FILE): $(JAAS_OVERVIEW) $(prep-target) @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \ $(call OptionOnly,-Xdoclint:none) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-encoding,ascii) ; \ $(call OptionPair,-overview,$(JAAS_OVERVIEW)) ; \ $(call OptionPair,-doctitle,$(JAAS_DOCTITLE)) ; \ $(call OptionPair,-windowtitle,$(JAAS_WINDOWTITLE) $(DRAFT_WINTITLE)); \ $(call OptionPair,-header,$(JAAS_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-bottom,$(JAAS_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionTrip,-linkoffline,$(JAAS2COREAPI),$(COREAPI_DOCSDIR)/); \ ) >> $@# Create a file with the package names in it$(JAAS_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JAAS_PKGS)) $(prep-target) $(call PackageFilter,$(JAAS_PKGS))############################################################### jgssdocs#ALL_OTHER_TARGETS += jgssdocsJGSS_DOCDIR := $(JRE_API_DOCSDIR)/security/jgss/specJGSS2COREAPI := ../../../$(JDKJRE2COREAPI)JGSS_DOCTITLE := Java$(TRADEMARK) GSS-API UtilitiesJGSS_WINDOWTITLE := Java GSS-API UtilitiesJGSS_HEADER := <strong>Java GSS-API Utilities</strong>JGSS_BOTTOM := $(call CommonBottom,$(JGSS_FIRST_COPYRIGHT_YEAR))JGSS_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/security/jgss/jgss-overview.html# JGSS_PKGS is located in NON_CORE_PKGS.gmk# The index.html, options, and packages filesJGSS_INDEX_FILE = $(JGSS_DOCDIR)/index.htmlJGSS_OPTIONS_FILE = $(DOCSTMPDIR)/jgss.optionsJGSS_PACKAGES_FILE = $(DOCSTMPDIR)/jgss.packagesjgssdocs: $(JGSS_INDEX_FILE)# Set relative location to core api document root$(JGSS_INDEX_FILE): GET2DOCSDIR=$(JGSS2COREAPI)/..# Run javadoc if the index file is out of date or missing$(JGSS_INDEX_FILE): $(JGSS_OPTIONS_FILE) $(JGSS_PACKAGES_FILE) coredocs $(prep-javadoc) $(call JavadocSummary,$(JGSS_OPTIONS_FILE),$(JGSS_PACKAGES_FILE)) $(JAVADOC_CMD) -d $(@D) \ @$(JGSS_OPTIONS_FILE) @$(JGSS_PACKAGES_FILE)# Create file with javadoc options in it$(JGSS_OPTIONS_FILE): $(JGSS_OVERVIEW) $(prep-target) @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \ $(call OptionOnly,-Xdoclint:none) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-encoding,ascii) ; \ $(call OptionOnly,-nodeprecatedlist) ; \ $(call OptionPair,-overview,$(JGSS_OVERVIEW)) ; \ $(call OptionPair,-doctitle,$(JGSS_DOCTITLE)) ; \ $(call OptionPair,-windowtitle,$(JGSS_WINDOWTITLE) $(DRAFT_WINTITLE)); \ $(call OptionPair,-header,$(JGSS_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-bottom,$(JGSS_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionTrip,-linkoffline,$(JGSS2COREAPI),$(COREAPI_DOCSDIR)/); \ ) >> $@# Create a file with the package names in it$(JGSS_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JGSS_PKGS)) $(prep-target) $(call PackageFilter,$(JGSS_PKGS))############################################################### smartcardiodocs#ALL_OTHER_TARGETS += smartcardiodocsSMARTCARDIO_DOCDIR := $(JRE_API_DOCSDIR)/security/smartcardio/specSMARTCARDIO2COREAPI := ../../../$(JDKJRE2COREAPI)SMARTCARDIO_DOCTITLE := Java$(TRADEMARK) Smart Card I/OSMARTCARDIO_WINDOWTITLE := Java Smart Card I/OSMARTCARDIO_HEADER := <strong>Java Smart Card I/O</strong>SMARTCARDIO_BOTTOM := $(call CommonBottom,$(SMARTCARDIO_FIRST_COPYRIGHT_YEAR))# SMARTCARDIO_PKGS is located in NON_CORE_PKGS.gmk# The index.html, options, and packages filesSMARTCARDIO_INDEX_FILE = $(SMARTCARDIO_DOCDIR)/index.htmlSMARTCARDIO_OPTIONS_FILE = $(DOCSTMPDIR)/smartcardio.optionsSMARTCARDIO_PACKAGES_FILE = $(DOCSTMPDIR)/smartcardio.packagessmartcardiodocs: $(SMARTCARDIO_INDEX_FILE)# Set relative location to core api document root$(SMARTCARDIO_INDEX_FILE): GET2DOCSDIR=$(SMARTCARDIO2COREAPI)/..# Run javadoc if the index file is out of date or missing$(SMARTCARDIO_INDEX_FILE): $(SMARTCARDIO_OPTIONS_FILE) $(SMARTCARDIO_PACKAGES_FILE) coredocs $(prep-javadoc) $(call JavadocSummary,$(SMARTCARDIO_OPTIONS_FILE),$(SMARTCARDIO_PACKAGES_FILE)) $(JAVADOC_CMD) -d $(@D) \ @$(SMARTCARDIO_OPTIONS_FILE) @$(SMARTCARDIO_PACKAGES_FILE)# Create file with javadoc options in it$(SMARTCARDIO_OPTIONS_FILE): $(prep-target) @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \ $(call OptionOnly,-Xdoclint:none) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-encoding,ascii) ; \ $(call OptionOnly,-nodeprecatedlist) ; \ $(call OptionPair,-doctitle,$(SMARTCARDIO_DOCTITLE)) ; \ $(call OptionPair,-windowtitle,$(SMARTCARDIO_WINDOWTITLE) $(DRAFT_WINTITLE)); \ $(call OptionPair,-header,$(SMARTCARDIO_HEADER)$(DRAFT_HEADER)); \ $(call OptionPair,-bottom,$(SMARTCARDIO_BOTTOM)$(DRAFT_BOTTOM)); \ $(call OptionTrip,-linkoffline,$(SMARTCARDIO2COREAPI),$(COREAPI_DOCSDIR)/); \ ) >> $@# Create a file with the package names in it$(SMARTCARDIO_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(SMARTCARDIO_PKGS)) $(prep-target) $(call PackageFilter,$(SMARTCARDIO_PKGS))############################################################### httpserverdocs#ALL_OTHER_TARGETS += httpserverdocsHTTPSERVER_DOCDIR := $(JRE_API_DOCSDIR)/net/httpserver/specHTTPSERVER2COREAPI := ../../../$(JDKJRE2COREAPI)HTTPSERVER_DOCTITLE := Java$(TRADEMARK) HTTP ServerHTTPSERVER_WINDOWTITLE := Java HTTP ServerHTTPSERVER_HEADER := <strong>Java HTTP Server</strong>HTTPSERVER_BOTTOM := $(call CommonBottom,$(HTTPSERVER_FIRST_COPYRIGHT_YEAR))# HTTPSERVER_PKGS is located in NON_CORE_PKGS.gmkHTTPSERVER_INDEX_HTML = $(HTTPSERVER_DOCDIR)/index.htmlHTTPSERVER_OPTIONS_FILE = $(DOCSTMPDIR)/httpserver.optionsHTTPSERVER_PACKAGES_FILE = $(DOCSTMPDIR)/httpserver.packageshttpserverdocs: $(HTTPSERVER_INDEX_HTML)# Set relative location to core api document root$(HTTPSERVER_INDEX_HTML): GET2DOCSDIR=$(HTTPSERVER2COREAPI)/..# Run javadoc if the index file is out of date or missing$(HTTPSERVER_INDEX_HTML): $(HTTPSERVER_OPTIONS_FILE) $(HTTPSERVER_PACKAGES_FILE) coredocs $(prep-javadoc) $(call JavadocSummary,$(HTTPSERVER_OPTIONS_FILE),$(HTTPSERVER_PACKAGES_FILE)) $(JAVADOC_CMD) -d $(@D) \ @$(HTTPSERVER_OPTIONS_FILE) @$(HTTPSERVER_PACKAGES_FILE)# Create file with javadoc options in it$(HTTPSERVER_OPTIONS_FILE): $(prep-target) @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \ $(call OptionOnly,-Xdoclint:none) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-encoding,ascii) ; \ $(call OptionOnly,-nodeprecatedlist) ; \ $(call OptionPair,-doctitle,$(HTTPSERVER_DOCTITLE)) ; \ $(call OptionPair,-windowtitle,$(HTTPSERVER_WINDOWTITLE) $(DRAFT_WINTITLE)); \ $(call OptionPair,-header,$(HTTPSERVER_HEADER)$(DRAFT_HEADER)); \ $(call OptionPair,-bottom,$(HTTPSERVER_BOTTOM)$(DRAFT_BOTTOM)); \ $(call OptionTrip,-linkoffline,$(HTTPSERVER2COREAPI),$(COREAPI_DOCSDIR)/); \ ) >> $@# Create a file with the package names in it$(HTTPSERVER_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(HTTPSERVER_PKGS)) $(prep-target) $(call PackageFilter,$(HTTPSERVER_PKGS))############################################################### mgmtdocs#ALL_OTHER_TARGETS += mgmtdocsMGMT_DOCDIR := $(JRE_API_DOCSDIR)/management/extensionMGMT2COREAPI := ../../$(JDKJRE2COREAPI)JVM_MIB_NAME := JVM-MANAGEMENT-MIB.mibJVM_MIB_SRC := $(JDK_TOPDIR)/src/closed/share/classes/sun/management/snmp/$(JVM_MIB_NAME)MGMT_DOCTITLE := Monitoring and Management Interface for the Java$(TRADEMARK) PlatformMGMT_WINDOWTITLE := Monitoring and Management Interface for the Java PlatformMGMT_HEADER := <strong>Monitoring and Management Interface for the Java Platform</strong>MGMT_BOTTOM := $(call CommonBottom,$(MGMT_FIRST_COPYRIGHT_YEAR))MGMT_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/management/mgmt-overview.html# MGMT_PKGS is located in NON_CORE_PKGS.gmk# The index.html, options, and packages filesMGMT_INDEX_FILE = $(MGMT_DOCDIR)/index.htmlMGMT_OPTIONS_FILE = $(DOCSTMPDIR)/mgmt.optionsMGMT_PACKAGES_FILE = $(DOCSTMPDIR)/mgmt.packagesmgmtdocs: $(MGMT_INDEX_FILE)# Set relative location to core api document root$(MGMT_INDEX_FILE): GET2DOCSDIR=$(MGMT2COREAPI)/..# Run javadoc if the index file is out of date or missing$(MGMT_INDEX_FILE): $(MGMT_OPTIONS_FILE) $(MGMT_PACKAGES_FILE) coredocs $(prep-javadoc) @if [ -f $(JVM_MIB_SRC) ] ; then \ $(ECHO) "$(CP) $(JVM_MIB_SRC) $(@D)/.."; \ $(CP) $(JVM_MIB_SRC) $(@D)/.. ; \ else \ $(ECHO) "WARNING: File $(JVM_MIB_NAME) not available."; \ fi $(call JavadocSummary,$(MGMT_OPTIONS_FILE),$(MGMT_PACKAGES_FILE)) $(JAVADOC_CMD) -d $(@D) \ @$(MGMT_OPTIONS_FILE) @$(MGMT_PACKAGES_FILE)# Create file with javadoc options in it$(MGMT_OPTIONS_FILE): $(MGMT_OVERVIEW) $(prep-target) @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \ $(call OptionOnly,-Xdoclint:none) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-encoding,ascii) ; \ $(call OptionOnly,-nodeprecatedlist) ; \ $(call OptionPair,-overview,$(MGMT_OVERVIEW)) ; \ $(call OptionPair,-doctitle,$(MGMT_DOCTITLE)) ; \ $(call OptionPair,-windowtitle,$(MGMT_WINDOWTITLE) $(DRAFT_WINTITLE)); \ $(call OptionPair,-header,$(MGMT_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-bottom,$(MGMT_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionTrip,-linkoffline,$(MGMT2COREAPI),$(COREAPI_DOCSDIR)/); \ ) >> $@# Create a file with the package names in it$(MGMT_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(MGMT_PKGS)) $(prep-target) $(call PackageFilter,$(MGMT_PKGS))############################################################### attachdocs#ALL_OTHER_TARGETS += attachdocsATTACH_DOCDIR := $(JDK_API_DOCSDIR)/attach/specATTACH2COREAPI := ../../$(JDKJRE2COREAPI)ATTACH_DOCTITLE := Attach APIATTACH_WINDOWTITLE := Attach APIATTACH_HEADER := <strong>Attach API</strong>ATTACH_BOTTOM := $(call CommonBottom,$(ATTACH_FIRST_COPYRIGHT_YEAR))# ATTACH_PKGS is located in NON_CORE_PKGS.gmkATTACH_INDEX_HTML = $(ATTACH_DOCDIR)/index.htmlATTACH_OPTIONS_FILE = $(DOCSTMPDIR)/attach.optionsATTACH_PACKAGES_FILE = $(DOCSTMPDIR)/attach.packagesattachdocs: $(ATTACH_INDEX_HTML)# Set relative location to core api document root$(ATTACH_INDEX_HTML): GET2DOCSDIR=$(ATTACH2COREAPI)/..# Run javadoc if the index file is out of date or missing$(ATTACH_INDEX_HTML): $(ATTACH_OPTIONS_FILE) $(ATTACH_PACKAGES_FILE) coredocs $(prep-javadoc) $(call JavadocSummary,$(ATTACH_OPTIONS_FILE),$(ATTACH_PACKAGES_FILE)) $(JAVADOC_CMD) -d $(@D) \ @$(ATTACH_OPTIONS_FILE) @$(ATTACH_PACKAGES_FILE)# Create file with javadoc options in it$(ATTACH_OPTIONS_FILE): $(prep-target) @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \ $(call OptionOnly,-Xdoclint:none) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-encoding,ascii) ; \ $(call OptionOnly,-nodeprecatedlist) ; \ $(call OptionPair,-doctitle,$(ATTACH_DOCTITLE)) ; \ $(call OptionPair,-windowtitle,$(ATTACH_WINDOWTITLE) $(DRAFT_WINTITLE)); \ $(call OptionPair,-header,$(ATTACH_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-bottom,$(ATTACH_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionTrip,-linkoffline,$(ATTACH2COREAPI),$(COREAPI_DOCSDIR)/); \ ) >> $@# Create a file with the package names in it$(ATTACH_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(ATTACH_PKGS)) $(prep-target) $(call PackageFilter,$(ATTACH_PKGS))############################################################### jconsoledocs#ALL_OTHER_TARGETS += jconsoledocsJCONSOLE_DOCDIR := $(JDK_API_DOCSDIR)/jconsole/specJCONSOLE2COREAPI := ../../$(JDKJRE2COREAPI)JCONSOLE_DOCTITLE := JConsole APIJCONSOLE_WINDOWTITLE := JConsole APIJCONSOLE_HEADER := <strong>JConsole API</strong>JCONSOLE_BOTTOM := $(call CommonBottom,$(JCONSOLE_FIRST_COPYRIGHT_YEAR))# JCONSOLE_PKGS is located in NON_CORE_PKGS.gmkJCONSOLE_INDEX_HTML = $(JCONSOLE_DOCDIR)/index.htmlJCONSOLE_OPTIONS_FILE = $(DOCSTMPDIR)/jconsole.optionsJCONSOLE_PACKAGES_FILE = $(DOCSTMPDIR)/jconsole.packagesjconsoledocs: $(JCONSOLE_INDEX_HTML)# Set relative location to core api document root$(JCONSOLE_INDEX_HTML): GET2DOCSDIR=$(JCONSOLE2COREAPI)/..# Run javadoc if the index file is out of date or missing$(JCONSOLE_INDEX_HTML): $(JCONSOLE_OPTIONS_FILE) $(JCONSOLE_PACKAGES_FILE) coredocs $(prep-javadoc) $(call JavadocSummary,$(JCONSOLE_OPTIONS_FILE),$(JCONSOLE_PACKAGES_FILE)) $(JAVADOC_CMD) -d $(@D) \ @$(JCONSOLE_OPTIONS_FILE) @$(JCONSOLE_PACKAGES_FILE)# Create file with javadoc options in it$(JCONSOLE_OPTIONS_FILE): $(prep-target) @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \ $(call OptionOnly,-Xdoclint:none) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-encoding,ascii) ; \ $(call OptionOnly,-nodeprecatedlist) ; \ $(call OptionPair,-doctitle,$(JCONSOLE_DOCTITLE)) ; \ $(call OptionPair,-windowtitle,$(JCONSOLE_WINDOWTITLE) $(DRAFT_WINTITLE)); \ $(call OptionPair,-header,$(JCONSOLE_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-bottom,$(JCONSOLE_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionTrip,-linkoffline,$(JCONSOLE2COREAPI),$(COREAPI_DOCSDIR)/); \ ) >> $@# Create a file with the package names in it$(JCONSOLE_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JCONSOLE_PKGS)) $(prep-target) $(call PackageFilter,$(JCONSOLE_PKGS))############################################################### treeapidocs#ALL_OTHER_TARGETS += treeapidocsTREEAPI_DOCDIR := $(JDK_API_DOCSDIR)/javac/treeTREEAPI2COREAPI := ../../$(JDKJRE2COREAPI)TREEAPI_DOCTITLE := Compiler Tree APITREEAPI_WINDOWTITLE := Compiler Tree APITREEAPI_HEADER := <strong>Compiler Tree API</strong>TREEAPI_BOTTOM := $(call CommonBottom,$(TREEAPI_FIRST_COPYRIGHT_YEAR))TREEAPI_GROUPNAME := PackagesTREEAPI_REGEXP := com.sun.source.*# TREEAPI_PKGS is located in NON_CORE_PKGS.gmkTREEAPI_INDEX_HTML = $(TREEAPI_DOCDIR)/index.htmlTREEAPI_OPTIONS_FILE = $(DOCSTMPDIR)/treeapi.optionsTREEAPI_PACKAGES_FILE = $(DOCSTMPDIR)/treeapi.packagestreeapidocs: $(TREEAPI_INDEX_HTML)# Set relative location to core api document root$(TREEAPI_INDEX_HTML): GET2DOCSDIR=$(TREEAPI2COREAPI)/..# Run javadoc if the index file is out of date or missing$(TREEAPI_INDEX_HTML): $(TREEAPI_OPTIONS_FILE) $(TREEAPI_PACKAGES_FILE) coredocs $(prep-javadoc) $(call JavadocSummary,$(TREEAPI_OPTIONS_FILE),$(TREEAPI_PACKAGES_FILE)) $(JAVADOC_CMD) -d $(@D) \ @$(TREEAPI_OPTIONS_FILE) @$(TREEAPI_PACKAGES_FILE)# Create file with javadoc options in it$(TREEAPI_OPTIONS_FILE): $(prep-target) @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \ $(call OptionOnly,-Xdoclint:none) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-encoding,ascii) ; \ $(call OptionPair,-doctitle,$(TREEAPI_DOCTITLE)) ; \ $(call OptionPair,-windowtitle,$(TREEAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \ $(call OptionPair,-header,$(TREEAPI_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-tag,$(TAG_JLS)) ; \ $(call OptionPair,-bottom,$(TREEAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionTrip,-group,$(TREEAPI_GROUPNAME),$(TREEAPI_REGEXP)); \ $(call OptionTrip,-linkoffline,$(TREEAPI2COREAPI),$(COREAPI_DOCSDIR)/); \ ) >> $@# Create a file with the package names in it$(TREEAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TREEAPI_PKGS)) $(prep-target) $(call PackageFilter,$(TREEAPI_PKGS))############################################################### sctpdocs#ALL_OTHER_TARGETS += sctpdocsSCTPAPI_DOCDIR := $(JRE_API_DOCSDIR)/nio/sctp/specSCTPAPI2COREAPI := ../../../$(JDKJRE2COREAPI)SCTPAPI_DOCTITLE := SCTP APISCTPAPI_WINDOWTITLE := SCTP APISCTPAPI_HEADER := <strong>SCTP API</strong>SCTPAPI_BOTTOM := $(call CommonBottom,$(SCTPAPI_FIRST_COPYRIGHT_YEAR))# SCTPAPI_PKGS is located in NON_CORE_PKGS.gmkSCTPAPI_INDEX_HTML = $(SCTPAPI_DOCDIR)/index.htmlSCTPAPI_OPTIONS_FILE = $(DOCSTMPDIR)/sctp.optionsSCTPAPI_PACKAGES_FILE = $(DOCSTMPDIR)/sctp.packagessctpdocs: $(SCTPAPI_INDEX_HTML)# Set relative location to core api document root$(SCTPAPI_INDEX_HTML): GET2DOCSDIR=$(SCTPAPI2COREAPI)/..# Run javadoc if the index file is out of date or missing$(SCTPAPI_INDEX_HTML): $(SCTPAPI_OPTIONS_FILE) $(SCTPAPI_PACKAGES_FILE) coredocs $(prep-javadoc) $(call JavadocSummary,$(SCTPAPI_OPTIONS_FILE),$(SCTPAPI_PACKAGES_FILE)) $(JAVADOC_CMD) -d $(@D) \ @$(SCTPAPI_OPTIONS_FILE) @$(SCTPAPI_PACKAGES_FILE)# Create file with javadoc options in it$(SCTPAPI_OPTIONS_FILE): $(prep-target) @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \ $(call OptionOnly,-Xdoclint:none) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-encoding,ascii) ; \ $(call OptionOnly,-nodeprecatedlist) ; \ $(call OptionPair,-doctitle,$(SCTPAPI_DOCTITLE)) ; \ $(call OptionPair,-windowtitle,$(SCTPAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \ $(call OptionPair,-header,$(SCTPAPI_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-bottom,$(SCTPAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionTrip,-linkoffline,$(SCTPAPI2COREAPI),$(COREAPI_DOCSDIR)/); \ ) >> $@# Create a file with the package names in it$(SCTPAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(SCTPAPI_PKGS)) $(prep-target) $(call PackageFilter,$(SCTPAPI_PKGS))############################################################### Get a cache of all the directories$(DIRECTORY_CACHE): $(ALL_EXISTING_SOURCE_DIRS) $(prep-target) @for cp in $(ALL_EXISTING_SOURCE_DIRS) ; do \ $(ECHO) "$(FIND) $${cp} -type f >> $@"; \ $(FIND) $${cp} -type f >> $@; \ done##############################################################release version of core packages ######### The rel-coredocs and rel-docs targets were added by Eric Armstrong. rel-coredocs# assumes the kind of large, 32-bit machine used in the javapubs group's docs-release# process. It specifies memory settings accordingly to maximize performance.## The performance settings, like the sanity check, are most important for the core# docs--the platform APIs. Running javadoc on those APIs takes a significant amount# of time and memory. Setting the initial heap size as large as possible is important# to prevent thrashing as the heap grows. Setting the maximum as large as necessary# is also important to keep the job from failing.## -J-Xmx512 sets a maximum of 512, which became necessary in 6.0# -J-Xms256 sets starting size to 256 (default is 8)## rel-coredocs also includes a sanity check to help ensure that BUILD_NUMBER and# MILESTONE are specified properly when docs are built outside of the normal release# engineering process, with the intention of releasing them on the web or in a downloaded# docs bundle. (When invoked in release engineering's control build, the values are always# set properly. But when the targets are run by themselves, they default to b00 and# "internal"--which silently sabotage the result of a build that can take many hours# to complete.# Maximize performance and ensure that build number & milestone are set.rel-coredocs: sanitycheckcoredocs $(MAKE) coredocsrel-docs: rel-coredocs $(ALL_OTHER_TARGETS)## end of production targetsotherdocs: $(ALL_OTHER_TARGETS)clean: $(RM) -r $(DOCSDIR) $(DOCSTMPDIR)############################################################## DEBUG TARGET# List the values defined in the makefile hierarchy, to make sure everything# is set properly, and to help identify values we can use instead of making new ones.# (Most of them come from common/shared/Defs.gmk)## Notes:# * BUILD_NUMBER defaults to b00 if not set on command line with BUILD_NUMBER=<value># * MILESTONE defaults to internal unless set to beta, rc, or fcs on command line##############################################################.PHONY: all docs coredocs rel-docs otherdocs rel-coredocs \ sanitycheckcoredocs $(ALL_OTHER_TARGETS)