Javadoc.gmk 48.8 KB
Newer Older
1
# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
# 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)/docs
TEMPDIR=$(OUTPUT_ROOT)/docstemp

JDK_SHARE_SRC=$(JDK_TOPDIR)/src/share
JDK_SHARE_CLASSES=$(JDK_SHARE_SRC)/classes

JDK_IMPSRC = $(JDK_OUTPUTDIR)/impsrc

JDK_GENSRC = $(JDK_OUTPUTDIR)/gensrc

HOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_OUTPUTDIR)/docs

BUILD_NUMBER=$(JDK_BUILD_NUMBER)

49
JAVADOC_CMD = $(JAVA) \
50 51 52 53
    -Xmx1024m \
    -Djava.awt.headless=true \
    $(NEW_JAVADOC) \
    -bootclasspath $(JDK_OUTPUTDIR)/classes
54 55

# Copyright year for beginning of Java and some of the apis
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
# (Needed when creating the javadocs)
FIRST_COPYRIGHT_YEAR = 1993
DOMAPI_FIRST_COPYRIGHT_YEAR = 2005
MIRROR_FIRST_COPYRIGHT_YEAR = 2004
DOCLETAPI_FIRST_COPYRIGHT_YEAR = 1993
TAGLETAPI_FIRST_COPYRIGHT_YEAR = 1993
JDI_FIRST_COPYRIGHT_YEAR = 1999
JAAS_FIRST_COPYRIGHT_YEAR = 1998
JGSS_FIRST_COPYRIGHT_YEAR = 2000
SMARTCARDIO_FIRST_COPYRIGHT_YEAR = 2005
HTTPSERVER_FIRST_COPYRIGHT_YEAR = 2005
MGMT_FIRST_COPYRIGHT_YEAR = 2003
ATTACH_FIRST_COPYRIGHT_YEAR = 2005
JCONSOLE_FIRST_COPYRIGHT_YEAR = 2006
SCTPAPI_FIRST_COPYRIGHT_YEAR = 2009
TRACING_FIRST_COPYRIGHT_YEAR = 2008
TREEAPI_FIRST_COPYRIGHT_YEAR = 2005
73
NASHORNAPI_FIRST_COPYRIGHT_YEAR = 2014
74 75
JNLP_FIRST_COPYRIGHT_YEAR = 1998
PLUGIN2_FIRST_COPYRIGHT_YEAR = 2007
76
JDKNET_FIRST_COPYRIGHT_YEAR = 2014
77
JACCESSAPI_FIRST_COPYRIGHT_YEAR = 2002
78 79 80 81 82 83 84 85 86 87 88

# Oracle name
FULL_COMPANY_NAME = Oracle and/or its affiliates

# Copyright address
COMPANY_ADDRESS = 500 Oracle Parkway<br>Redwood Shores, CA 94065 USA.

# The trademark symbol
TRADEMARK = &trade;

# Common copyright lines used
89 90 91
# 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.
92 93 94 95 96
COMMA:= ,
EMPTY:=
SPACE:=$(EMPTY) $(EMPTY)
COPYRIGHT_SYMBOL = &\#x00a9;
# Macro to construct the copyright line
97
# (The GNU make 3.78.1 "if" conditional is broken, fixed in GNU make 3.81)
98 99 100 101 102 103 104 105 106 107
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 documents
DOCSDIR_URL = {@docroot}/$(GET2DOCSDIR)

# Url to copyright html file
108
COPYRIGHT_URL = $(DOCSDIR_URL)/legal/cpyr.html
109 110 111 112 113 114 115 116

# Url to bug filing site
BUG_SUBMIT_URL = http://bugreport.sun.com/bugreport/

# Common line for how to submit a bug or rfe
BUG_SUBMIT_LINE = <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a>

# Url to devdocs page
117
# Was: http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.html
118 119
DEV_DOCS_URL-7 = https://docs.oracle.com/javase/7/docs/index.html
DEV_DOCS_URL-8 = https://docs.oracle.com/javase/8/docs/index.html
120
DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION))
121
DOCS_BASE_URL = https://docs.oracle.com/javase/7/docs
122 123 124 125 126 127 128 129 130 131

# Common Java trademark line
JAVA_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
132 133 134 135
# 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)
136
ALL_SOURCE_DIRS = $(JDK_SHARE_CLASSES) \
137 138 139 140 141
    $(JDK_IMPSRC) \
    $(JDK_GENSRC) \
    $(JDK_OUTPUTDIR)/gendocsrc_rmic \
    $(JDK_TOPDIR)/src/solaris/classes \
    $(JDK_TOPDIR)/src/windows/classes \
142
    $(NASHORN_TOPDIR)/src/ \
143
    $(JDK_SHARE_SRC)/doc/stub
144 145 146 147 148 149 150 151

# List of directories that actually exist
ALL_EXISTING_SOURCE_DIRS := $(wildcard $(ALL_SOURCE_DIRS))

# List with classpath separator between them
EMPTY:=
SPACE:= $(EMPTY) $(EMPTY)
RELEASEDOCS_SOURCEPATH = \
152
    $(subst $(SPACE),$(PATH_SEP),$(strip $(ALL_SOURCE_DIRS)))
153 154

define prep-target
155 156
	$(MKDIR) -p $(@D)
	$(RM) $@
157 158 159 160
endef

# Prep for javadoc creation, assumes $@ is an index.html file
define prep-javadoc
161 162 163 164 165
	@if [ -f "$@" -a "$?" != "" ] ; then \
	  $(ECHO) "# Dependencies have changed: $?"; \
	fi
	$(RM) -r $(@D)
	$(MKDIR) -p $(@D)
166 167 168 169 170 171
endef

# A cache of the directories in ALL_SOURCE_DIRS
DIRECTORY_CACHE = $(DOCSTMPDIR)/directory.cache

# Given a list of packages, return a list of files or dirs to be dependent on
172
# (Currently only returning a list of directories)
173
define PackageDependencies # packages
174 175 176 177 178 179 180 181
  $(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 \
  )
182 183 184 185
endef

# Given a list of packages, add packages that exist to $@, print summary
define PackageFilter # packages
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
	@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; \
	fi
202 203 204 205
endef

# Print out a summary of the javadoc command about to be run
define JavadocSummary # optionsfile packagesfile
206 207 208
	@$(ECHO) "# Summary for $@"; \
	$(ECHO) "# Options (`$(BASENAME) $1`):"; $(SED) -e 's@^@#   @' $1; \
	$(ECHO) "# Packages (`$(BASENAME) $2`):";$(SED) -e 's@^@#   @' $2
209 210 211 212 213 214 215 216 217 218
endef

#
# Temporary directory for javadoc creation
#
DOCSTMPDIR = $(TEMPDIR)/doctmp

#
# Different api directories created from root directory
#
219 220 221 222
COREAPI_DOCSDIR = $(DOCSDIR)/api
JDK_API_DOCSDIR = $(DOCSDIR)/jdk/api
JRE_API_DOCSDIR = $(DOCSDIR)/jre/api
PLATFORM_DOCSDIR = $(DOCSDIR)/platform
223 224

# The non-core api javadocs need to be able to access the root of the core
225 226 227
# api directory, so for jdk/api or jre/api to get to the core api/
# directory we would use this:
JDKJRE2COREAPI = ../../api
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243

# Common bottom argument
define 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 option
define OptionOnly # opt
244
	$(PRINTF) "%s\n" "$1"
245 246
endef
define OptionPair # opt arg
247
	$(PRINTF) "%s '%s'\n" "$1" '$2'
248 249
endef
define OptionTrip # opt arg arg
250
	$(PRINTF) "%s '%s' '%s'\n" "$1" '$2' '$3'
251 252 253 254 255 256 257 258 259 260 261 262 263
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 all
264 265 266 267 268 269
COMMON_JAVADOCFLAGS = \
    -XDignore.symbol.file=true \
    -quiet \
    -use \
    -keywords \
    -Xdoclint:none \
I
ihse 已提交
270
    -Xprofilespath $(JDK_TOPDIR)/make/profile-rtjar-includes.txt \
271
    $(ADDITIONAL_JAVADOCFLAGS)
272 273

ifdef OPENJDK
274 275
  ADDITIONAL_JAVADOCFLAGS = \
      -Xdocrootparent $(DOCS_BASE_URL)
276 277 278 279 280 281 282
else
  ADDITIONAL_JAVADOCFLAGS =
endif

# Draft used for non-fcs documents
DRAFT_HEADER =
ifneq ($(MILESTONE), fcs)
283 284 285 286 287
  DRAFT_HEADER = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong>
  DRAFT_BOTTOM = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong>
  DRAFT_WINTITLE = $(BUILD_NUMBER)
  # Early access top text (not used in FCS releases)
  COREAPI_TOP_EARLYACCESS = \
288 289 290 291 292 293 294 295 296 297
<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>
298

299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315
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

#################################################################

316 317 318 319 320 321 322
#
# Load custom Javadoc rules, if present
#
-include $(CUSTOM_MAKE_DIR)/Javadoc.gmk

#################################################################

323 324 325 326 327 328 329 330 331
#
# Default target is same as docs target, create core api and all others it can
#

all: docs
docs: coredocs otherdocs

#################################################################
# Production Targets -- USE THESE TARGETS WHEN:
332 333 334 335
# 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.
336
#
337
# See: Notes.html#releaseTargets
338 339 340 341 342 343 344 345 346
# 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) ""
347 348 349 350 351 352
        ifeq ($(BUILD_NUMBER), b00)
	  @$(ECHO) "ERROR: Build number must be defined"
	  @$(ECHO) "MILESTONE is set to $(MILESTONE)"
	  @$(ECHO) ""
	  exit 1
        endif
353 354 355 356 357

#############################################################
#
# coredocs
#
358
COREAPI_DOCTITLE = Java$(TRADEMARK) Platform, Standard Edition \
359
$(JDK_MINOR_VERSION)<br>API Specification
360
COREAPI_WINDOWTITLE = Java Platform SE $(JDK_MINOR_VERSION)
361 362 363 364 365 366 367 368 369 370 371
COREAPI_HEADER = \
<strong>Java$(TRADEMARK)&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;$(JDK_MINOR_VERSION)</strong>

# Java language specification cite
TAG_JLS = jls:a:See <cite> \
The Java&trade; Language Specification</cite>:

# Overview file for core apis
COREAPI_OVERVIEW = $(JDK_SHARE_CLASSES)/overview-core.html

# The index.html, options, and packages files
372 373
COREAPI_INDEX_FILE = $(COREAPI_DOCSDIR)/index.html
COREAPI_OPTIONS_FILE = $(DOCSTMPDIR)/coredocs.options
374 375 376 377 378 379 380 381 382 383 384 385
COREAPI_PACKAGES_FILE = $(DOCSTMPDIR)/coredocs.packages

coredocs: $(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) \
386
	    @$(COREAPI_OPTIONS_FILE) @$(COREAPI_PACKAGES_FILE)
387 388 389 390

# Create file with javadoc options in it
$(COREAPI_OPTIONS_FILE): $(COREAPI_OVERVIEW)
	$(prep-target)
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(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
423 424 425 426 427 428 429 430 431 432 433 434 435

# 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 += docletapidocs

436 437 438 439 440 441 442 443
DOCLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/doclet
DOCLETAPI2COREAPI := ../../$(JDKJRE2COREAPI)
DOCLETAPI_DOCTITLE := Doclet API
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
444 445 446
# DOCLETAPI_PKGS is located in NON_CORE_PKGS.gmk

# The index.html, options, and packages files
447 448
DOCLETAPI_INDEX_FILE = $(DOCLETAPI_DOCDIR)/index.html
DOCLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/docletapi.options
449 450 451 452 453 454 455 456
DOCLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/docletapi.packages

docletapidocs: $(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
457
$(DOCLETAPI_INDEX_FILE): $(DOCLETAPI_OPTIONS_FILE) $(DOCLETAPI_PACKAGES_FILE) coredocs
458 459 460
	$(prep-javadoc)
	$(call JavadocSummary,$(DOCLETAPI_OPTIONS_FILE),$(DOCLETAPI_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
461
	    @$(DOCLETAPI_OPTIONS_FILE) @$(DOCLETAPI_PACKAGES_FILE)
462 463 464 465

# Create file with javadoc options in it
$(DOCLETAPI_OPTIONS_FILE):
	$(prep-target)
466 467 468 469 470 471 472 473
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(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)) ; \
474 475
	  $(call OptionTrip,-group,$(DOCLETAPI_GROUPNAME),$(DOCLETAPI_REGEXP)); \
	  $(call OptionTrip,-linkoffline,$(DOCLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
476
	) >> $@
477 478 479 480 481 482 483 484 485 486 487 488

# 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 += tagletapidocs
489 490 491
TAGLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/taglet
TAGLETAPI2COREAPI := ../../$(JDKJRE2COREAPI)
TAGLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_YEAR))
492 493 494
# TAGLETAPI_FILE is located in NON_CORE_PKGS.gmk

# Temporary directory (special generation rules)
495
TAGLETAPI_TEMPDIR = $(DOCSTMPDIR)/taglets_temp
496 497

# The index.html, options, and packages files
498 499
TAGLETAPI_INDEX_FILE = $(TAGLETAPI_DOCDIR)/index.html
TAGLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/tagletapi.options
500 501 502 503 504 505 506 507
TAGLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/tagletapi.packages

tagletapidocs: $(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
508
$(TAGLETAPI_INDEX_FILE): $(TAGLETAPI_OPTIONS_FILE) $(TAGLETAPI_PACKAGES_FILE) coredocs
509 510 511 512 513
	$(prep-javadoc)
	$(RM) -r $(TAGLETAPI_TEMPDIR)
	$(MKDIR) -p $(TAGLETAPI_TEMPDIR)
	$(call JavadocSummary,$(TAGLETAPI_OPTIONS_FILE),$(TAGLETAPI_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(TAGLETAPI_TEMPDIR) \
514
	    @$(TAGLETAPI_OPTIONS_FILE) @$(TAGLETAPI_PACKAGES_FILE)
515 516 517 518 519 520 521
	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)
522 523 524 525 526 527
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
	  $(call OptionPair,-encoding,ascii) ; \
	  $(call OptionOnly,-nonavbar) ; \
	  $(call OptionOnly,-noindex) ; \
	  $(call OptionPair,-bottom,$(TAGLETAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
528
	  $(call OptionTrip,-linkoffline,$(TAGLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
529
	) >> $@
530 531 532 533

# Create a file with the package names in it
$(TAGLETAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TAGLETAPI_PKGS))
	$(prep-target)
534
	@($(ECHO) "$(JDK_IMPSRC)/$(TAGLETAPI_FILE)" ) > $@
535 536 537 538 539 540 541 542

#############################################################
#
# domapidocs
#

ALL_OTHER_TARGETS += domapidocs

543 544 545 546 547 548 549 550
DOMAPI_DOCDIR := $(JRE_API_DOCSDIR)/plugin/dom
DOMAPI2COREAPI := ../../$(JDKJRE2COREAPI)
DOMAPI_DOCTITLE := Common DOM API
DOMAPI_WINDOWTITLE := Common DOM API
DOMAPI_HEADER := <strong>Common DOM API</strong>
DOMAPI_BOTTOM := $(call CommonTrademarkBottom,$(DOMAPI_FIRST_COPYRIGHT_YEAR))
DOMAPI_GROUPNAME := Packages
DOMAPI_REGEXP := com.sun.java.browser.dom:org.w3c.dom*
551 552 553
# DOMAPI_PKGS is located in NON_CORE_PKGS.gmk

# The index.html, options, and packages files
554 555
DOMAPI_INDEX_FILE = $(DOMAPI_DOCDIR)/index.html
DOMAPI_OPTIONS_FILE = $(DOCSTMPDIR)/domapi.options
556 557 558 559 560 561 562 563
DOMAPI_PACKAGES_FILE = $(DOCSTMPDIR)/domapi.packages

domapidocs: $(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
564
$(DOMAPI_INDEX_FILE): $(DOMAPI_OPTIONS_FILE) $(DOMAPI_PACKAGES_FILE) coredocs
565 566 567
	$(prep-javadoc)
	$(call JavadocSummary,$(DOMAPI_OPTIONS_FILE),$(DOMAPI_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
568
	    @$(DOMAPI_OPTIONS_FILE) @$(DOMAPI_PACKAGES_FILE)
569 570 571 572

# Create file with javadoc options in it
$(DOMAPI_OPTIONS_FILE):
	$(prep-target)
573 574 575 576 577 578 579 580
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(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)) ; \
581 582
	  $(call OptionTrip,-group,$(DOMAPI_GROUPNAME),$(DOMAPI_REGEXP)); \
	  $(call OptionTrip,-linkoffline,$(DOMAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
583
	) >> $@
584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605

# 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 += jpdadocs

jpdadocs: jdidocs jdwpdocs jvmtidocs

#############################################################
#
# jdidocs
#

ALL_OTHER_TARGETS += jdidocs

606 607 608
JDI_DOCDIR := $(JDK_API_DOCSDIR)/jpda/jdi
JDI2COREAPI := ../../$(JDKJRE2COREAPI)
JDI_DOCTITLE := Java$(TRADEMARK) Debug Interface
609
JDI_WINDOWTITLE := Java Debug Interface
610 611 612
JDI_HEADER := <strong>Java Debug Interface</strong>
JDI_BOTTOM := $(call CommonBottom,$(JDI_FIRST_COPYRIGHT_YEAR))
JDI_OVERVIEW := $(JDK_SHARE_CLASSES)/jdi-overview.html
613 614 615
# JDI_PKGS is located in NON_CORE_PKGS.gmk

# The index.html, options, and packages files
616 617
JDI_INDEX_FILE = $(JDI_DOCDIR)/index.html
JDI_OPTIONS_FILE = $(DOCSTMPDIR)/jdi.options
618 619 620 621 622 623 624 625
JDI_PACKAGES_FILE = $(DOCSTMPDIR)/jdi.packages

jdidocs: $(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
626
$(JDI_INDEX_FILE): $(JDI_OPTIONS_FILE) $(JDI_PACKAGES_FILE) coredocs
627 628 629
	$(prep-javadoc)
	$(call JavadocSummary,$(JDI_OPTIONS_FILE),$(JDI_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
630
	    @$(JDI_OPTIONS_FILE) @$(JDI_PACKAGES_FILE)
631 632 633 634

# Create file with javadoc options in it
$(JDI_OPTIONS_FILE): $(JDI_OVERVIEW)
	$(prep-target)
635 636 637 638 639
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
	  $(call OptionPair,-encoding,ascii) ; \
	  $(call OptionPair,-overview,$(JDI_OVERVIEW)) ; \
	  $(call OptionPair,-doctitle,$(JDI_DOCTITLE)) ; \
640
	  $(call OptionPair,-windowtitle,$(JDI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
641 642
	  $(call OptionPair,-header,$(JDI_HEADER)$(DRAFT_HEADER)) ; \
	  $(call OptionPair,-bottom,$(JDI_BOTTOM)$(DRAFT_BOTTOM)) ; \
643
	  $(call OptionTrip,-linkoffline,$(JDI2COREAPI),$(COREAPI_DOCSDIR)/); \
644
	) >> $@
645 646 647 648 649 650 651 652 653 654 655 656 657

# 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 += jdwpdocs

658
JDWP_DOCDIR = $(PLATFORM_DOCSDIR)/jpda/jdwp
659 660 661 662 663 664 665 666 667 668 669 670 671 672

jdwpdocs: $(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 += jvmtidocs

673 674
JVMTI_DOCDIR = $(PLATFORM_DOCSDIR)/jvmti
JVMTI_HTML = $(HOTSPOT_DIST)/docs/platform/jvmti/jvmti.html
675

676
jvmtidocs: $(JVMTI_DOCDIR)/jvmti.html
677 678
$(JVMTI_DOCDIR)/jvmti.html:
	@$(prep-javadoc)
679 680 681 682
	@if [ -f $(JVMTI_HTML) ] ; then \
	  $(ECHO) "$(CP) $(JVMTI_HTML) $@"; \
	  $(CP) $(JVMTI_HTML) $@; \
	else \
683 684 685 686 687 688 689 690 691 692
	  $(ECHO) "WARNING: Generated file does not exist: $(JVMTI_HTML)"; \
	fi

#############################################################
#
# jaasdocs
#

ALL_OTHER_TARGETS += jaasdocs

693 694 695
JAAS_DOCDIR := $(JRE_API_DOCSDIR)/security/jaas/spec
JAAS2COREAPI := ../../../$(JDKJRE2COREAPI)
JAAS_DOCTITLE := Java$(TRADEMARK) Authentication and Authorization Service
696
JAAS_WINDOWTITLE := Java Authentication and Authorization Service
697 698
JAAS_HEADER := <strong>Java Authentication and Authorization Service</strong>
JAAS_BOTTOM := $(call CommonBottom,$(JAAS_FIRST_COPYRIGHT_YEAR))
699
# JAAS_PKGS is located in NON_CORE_PKGS.gmk
700
JAAS_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/security/auth/jaas-overview.html
701 702

# The index.html, options, and packages files
703 704
JAAS_INDEX_FILE = $(JAAS_DOCDIR)/index.html
JAAS_OPTIONS_FILE = $(DOCSTMPDIR)/jaas.options
705 706 707 708 709 710 711 712
JAAS_PACKAGES_FILE = $(DOCSTMPDIR)/jaas.packages

jaasdocs: $(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
713
$(JAAS_INDEX_FILE): $(JAAS_OPTIONS_FILE) $(JAAS_PACKAGES_FILE) coredocs
714 715 716
	$(prep-javadoc)
	$(call JavadocSummary,$(JAAS_OPTIONS_FILE),$(JAAS_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
717
	    @$(JAAS_OPTIONS_FILE) @$(JAAS_PACKAGES_FILE)
718 719 720 721

# Create file with javadoc options in it
$(JAAS_OPTIONS_FILE): $(JAAS_OVERVIEW)
	$(prep-target)
722 723 724 725 726
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
	  $(call OptionPair,-encoding,ascii) ; \
	  $(call OptionPair,-overview,$(JAAS_OVERVIEW)) ; \
	  $(call OptionPair,-doctitle,$(JAAS_DOCTITLE)) ; \
727
	  $(call OptionPair,-windowtitle,$(JAAS_WINDOWTITLE) $(DRAFT_WINTITLE)); \
728 729
	  $(call OptionPair,-header,$(JAAS_HEADER)$(DRAFT_HEADER)) ; \
	  $(call OptionPair,-bottom,$(JAAS_BOTTOM)$(DRAFT_BOTTOM)) ; \
730
	  $(call OptionTrip,-linkoffline,$(JAAS2COREAPI),$(COREAPI_DOCSDIR)/); \
731
	) >> $@
732 733 734 735 736 737 738 739 740 741 742 743 744

# 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 += jgssdocs

745 746 747
JGSS_DOCDIR := $(JRE_API_DOCSDIR)/security/jgss/spec
JGSS2COREAPI := ../../../$(JDKJRE2COREAPI)
JGSS_DOCTITLE := Java$(TRADEMARK) GSS-API Utilities
748
JGSS_WINDOWTITLE := Java GSS-API Utilities
749 750 751
JGSS_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
752 753 754
# JGSS_PKGS is located in NON_CORE_PKGS.gmk

# The index.html, options, and packages files
755 756
JGSS_INDEX_FILE = $(JGSS_DOCDIR)/index.html
JGSS_OPTIONS_FILE = $(DOCSTMPDIR)/jgss.options
757 758 759 760 761 762 763 764
JGSS_PACKAGES_FILE = $(DOCSTMPDIR)/jgss.packages

jgssdocs: $(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
765
$(JGSS_INDEX_FILE): $(JGSS_OPTIONS_FILE) $(JGSS_PACKAGES_FILE) coredocs
766 767 768
	$(prep-javadoc)
	$(call JavadocSummary,$(JGSS_OPTIONS_FILE),$(JGSS_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
769
	    @$(JGSS_OPTIONS_FILE) @$(JGSS_PACKAGES_FILE)
770 771 772 773

# Create file with javadoc options in it
$(JGSS_OPTIONS_FILE): $(JGSS_OVERVIEW)
	$(prep-target)
774 775 776 777 778 779
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
	  $(call OptionPair,-encoding,ascii) ; \
	  $(call OptionOnly,-nodeprecatedlist) ; \
	  $(call OptionPair,-overview,$(JGSS_OVERVIEW)) ; \
	  $(call OptionPair,-doctitle,$(JGSS_DOCTITLE)) ; \
780
	  $(call OptionPair,-windowtitle,$(JGSS_WINDOWTITLE) $(DRAFT_WINTITLE)); \
781 782
	  $(call OptionPair,-header,$(JGSS_HEADER)$(DRAFT_HEADER)) ; \
	  $(call OptionPair,-bottom,$(JGSS_BOTTOM)$(DRAFT_BOTTOM)) ; \
783
	  $(call OptionTrip,-linkoffline,$(JGSS2COREAPI),$(COREAPI_DOCSDIR)/); \
784
	) >> $@
785 786 787 788 789 790 791 792 793 794 795 796 797

# 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 += smartcardiodocs

798 799 800
SMARTCARDIO_DOCDIR := $(JRE_API_DOCSDIR)/security/smartcardio/spec
SMARTCARDIO2COREAPI := ../../../$(JDKJRE2COREAPI)
SMARTCARDIO_DOCTITLE := Java$(TRADEMARK) Smart Card I/O
801
SMARTCARDIO_WINDOWTITLE := Java Smart Card I/O
802 803
SMARTCARDIO_HEADER := <strong>Java Smart Card I/O</strong>
SMARTCARDIO_BOTTOM := $(call CommonBottom,$(SMARTCARDIO_FIRST_COPYRIGHT_YEAR))
804 805 806
# SMARTCARDIO_PKGS is located in NON_CORE_PKGS.gmk

# The index.html, options, and packages files
807 808
SMARTCARDIO_INDEX_FILE = $(SMARTCARDIO_DOCDIR)/index.html
SMARTCARDIO_OPTIONS_FILE = $(DOCSTMPDIR)/smartcardio.options
809 810 811 812 813 814 815 816
SMARTCARDIO_PACKAGES_FILE = $(DOCSTMPDIR)/smartcardio.packages

smartcardiodocs: $(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
817
$(SMARTCARDIO_INDEX_FILE): $(SMARTCARDIO_OPTIONS_FILE) $(SMARTCARDIO_PACKAGES_FILE) coredocs
818 819 820
	$(prep-javadoc)
	$(call JavadocSummary,$(SMARTCARDIO_OPTIONS_FILE),$(SMARTCARDIO_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
821
	    @$(SMARTCARDIO_OPTIONS_FILE) @$(SMARTCARDIO_PACKAGES_FILE)
822 823 824 825

# Create file with javadoc options in it
$(SMARTCARDIO_OPTIONS_FILE):
	$(prep-target)
826 827 828 829 830 831
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
	  $(call OptionPair,-encoding,ascii) ; \
	  $(call OptionOnly,-nodeprecatedlist) ; \
	  $(call OptionPair,-doctitle,$(SMARTCARDIO_DOCTITLE)) ; \
	  $(call OptionPair,-windowtitle,$(SMARTCARDIO_WINDOWTITLE) $(DRAFT_WINTITLE)); \
832 833 834
	  $(call OptionPair,-header,$(SMARTCARDIO_HEADER)$(DRAFT_HEADER)); \
	  $(call OptionPair,-bottom,$(SMARTCARDIO_BOTTOM)$(DRAFT_BOTTOM)); \
	  $(call OptionTrip,-linkoffline,$(SMARTCARDIO2COREAPI),$(COREAPI_DOCSDIR)/); \
835
	) >> $@
836 837 838 839 840 841 842 843 844 845 846 847 848

# 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 += httpserverdocs

849 850 851
HTTPSERVER_DOCDIR := $(JRE_API_DOCSDIR)/net/httpserver/spec
HTTPSERVER2COREAPI := ../../../$(JDKJRE2COREAPI)
HTTPSERVER_DOCTITLE := Java$(TRADEMARK) HTTP Server
852
HTTPSERVER_WINDOWTITLE := Java HTTP Server
853 854
HTTPSERVER_HEADER := <strong>Java HTTP Server</strong>
HTTPSERVER_BOTTOM := $(call CommonBottom,$(HTTPSERVER_FIRST_COPYRIGHT_YEAR))
855 856
# HTTPSERVER_PKGS is located in NON_CORE_PKGS.gmk

857 858
HTTPSERVER_INDEX_HTML = $(HTTPSERVER_DOCDIR)/index.html
HTTPSERVER_OPTIONS_FILE = $(DOCSTMPDIR)/httpserver.options
859 860 861 862 863 864 865 866
HTTPSERVER_PACKAGES_FILE = $(DOCSTMPDIR)/httpserver.packages

httpserverdocs: $(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
867
$(HTTPSERVER_INDEX_HTML): $(HTTPSERVER_OPTIONS_FILE) $(HTTPSERVER_PACKAGES_FILE) coredocs
868 869 870
	$(prep-javadoc)
	$(call JavadocSummary,$(HTTPSERVER_OPTIONS_FILE),$(HTTPSERVER_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
871
	    @$(HTTPSERVER_OPTIONS_FILE) @$(HTTPSERVER_PACKAGES_FILE)
872 873 874 875

# Create file with javadoc options in it
$(HTTPSERVER_OPTIONS_FILE):
	$(prep-target)
876 877 878 879 880 881
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
	  $(call OptionPair,-encoding,ascii) ; \
	  $(call OptionOnly,-nodeprecatedlist) ; \
	  $(call OptionPair,-doctitle,$(HTTPSERVER_DOCTITLE)) ; \
	  $(call OptionPair,-windowtitle,$(HTTPSERVER_WINDOWTITLE) $(DRAFT_WINTITLE)); \
882 883 884
	  $(call OptionPair,-header,$(HTTPSERVER_HEADER)$(DRAFT_HEADER)); \
	  $(call OptionPair,-bottom,$(HTTPSERVER_BOTTOM)$(DRAFT_BOTTOM)); \
	  $(call OptionTrip,-linkoffline,$(HTTPSERVER2COREAPI),$(COREAPI_DOCSDIR)/); \
885
	) >> $@
886 887 888 889 890 891 892 893 894 895 896 897 898

# 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 += mgmtdocs

899 900 901 902 903
MGMT_DOCDIR := $(JRE_API_DOCSDIR)/management/extension
MGMT2COREAPI := ../../$(JDKJRE2COREAPI)
JVM_MIB_NAME := JVM-MANAGEMENT-MIB.mib
JVM_MIB_SRC := $(JDK_TOPDIR)/src/closed/share/classes/sun/management/snmp/$(JVM_MIB_NAME)
MGMT_DOCTITLE := Monitoring and Management Interface for the Java$(TRADEMARK) Platform
904
MGMT_WINDOWTITLE := Monitoring and Management Interface for the Java Platform
905 906 907
MGMT_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
908 909 910
# MGMT_PKGS is located in NON_CORE_PKGS.gmk

# The index.html, options, and packages files
911 912
MGMT_INDEX_FILE = $(MGMT_DOCDIR)/index.html
MGMT_OPTIONS_FILE = $(DOCSTMPDIR)/mgmt.options
913 914 915 916 917 918 919 920
MGMT_PACKAGES_FILE = $(DOCSTMPDIR)/mgmt.packages

mgmtdocs: $(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
921
$(MGMT_INDEX_FILE): $(MGMT_OPTIONS_FILE) $(MGMT_PACKAGES_FILE) coredocs
922
	$(prep-javadoc)
923 924 925 926 927
	@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."; \
928 929 930
	fi
	$(call JavadocSummary,$(MGMT_OPTIONS_FILE),$(MGMT_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
931
	    @$(MGMT_OPTIONS_FILE) @$(MGMT_PACKAGES_FILE)
932 933 934 935

# Create file with javadoc options in it
$(MGMT_OPTIONS_FILE): $(MGMT_OVERVIEW)
	$(prep-target)
936 937 938 939 940 941
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
	  $(call OptionPair,-encoding,ascii) ; \
	  $(call OptionOnly,-nodeprecatedlist) ; \
	  $(call OptionPair,-overview,$(MGMT_OVERVIEW)) ; \
	  $(call OptionPair,-doctitle,$(MGMT_DOCTITLE)) ; \
942
	  $(call OptionPair,-windowtitle,$(MGMT_WINDOWTITLE) $(DRAFT_WINTITLE)); \
943 944
	  $(call OptionPair,-header,$(MGMT_HEADER)$(DRAFT_HEADER)) ; \
	  $(call OptionPair,-bottom,$(MGMT_BOTTOM)$(DRAFT_BOTTOM)) ; \
945
	  $(call OptionTrip,-linkoffline,$(MGMT2COREAPI),$(COREAPI_DOCSDIR)/); \
946
	) >> $@
947 948 949 950 951 952 953 954 955 956 957 958 959

# 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 += attachdocs

960 961 962
ATTACH_DOCDIR := $(JDK_API_DOCSDIR)/attach/spec
ATTACH2COREAPI := ../../$(JDKJRE2COREAPI)
ATTACH_DOCTITLE := Attach API
963
ATTACH_WINDOWTITLE := Attach API
964 965
ATTACH_HEADER := <strong>Attach API</strong>
ATTACH_BOTTOM := $(call CommonBottom,$(ATTACH_FIRST_COPYRIGHT_YEAR))
966 967
# ATTACH_PKGS is located in NON_CORE_PKGS.gmk

968 969
ATTACH_INDEX_HTML = $(ATTACH_DOCDIR)/index.html
ATTACH_OPTIONS_FILE = $(DOCSTMPDIR)/attach.options
970 971 972 973 974 975 976 977
ATTACH_PACKAGES_FILE = $(DOCSTMPDIR)/attach.packages

attachdocs: $(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
978
$(ATTACH_INDEX_HTML): $(ATTACH_OPTIONS_FILE) $(ATTACH_PACKAGES_FILE) coredocs
979 980 981
	$(prep-javadoc)
	$(call JavadocSummary,$(ATTACH_OPTIONS_FILE),$(ATTACH_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
982
	    @$(ATTACH_OPTIONS_FILE) @$(ATTACH_PACKAGES_FILE)
983 984 985 986

# Create file with javadoc options in it
$(ATTACH_OPTIONS_FILE):
	$(prep-target)
987 988 989 990 991 992 993 994
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(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)) ; \
995
	  $(call OptionTrip,-linkoffline,$(ATTACH2COREAPI),$(COREAPI_DOCSDIR)/); \
996
	) >> $@
997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009

# 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 += jconsoledocs

1010 1011 1012
JCONSOLE_DOCDIR := $(JDK_API_DOCSDIR)/jconsole/spec
JCONSOLE2COREAPI := ../../$(JDKJRE2COREAPI)
JCONSOLE_DOCTITLE := JConsole API
1013
JCONSOLE_WINDOWTITLE := JConsole API
1014 1015
JCONSOLE_HEADER := <strong>JConsole API</strong>
JCONSOLE_BOTTOM := $(call CommonBottom,$(JCONSOLE_FIRST_COPYRIGHT_YEAR))
1016 1017
# JCONSOLE_PKGS is located in NON_CORE_PKGS.gmk

1018 1019
JCONSOLE_INDEX_HTML = $(JCONSOLE_DOCDIR)/index.html
JCONSOLE_OPTIONS_FILE = $(DOCSTMPDIR)/jconsole.options
1020 1021 1022 1023 1024 1025 1026 1027
JCONSOLE_PACKAGES_FILE = $(DOCSTMPDIR)/jconsole.packages

jconsoledocs: $(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
1028
$(JCONSOLE_INDEX_HTML): $(JCONSOLE_OPTIONS_FILE) $(JCONSOLE_PACKAGES_FILE) coredocs
1029 1030 1031
	$(prep-javadoc)
	$(call JavadocSummary,$(JCONSOLE_OPTIONS_FILE),$(JCONSOLE_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
1032
	    @$(JCONSOLE_OPTIONS_FILE) @$(JCONSOLE_PACKAGES_FILE)
1033 1034 1035 1036

# Create file with javadoc options in it
$(JCONSOLE_OPTIONS_FILE):
	$(prep-target)
1037 1038 1039 1040 1041 1042 1043 1044
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(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)) ; \
1045
	  $(call OptionTrip,-linkoffline,$(JCONSOLE2COREAPI),$(COREAPI_DOCSDIR)/); \
1046
	) >> $@
1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059

# 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 += treeapidocs

1060 1061 1062 1063 1064 1065 1066 1067
TREEAPI_DOCDIR := $(JDK_API_DOCSDIR)/javac/tree
TREEAPI2COREAPI := ../../$(JDKJRE2COREAPI)
TREEAPI_DOCTITLE := Compiler Tree API
TREEAPI_WINDOWTITLE := Compiler Tree API
TREEAPI_HEADER := <strong>Compiler Tree API</strong>
TREEAPI_BOTTOM := $(call CommonBottom,$(TREEAPI_FIRST_COPYRIGHT_YEAR))
TREEAPI_GROUPNAME := Packages
TREEAPI_REGEXP := com.sun.source.*
1068 1069
# TREEAPI_PKGS is located in NON_CORE_PKGS.gmk

1070 1071
TREEAPI_INDEX_HTML = $(TREEAPI_DOCDIR)/index.html
TREEAPI_OPTIONS_FILE = $(DOCSTMPDIR)/treeapi.options
1072 1073 1074 1075 1076 1077 1078 1079
TREEAPI_PACKAGES_FILE = $(DOCSTMPDIR)/treeapi.packages

treeapidocs: $(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
1080
$(TREEAPI_INDEX_HTML): $(TREEAPI_OPTIONS_FILE) $(TREEAPI_PACKAGES_FILE) coredocs
1081 1082 1083
	$(prep-javadoc)
	$(call JavadocSummary,$(TREEAPI_OPTIONS_FILE),$(TREEAPI_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
1084
	    @$(TREEAPI_OPTIONS_FILE) @$(TREEAPI_PACKAGES_FILE)
1085 1086 1087 1088

# Create file with javadoc options in it
$(TREEAPI_OPTIONS_FILE):
	$(prep-target)
1089 1090 1091 1092 1093 1094 1095 1096
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(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)) ; \
1097 1098
	  $(call OptionTrip,-group,$(TREEAPI_GROUPNAME),$(TREEAPI_REGEXP)); \
	  $(call OptionTrip,-linkoffline,$(TREEAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
1099
	) >> $@
1100 1101 1102 1103 1104 1105

# Create a file with the package names in it
$(TREEAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TREEAPI_PKGS))
	$(prep-target)
	$(call PackageFilter,$(TREEAPI_PKGS))

1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119
#############################################################
#
# nashornapidocs
#

ALL_OTHER_TARGETS += nashornapidocs

NASHORNAPI_DOCDIR := $(JDK_API_DOCSDIR)/nashorn
NASHORNAPI2COREAPI := ../$(JDKJRE2COREAPI)
NASHORNAPI_DOCTITLE := Nashorn API
NASHORNAPI_WINDOWTITLE := Nashorn API
NASHORNAPI_HEADER := <strong>Nashorn API</strong>
NASHORNAPI_BOTTOM := $(call CommonBottom,$(NASHORNAPI_FIRST_COPYRIGHT_YEAR))
NASHORNAPI_GROUPNAME := Packages
1120 1121
NASHORNAPI_REGEXP := jdk.nashorn.api.scripting.*

1122 1123 1124
# NASHORNAPI_PKGS is located in NON_CORE_PKGS.gmk

NASHORNAPI_INDEX_HTML = $(NASHORNAPI_DOCDIR)/index.html
1125 1126
NASHORNAPI_OPTIONS_FILE = $(DOCSTMPDIR)/nashornapi.options
NASHORNAPI_PACKAGES_FILE = $(DOCSTMPDIR)/nashornapi.packages
1127

1128
nashornapidocs: $(NASHORNAPI_INDEX_HTML)
1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159

# Set relative location to core api document root
$(NASHORNAPI_INDEX_HTML): GET2DOCSDIR=$(NASHORNAPI2COREAPI)/..

# Run javadoc if the index file is out of date or missing
$(NASHORNAPI_INDEX_HTML): $(NASHORNAPI_OPTIONS_FILE) $(NASHORNAPI_PACKAGES_FILE) coredocs
	$(prep-javadoc)
	$(call JavadocSummary,$(NASHORNAPI_OPTIONS_FILE),$(NASHORNAPI_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
	    @$(NASHORNAPI_OPTIONS_FILE) @$(NASHORNAPI_PACKAGES_FILE)

# Create file with javadoc options in it
$(NASHORNAPI_OPTIONS_FILE):
	$(prep-target)
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
	  $(call OptionPair,-encoding,ascii) ; \
	  $(call OptionPair,-doctitle,$(NASHORNAPI_DOCTITLE)) ; \
	  $(call OptionPair,-windowtitle,$(NASHORNAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
	  $(call OptionPair,-header,$(NASHORNAPI_HEADER)$(DRAFT_HEADER)) ; \
	  $(call OptionPair,-tag,$(TAG_JLS)) ; \
	  $(call OptionPair,-bottom,$(NASHORNAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
	  $(call OptionTrip,-group,$(NASHORNAPI_GROUPNAME),$(NASHORNAPI_REGEXP)); \
	  $(call OptionTrip,-linkoffline,$(NASHORNAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
	) >> $@

# Create a file with the package names in it
$(NASHORNAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(NASHORNAPI_PKGS))
	$(prep-target)
	$(call PackageFilter,$(NASHORNAPI_PKGS))

1160 1161 1162 1163 1164 1165 1166
#############################################################
#
# sctpdocs
#

ALL_OTHER_TARGETS += sctpdocs

1167 1168 1169
SCTPAPI_DOCDIR := $(JRE_API_DOCSDIR)/nio/sctp/spec
SCTPAPI2COREAPI := ../../../$(JDKJRE2COREAPI)
SCTPAPI_DOCTITLE := SCTP API
1170
SCTPAPI_WINDOWTITLE := SCTP API
1171 1172
SCTPAPI_HEADER := <strong>SCTP API</strong>
SCTPAPI_BOTTOM := $(call CommonBottom,$(SCTPAPI_FIRST_COPYRIGHT_YEAR))
1173 1174
# SCTPAPI_PKGS is located in NON_CORE_PKGS.gmk

1175 1176
SCTPAPI_INDEX_HTML = $(SCTPAPI_DOCDIR)/index.html
SCTPAPI_OPTIONS_FILE = $(DOCSTMPDIR)/sctp.options
1177 1178 1179 1180 1181 1182 1183 1184
SCTPAPI_PACKAGES_FILE = $(DOCSTMPDIR)/sctp.packages

sctpdocs: $(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
1185
$(SCTPAPI_INDEX_HTML): $(SCTPAPI_OPTIONS_FILE) $(SCTPAPI_PACKAGES_FILE) coredocs
1186 1187 1188
	$(prep-javadoc)
	$(call JavadocSummary,$(SCTPAPI_OPTIONS_FILE),$(SCTPAPI_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
1189
	    @$(SCTPAPI_OPTIONS_FILE) @$(SCTPAPI_PACKAGES_FILE)
1190 1191 1192 1193

# Create file with javadoc options in it
$(SCTPAPI_OPTIONS_FILE):
	$(prep-target)
1194 1195 1196 1197 1198 1199 1200 1201
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(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)) ; \
1202
	  $(call OptionTrip,-linkoffline,$(SCTPAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
1203
	) >> $@
1204 1205 1206 1207 1208 1209

# Create a file with the package names in it
$(SCTPAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(SCTPAPI_PKGS))
	$(prep-target)
	$(call PackageFilter,$(SCTPAPI_PKGS))

1210 1211 1212 1213 1214
#############################################################
#
# jaccessdocs - Java Accessibility Utilities
#

1215
ALL_OTHER_TARGETS += jaccessdocs
1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259

JACCESSAPI_DOCDIR := $(JRE_API_DOCSDIR)/accessibility/jaccess/spec
JACCESSAPI2COREAPI := ../../../$(JDKJRE2COREAPI)
JACCESSAPI_DOCTITLE := JACCESS API
JACCESSAPI_WINDOWTITLE := JACCESS API
JACCESSAPI_HEADER := <strong>JACCESS API</strong>
JACCESSAPI_BOTTOM := $(call CommonBottom,$(JACCESSAPI_FIRST_COPYRIGHT_YEAR))
# JACCESSAPI_PKGS is located in NON_CORE_PKGS.gmk

JACCESSAPI_INDEX_HTML = $(JACCESSAPI_DOCDIR)/index.html
JACCESSAPI_OPTIONS_FILE = $(DOCSTMPDIR)/jaccess.options
JACCESSAPI_PACKAGES_FILE = $(DOCSTMPDIR)/jaccess.packages

jaccessdocs: $(JACCESSAPI_INDEX_HTML)

# Set relative location to core api document root
$(JACCESSAPI_INDEX_HTML): GET2DOCSDIR=$(JACCESSAPI2COREAPI)/..

# Run javadoc if the index file is out of date or missing
$(JACCESSAPI_INDEX_HTML): $(JACCESSAPI_OPTIONS_FILE) $(JACCESSAPI_PACKAGES_FILE) coredocs
	$(prep-javadoc)
	$(call JavadocSummary,$(JACCESSAPI_OPTIONS_FILE),$(JACCESSAPI_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
	    @$(JACCESSAPI_OPTIONS_FILE) @$(JACCESSAPI_PACKAGES_FILE)

# Create file with javadoc options in it
$(JACCESSAPI_OPTIONS_FILE):
	$(prep-target)
	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
	  $(call OptionPair,-encoding,ascii) ; \
	  $(call OptionOnly,-nodeprecatedlist) ; \
	  $(call OptionPair,-doctitle,$(JACCESSAPI_DOCTITLE)) ; \
	  $(call OptionPair,-windowtitle,$(JACCESSAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
	  $(call OptionPair,-header,$(JACCESSAPI_HEADER)$(DRAFT_HEADER)) ; \
	  $(call OptionPair,-bottom,$(JACCESSAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
	  $(call OptionTrip,-linkoffline,$(JACCESSAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
	) >> $@

# Create a file with the package names in it
$(JACCESSAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JACCESSAPI_PKGS))
	$(prep-target)
	$(call PackageFilter,$(JACCESSAPI_PKGS))

1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310
#############################################################
#
# jdk.net docs
#

ALL_OTHER_TARGETS += jdknetdocs

JDKNET_DOCDIR := $(JRE_API_DOCSDIR)/net/socketoptions/spec
JDKNET2COREAPI := ../../../$(JDKJRE2COREAPI)
JDKNET_DOCTITLE := jdk.net API
JDKNET_WINDOWTITLE := jdk.net API
JDKNET_HEADER := <strong>jdk.net API</strong>
JDKNET_BOTTOM := $(call CommonBottom,$(JDKNET_FIRST_COPYRIGHT_YEAR))
JDKNET_PKGS := jdk.net

JDKNET_INDEX_HTML = $(JDKNET_DOCDIR)/index.html
JDKNET_OPTIONS_FILE = $(DOCSTMPDIR)/jdknet.options
JDKNET_PACKAGES_FILE = $(DOCSTMPDIR)/jdknet.packages

jdknetdocs: $(JDKNET_INDEX_HTML)

# Set relative location to core api document root
$(JDKNET_INDEX_HTML): GET2DOCSDIR=$(JDKNET2COREAPI)/..

# Run javadoc if the index file is out of date or missing
$(JDKNET_INDEX_HTML): $(JDKNET_OPTIONS_FILE) $(JDKNET_PACKAGES_FILE) coredocs
	$(prep-javadoc)
	$(call JavadocSummary,$(JDKNET_OPTIONS_FILE),$(JDKNET_PACKAGES_FILE))
	$(JAVADOC_CMD) -d $(@D) \
	    @$(JDKNET_OPTIONS_FILE) @$(JDKNET_PACKAGES_FILE)

# Create file with javadoc options in it
$(JDKNET_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,$(JDKNET_DOCTITLE)) ; \
	  $(call OptionPair,-windowtitle,$(JDKNET_WINDOWTITLE) $(DRAFT_WINTITLE)); \
	  $(call OptionPair,-header,$(JDKNET_HEADER)$(DRAFT_HEADER)); \
	  $(call OptionPair,-bottom,$(JDKNET_BOTTOM)$(DRAFT_BOTTOM)); \
	  $(call OptionTrip,-linkoffline,$(JDKNET2COREAPI),$(COREAPI_DOCSDIR)/); \
	) >> $@

# Create a file with the package names in it
$(JDKNET_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JDKNET_PKGS))
	$(prep-target)
	$(call PackageFilter,$(JDKNET_PKGS))

1311 1312 1313 1314 1315 1316
#############################################################
#
# Get a cache of all the directories

$(DIRECTORY_CACHE): $(ALL_EXISTING_SOURCE_DIRS)
	$(prep-target)
1317 1318 1319
	@for cp in $(ALL_EXISTING_SOURCE_DIRS) ; do \
	  $(ECHO) "$(FIND) $${cp} -type f >> $@"; \
	  $(FIND) $${cp} -type f >> $@; \
1320 1321 1322 1323
	done

#############################################################
#release version of core packages ########
I
ihse 已提交
1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345

# 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.

1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365
# Maximize performance and ensure that build number & milestone are set.

rel-coredocs: sanitycheckcoredocs
	$(MAKE) coredocs

rel-docs: rel-coredocs $(ALL_OTHER_TARGETS)
#
# end of production targets

otherdocs: $(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)
#
1366 1367 1368
# 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
1369 1370 1371 1372
#

#############################################################
.PHONY: all docs coredocs rel-docs otherdocs rel-coredocs \
1373
    sanitycheckcoredocs $(ALL_OTHER_TARGETS)