1 # Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
   2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   3 #
   4 # This code is free software; you can redistribute it and/or modify it
   5 # under the terms of the GNU General Public License version 2 only, as
   6 # published by the Free Software Foundation.  Oracle designates this
   7 # particular file as subject to the "Classpath" exception as provided
   8 # by Oracle in the LICENSE file that accompanied this code.
   9 #
  10 # This code is distributed in the hope that it will be useful, but WITHOUT
  11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13 # version 2 for more details (a copy is included in the LICENSE file that
  14 # accompanied this code).
  15 #
  16 # You should have received a copy of the GNU General Public License version
  17 # 2 along with this work; if not, write to the Free Software Foundation,
  18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19 #
  20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21 # or visit www.oracle.com if you need additional information or have any
  22 # questions.
  23 #
  24 
  25 default: all
  26 
  27 include $(SPEC)
  28 include MakeBase.gmk
  29 include $(JDK_TOPDIR)/make/Tools.gmk
  30 
  31 ################################################################################
  32 
  33 # List of all possible directories for javadoc to look for sources
  34 # Allow custom to overwrite.
  35 JAVADOC_SOURCE_DIRS = \
  36       $(SUPPORT_OUTPUTDIR)/gensrc/* \
  37       $(addsuffix /*, $(IMPORT_MODULES_SRC)) \
  38       $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS)/classes \
  39       $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_TYPE)/classes \
  40       $(JDK_TOPDIR)/src/*/share/classes \
  41       $(HOTSPOT_TOPDIR)/src/*/share/classes \
  42       $(LANGTOOLS_TOPDIR)/src/*/share/classes \
  43       $(NASHORN_TOPDIR)/src/*/share/classes \
  44       $(CORBA_TOPDIR)/src/*/share/classes \
  45       $(JAXP_TOPDIR)/src/*/share/classes \
  46       $(JAXWS_TOPDIR)/src/*/share/classes \
  47       $(SUPPORT_OUTPUTDIR)/rmic/* \
  48       $(JDK_TOPDIR)/src/*/share/doc/stub \
  49       #
  50 
  51 # Should we use -Xdocrootparent? Allow custom to overwrite.
  52 DOCROOTPARENT_FLAG = TRUE
  53 
  54 # URLs
  55 JAVADOC_BASE_URL := http://docs.oracle.com/javase/$(VERSION_SPECIFICATION)/docs
  56 BUG_SUBMIT_URL := http://bugreport.java.com/bugreport/
  57 
  58 ################################################################################
  59 # Text snippets
  60 
  61 FULL_COMPANY_NAME := Oracle and/or its affiliates
  62 COMPANY_ADDRESS := 500 Oracle Parkway<br>Redwood Shores, CA 94065 USA
  63 BUG_SUBMIT_LINE := <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a>
  64 
  65 COMMON_BOTTOM_TEXT := $(BUG_SUBMIT_LINE)<br> Java is a trademark or registered \
  66     trademark of $(FULL_COMPANY_NAME) in the US and other countries.
  67 
  68 CORE_BOTTOM_COPYRIGHT_URL := {@docroot}/../legal/cpyr.html
  69 CORE_BOTTOM_TEXT := \
  70     $(BUG_SUBMIT_LINE) \
  71     <br>For further API reference and developer documentation, see \
  72     <a href="$(JAVADOC_BASE_URL)/index.html" target="_blank">Java SE \
  73     Documentation</a>. That documentation contains more detailed, \
  74     developer-targeted descriptions, with conceptual overviews, definitions of \
  75     terms, workarounds, and working code examples.
  76 
  77 ifeq ($(VERSION_IS_GA), true)
  78   DRAFT_MARKER :=
  79   DRAFT_WINDOW_TITLE_MARKER :=
  80   EARLYACCESS_TOP :=
  81 else
  82   # We need a draft format when not building the GA version.
  83   DRAFT_MARKER := <br><strong>DRAFT&nbsp;$(VERSION_STRING)</strong>
  84   ifeq ($(VERSION_BUILD), 0)
  85     DRAFT_WINDOW_TITLE_MARKER := $(SPACE)[ad-hoc build]
  86   else
  87     DRAFT_WINDOW_TITLE_MARKER := $(SPACE)[build $(VERSION_BUILD)]
  88   endif
  89   EARLYACCESS_TOP := \
  90       <div style="background-color: $(HASH)EEEEEE"><div style="padding: 6px; \
  91       margin-top: 2px; margin-bottom: 6px; margin-left: 6px; margin-right: \
  92       6px; text-align: justify; font-size: 80%; font-family: Helvetica, Arial, \
  93       sans-serif; font-weight: normal;">Please note that the specifications \
  94       and other information contained herein are not final and are subject to \
  95       change. The information is being made available to you solely for \
  96       purpose of evaluation.</div></div>
  97 endif
  98 
  99 ################################################################################
 100 # Special treatment for the core package list. All separate "small" javadoc
 101 # invocation needs to be able to see the core package list.
 102 
 103 ALL_PKG_DIRS := $(dir $(filter %.java, $(call CacheFind, \
 104     $(wildcard $(JAVADOC_SOURCE_DIRS)))))
 105 ALL_SRC_PREFIXES := $(addsuffix /%, $(wildcard $(JAVADOC_SOURCE_DIRS)))
 106 ALL_PKG_DIRNAMES := $(foreach prefix, $(ALL_SRC_PREFIXES), \
 107     $(patsubst $(prefix),%, $(filter $(prefix), $(ALL_PKG_DIRS))))
 108 ALL_PACKAGES := $(sort $(subst /,., $(patsubst %/, %, $(ALL_PKG_DIRNAMES))))
 109 
 110 # Core packages are all packages beginning with java, javax or org, except a few
 111 # excludes.
 112 JAVA_PACKAGES := $(filter java.%, $(ALL_PACKAGES))
 113 JAVAX_PACKAGES := $(filter javax.%, $(ALL_PACKAGES))
 114 ORG_PACKAGES := $(filter org.%, $(ALL_PACKAGES))
 115 
 116 # Allow custom makefile to add more excluded packages
 117 CORE_EXCLUDED_PACKAGES += \
 118     java.awt.dnd.peer \
 119     java.awt.peer \
 120     javax.smartcardio \
 121     org.jcp.xml.dsig.internal% \
 122     org.w3c.dom.css \
 123     org.w3c.dom.html \
 124     org.w3c.dom.stylesheets \
 125     org.w3c.dom.xpath \
 126     org.graalvm.compiler.% \
 127     #
 128 
 129 CORE_PACKAGES := $(filter-out $(CORE_EXCLUDED_PACKAGES), \
 130     $(JAVA_PACKAGES) $(JAVAX_PACKAGES) $(ORG_PACKAGES))
 131 
 132 CORE_PACKAGES_LIST_DIR := $(SUPPORT_OUTPUTDIR)/docs/core-packages
 133 CORE_PACKAGES_LIST_FILE := $(CORE_PACKAGES_LIST_DIR)/package-list
 134 
 135 CORE_PACKAGES_VARDEPS_FILE := $(call DependOnVariable, CORE_PACKAGES, \
 136     $(CORE_PACKAGES_LIST_FILE).vardeps)
 137 
 138 $(CORE_PACKAGES_LIST_FILE): $(CORE_PACKAGES_VARDEPS_FILE)
 139         $(call MakeDir, $(@D))
 140         $(eval $(call ListPathsSafely, CORE_PACKAGES, $@))
 141 
 142 ################################################################################
 143 # Support functions for SetupJavadocGeneration
 144 
 145 # Generate the text used in the -bottom argument.
 146 # Note that COPYRIGHT_YEAR is the current year (from spec.gmk)
 147 # Arguments:
 148 # arg 1: first copyright year
 149 # arg 2: copyright url (optional)
 150 # arg 3: free-form text snippet (optional)
 151 define GenerateBottom
 152   <span style="font-size:smaller">$(if $(strip $3), $(strip $3))<br> $(if \
 153       $(strip $2),<a href="$(strip $2)">Copyright</a>,Copyright) \
 154       &copy; $(strip $1), $(COPYRIGHT_YEAR), $(FULL_COMPANY_NAME). \
 155       $(COMPANY_ADDRESS). All rights reserved.</span>
 156 endef
 157 
 158 # Speed up finding by filling cache
 159 $(eval $(call FillCacheFind, $(wildcard $(JAVADOC_SOURCE_DIRS))))
 160 
 161 # In order to get a specific ordering it's necessary to specify the total
 162 # ordering of tags as the tags are otherwise ordered in order of definition.
 163 DEFAULT_JAVADOC_TAGS := \
 164     -tag beaninfo:X \
 165     -tag revised:X \
 166     -tag since.unbundled:X \
 167     -tag spec:X \
 168     -tag specdefault:X \
 169     -tag Note:X \
 170     -tag ToDo:X \
 171     -tag 'apiNote:a:API Note:' \
 172     -tag 'implSpec:a:Implementation Requirements:' \
 173     -tag 'implNote:a:Implementation Note:' \
 174     -tag param \
 175     -tag return \
 176     -tag throws \
 177     -tag since \
 178     -tag version \
 179     -tag serialData \
 180     -tag factory \
 181     -tag see \
 182     -tag 'jvms:a:See <cite>The Java&trade; Virtual Machine Specification</cite>:' \
 183     -tag 'jls:a:See <cite>The Java&trade; Language Specification</cite>:' \
 184     -taglet build.tools.taglet.Incubating \
 185     -tagletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
 186     #
 187 
 188 DEFAULT_JAVADOC_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
 189     -serialwarn -encoding ISO-8859-1 -breakiterator --system none
 190 
 191 ################################################################################
 192 # Setup make rules for running javadoc.
 193 #
 194 # Parameter 1 is the name of the rule. This name is used as variable prefix,
 195 # and the targets generated are listed in a variable by that name. Note that
 196 # the index.html file will work as a "touch file" for all the magnitude of
 197 # files that are generated by javadoc.
 198 #
 199 # Remaining parameters are named arguments. These include:
 200 #   MODULES - Modules to include
 201 #   PACKAGES - Packages to include
 202 #   IS_CORE - Set to TRUE for the Core API package which needs special treatment
 203 #   API_ROOT - Where to base the documentation (jre or jdk)
 204 #   DEST_DIR - A directory relative to the API root
 205 #   OVERVIEW - Path to a html overview file
 206 #   TITLE - Default title to use for the more specific versions below
 207 #   WINDOW_TITLE - Title to use in -windowtitle. Computed from TITLE if empty.
 208 #   HEADER_TITLE - Title to use in -header. Computed from TITLE if empty.
 209 #   DOC_TITLE - Title to use in -doctitle. Computed from TITLE if empty.
 210 #   FIRST_COPYRIGHT_YEAR - First year this bundle was introduced
 211 #   DISABLED_DOCLINT - Doclint warnings to exclude.
 212 #   DOCLINT_PACKAGES - Optional -Xdoclint/package value
 213 #   SPLIT_INDEX - Enable -splitIndex (split index-all.html if it is too large)
 214 #   BOTTOM_COPYRIGHT_URL - Copyright URL to use in -bottom
 215 #   BOTTOM_TEXT - Extra text to use in -bottom
 216 #   EXTRA_TOP - Additional -top data
 217 #
 218 SetupJavadocGeneration = $(NamedParamsMacroTemplate)
 219 define SetupJavadocGenerationBody
 220   ifeq ($$($1_IS_CORE), TRUE)
 221     $1_JAVA := $$(JAVA)
 222     $1_OUTPUT_DIRNAME := api
 223   else
 224     $1_JAVA := $$(JAVA_SMALL)
 225     $1_OUTPUT_DIRNAME := $$($1_API_ROOT)/api/$$($1_DEST_DIR)
 226 
 227     # Compute a relative path to core root.
 228     # The non-core api javadocs need to be able to access the root of the core
 229     # api directory, so for jdk/api or jre/api to get to the core api/
 230     # directory we would use this
 231     $1_RELATIVE_CORE_DIR := $$(call DirToDotDot, $$($1_OUTPUT_DIRNAME))/api
 232 
 233     # We need to tell javadoc the directory in which to find the core package-list
 234     $1_OPTIONS += -linkoffline $$($1_RELATIVE_CORE_DIR) $$(CORE_PACKAGES_LIST_DIR)
 235 
 236     $1_DEPS += $(CORE_PACKAGES_LIST_FILE)
 237   endif
 238 
 239   $1_OPTIONS += --add-modules $$(call CommaList, $$($1_MODULES))
 240 
 241   ifneq ($$($1_DISABLED_DOCLINT), )
 242     # Create a string like ",-syntax,-html"
 243     $1_DOCLINT_EXCEPTIONS := ,$$(call CommaList, $$(addprefix -, $$($1_DISABLED_DOCLINT)))
 244   endif
 245   $1_OPTIONS += -Xdoclint:all$$($1_DOCLINT_EXCEPTIONS)
 246 
 247   ifneq ($$($1_DOCLINT_PACKAGES), )
 248     $1_OPTIONS += -Xdoclint/package:$$(call CommaList, $$($1_DOCLINT_PACKAGES))
 249   endif
 250 
 251   ifeq ($$($1_DOC_TITLE), )
 252     $1_DOC_TITLE := $$($1_TITLE)
 253   endif
 254   $1_OPTIONS += -doctitle '$$($1_DOC_TITLE)'
 255 
 256   ifeq ($$($1_WINDOW_TITLE), )
 257     $1_WINDOW_TITLE := $$(strip $$(subst &trade;,, $$($1_TITLE)))
 258   endif
 259   $1_OPTIONS += -windowtitle '$$($1_WINDOW_TITLE)$$(DRAFT_WINDOW_TITLE_MARKER)'
 260 
 261   ifeq ($$($1_HEADER_TITLE), )
 262     $1_HEADER_TITLE := $$(strip $$(subst &trade;,, $$($1_TITLE)))
 263   endif
 264   $1_OPTIONS += -header '<strong>$$($1_HEADER_TITLE)</strong>$$(DRAFT_MARKER)'
 265 
 266   ifneq ($$($1_EXTRA_TOP), )
 267     $1_OPTIONS += -top '$$($1_EXTRA_TOP)'
 268   endif
 269 
 270   ifeq ($$($1_BOTTOM_TEXT), )
 271     $1_BOTTOM_TEXT := $(COMMON_BOTTOM_TEXT)
 272   endif
 273   $1_BOTTOM := $$(call GenerateBottom, $$($1_FIRST_COPYRIGHT_YEAR), \
 274       $$($1_BOTTOM_COPYRIGHT_URL), $$($1_BOTTOM_TEXT))
 275   $1_OPTIONS += -bottom '$$($1_BOTTOM)$$(DRAFT_MARKER)'
 276 
 277   ifneq ($$($1_OVERVIEW), )
 278     $1_OPTIONS += -overview $$($1_OVERVIEW)
 279     $1_DEPS +=  $$($1_OVERVIEW)
 280   endif
 281 
 282   ifneq ($$($1_SPLIT_INDEX), )
 283     $1_OPTIONS += -splitIndex
 284   endif
 285 
 286   ifneq ($$($DOCROOTPARENT_FLAG), )
 287     $1_OPTIONS += -Xdocrootparent $(JAVADOC_BASE_URL)
 288   endif
 289 
 290   $1_VARDEPS := $$($1_OPTIONS) $$($1_PACKAGES)
 291   $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
 292        $$(SUPPORT_OUTPUTDIR)/docs/$1.vardeps)
 293 
 294   # Do not store debug level options in VARDEPS.
 295   ifneq ($$(LOG_LEVEL), trace)
 296     $1_OPTIONS += -quiet
 297   else
 298     $1_OPTIONS += -verbose
 299   endif
 300 
 301   $1_PACKAGE_DEPS := $$(call CacheFind, $$(wildcard $$(foreach p, \
 302       $$(subst .,/,$$(strip $$($1_PACKAGES))), \
 303       $$(addsuffix /$$p, $$(wildcard $$(JAVADOC_SOURCE_DIRS))))))
 304 
 305   # If there are many packages, use an @-file...
 306   ifneq ($$(word 17, $$($1_PACKAGES)), )
 307     $1_PACKAGES_FILE := $$(SUPPORT_OUTPUTDIR)/docs/$1.packages
 308     $1_PACKAGES_ARG := @$$($1_PACKAGES_FILE)
 309   else
 310     $1_PACKAGES_ARG := $$($1_PACKAGES)
 311   endif
 312 
 313   # The index.html which is a marker for all the output from javadoc.
 314   $1_INDEX_FILE := $$(JAVADOC_OUTPUTDIR)/$$($1_OUTPUT_DIRNAME)/index.html
 315 
 316   # Rule for actually running javadoc
 317   $$($1_INDEX_FILE): $$(BUILD_TOOLS_JDK) $$($1_VARDEPS_FILE) $$($1_PACKAGE_DEPS) $$($1_DEPS)
 318         $$(call LogWarn, Generating Javadoc from $$(words $$($1_PACKAGES)) package(s) for $$($1_OUTPUT_DIRNAME))
 319         $$(call MakeDir, $$(@D))
 320         ifneq ($$($1_PACKAGES_FILE), )
 321           $$(eval $$(call ListPathsSafely, $1_PACKAGES, $$($1_PACKAGES_FILE)))
 322         endif
 323         $$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/docs/$1.javadoc, \
 324             $$($1_JAVA) -Djava.awt.headless=true $(NEW_JAVADOC) -d $$(@D) \
 325                 $$(DEFAULT_JAVADOC_TAGS) $$(DEFAULT_JAVADOC_OPTIONS) \
 326                 --module-source-path $$(call PathList, $$(JAVADOC_SOURCE_DIRS)) \
 327                 $$($1_OPTIONS) $$($1_PACKAGES_ARG))
 328 
 329   # The output returned will be the index.html file
 330   $1 := $$($1_INDEX_FILE)
 331 endef
 332 
 333 ################################################################################
 334 
 335 $(eval $(call SetupJavadocGeneration, coredocs, \
 336     MODULES := java.se.ee, \
 337     PACKAGES := $(CORE_PACKAGES), \
 338     IS_CORE := TRUE, \
 339     OVERVIEW := $(JDK_TOPDIR)/src/java.base/share/classes/overview-core.html, \
 340     WINDOW_TITLE := Java Platform SE $(VERSION_SPECIFICATION), \
 341     HEADER_TITLE := Java&trade;&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;$(VERSION_SPECIFICATION), \
 342     DOC_TITLE := Java&trade; Platform$(COMMA) Standard Edition \
 343       $(VERSION_SPECIFICATION)<br>API Specification, \
 344     FIRST_COPYRIGHT_YEAR := 1993, \
 345     DISABLED_DOCLINT := accessibility html missing syntax, \
 346     DOCLINT_PACKAGES := -org.omg.* jdk.internal.logging.*, \
 347     SPLIT_INDEX := TRUE, \
 348     BOTTOM_COPYRIGHT_URL := $(CORE_BOTTOM_COPYRIGHT_URL), \
 349     BOTTOM_TEXT := $(CORE_BOTTOM_TEXT), \
 350     EXTRA_TOP := $(EARLYACCESS_TOP), \
 351 ))
 352 
 353 TARGETS += $(coredocs)
 354 
 355 ################################################################################
 356 
 357 $(eval $(call SetupJavadocGeneration, docletapi, \
 358     MODULES := jdk.javadoc, \
 359     PACKAGES := \
 360         jdk.javadoc.doclet, \
 361     API_ROOT := jdk, \
 362     DEST_DIR := javadoc/doclet, \
 363     TITLE := Doclet API, \
 364     FIRST_COPYRIGHT_YEAR := 1993, \
 365 ))
 366 
 367 TARGETS += $(docletapi)
 368 
 369 ################################################################################
 370 
 371 $(eval $(call SetupJavadocGeneration, old-docletapi, \
 372     MODULES := jdk.javadoc, \
 373     PACKAGES := com.sun.javadoc, \
 374     API_ROOT := jdk, \
 375     DEST_DIR := javadoc/old/doclet, \
 376     TITLE := Doclet API, \
 377     FIRST_COPYRIGHT_YEAR := 1993, \
 378 ))
 379 
 380 TARGETS += $(old-docletapi)
 381 
 382 ################################################################################
 383 
 384 $(eval $(call SetupJavadocGeneration, tagletapi, \
 385     MODULES := jdk.javadoc, \
 386     PACKAGES := com.sun.tools.doclets, \
 387     API_ROOT := jdk, \
 388     DEST_DIR := javadoc/old/taglet, \
 389     TITLE := Taglet API, \
 390     FIRST_COPYRIGHT_YEAR := 1993, \
 391 ))
 392 
 393 TARGETS += $(tagletapi)
 394 
 395 ################################################################################
 396 
 397 $(eval $(call SetupJavadocGeneration, domapi, \
 398     MODULES := \
 399         java.xml \
 400         jdk.xml.dom, \
 401     PACKAGES := \
 402         org.w3c.dom \
 403         org.w3c.dom.bootstrap \
 404         org.w3c.dom.ls \
 405         org.w3c.dom.ranges \
 406         org.w3c.dom.traversal \
 407         org.w3c.dom.html \
 408         org.w3c.dom.stylesheets \
 409         org.w3c.dom.css \
 410         org.w3c.dom.events \
 411         org.w3c.dom.views, \
 412     API_ROOT := jre, \
 413     DEST_DIR := plugin/dom, \
 414     TITLE := Common DOM API, \
 415     FIRST_COPYRIGHT_YEAR := 2005, \
 416     DISABLED_DOCLINT := accessibility html missing, \
 417     SPLIT_INDEX := TRUE, \
 418 ))
 419 
 420 TARGETS += $(domapi)
 421 
 422 ################################################################################
 423 
 424 $(eval $(call SetupJavadocGeneration, jdi, \
 425     MODULES := jdk.jdi, \
 426     PACKAGES := \
 427         com.sun.jdi \
 428         com.sun.jdi.event \
 429         com.sun.jdi.request \
 430         com.sun.jdi.connect \
 431         com.sun.jdi.connect.spi, \
 432     API_ROOT := jdk, \
 433     DEST_DIR := jpda/jdi, \
 434     OVERVIEW := $(JDK_TOPDIR)/src/jdk.jdi/share/classes/jdi-overview.html, \
 435     TITLE := Java&trade; Debug Interface, \
 436     FIRST_COPYRIGHT_YEAR := 1999, \
 437     DISABLED_DOCLINT := accessibility missing syntax, \
 438     SPLIT_INDEX := TRUE, \
 439 ))
 440 
 441 TARGETS += $(jdi)
 442 
 443 ################################################################################
 444 
 445 $(eval $(call SetupJavadocGeneration, jaas, \
 446     MODULES := jdk.security.auth, \
 447     PACKAGES := \
 448         com.sun.security.auth \
 449         com.sun.security.auth.callback \
 450         com.sun.security.auth.login \
 451         com.sun.security.auth.module, \
 452     API_ROOT := jre, \
 453     DEST_DIR := security/jaas/spec, \
 454     OVERVIEW := $(JDK_TOPDIR)/src/jdk.security.auth/share/classes/jaas-overview.html, \
 455     TITLE := Java&trade; Authentication and Authorization Service, \
 456     FIRST_COPYRIGHT_YEAR := 1998, \
 457     DISABLED_DOCLINT := missing, \
 458 ))
 459 
 460 TARGETS += $(jaas)
 461 
 462 ################################################################################
 463 
 464 $(eval $(call SetupJavadocGeneration, jgss, \
 465     MODULES := jdk.security.jgss, \
 466     PACKAGES := com.sun.security.jgss, \
 467     API_ROOT := jre, \
 468     DEST_DIR := security/jgss/spec, \
 469     OVERVIEW := $(JDK_TOPDIR)/src/java.security.jgss/share/classes/jgss-overview.html, \
 470     TITLE := Java&trade; GSS-API Utilities, \
 471     FIRST_COPYRIGHT_YEAR := 2000, \
 472 ))
 473 
 474 TARGETS += $(jgss)
 475 
 476 ################################################################################
 477 
 478 $(eval $(call SetupJavadocGeneration, smartcardio, \
 479     MODULES := java.smartcardio, \
 480     PACKAGES := javax.smartcardio, \
 481     API_ROOT := jre, \
 482     DEST_DIR := security/smartcardio/spec, \
 483     TITLE := Java&trade; Smart Card I/O, \
 484     FIRST_COPYRIGHT_YEAR := 2005, \
 485 ))
 486 
 487 TARGETS += $(smartcardio)
 488 
 489 ################################################################################
 490 
 491 $(eval $(call SetupJavadocGeneration, httpserver, \
 492     MODULES := jdk.httpserver, \
 493     PACKAGES := \
 494         com.sun.net.httpserver \
 495         com.sun.net.httpserver.spi, \
 496     API_ROOT := jre, \
 497     DEST_DIR := net/httpserver/spec, \
 498     TITLE := Java&trade; HTTP Server, \
 499     FIRST_COPYRIGHT_YEAR := 2005, \
 500     DISABLED_DOCLINT := accessibility missing syntax, \
 501 ))
 502 
 503 TARGETS += $(httpserver)
 504 
 505 ################################################################################
 506 
 507 $(eval $(call SetupJavadocGeneration, httpclient, \
 508     MODULES := jdk.incubator.httpclient, \
 509     PACKAGES := \
 510         jdk.incubator.http, \
 511     API_ROOT := jre, \
 512     DEST_DIR := incubator/httpclient/spec, \
 513     TITLE := Java&trade; HTTP Client API (incubator module), \
 514     FIRST_COPYRIGHT_YEAR := 2015, \
 515     DISABLED_DOCLINT := accessibility missing syntax, \
 516 ))
 517 
 518 TARGETS += $(httpclient)
 519 
 520 ################################################################################
 521 
 522 $(eval $(call SetupJavadocGeneration, jsobject, \
 523     MODULES := jdk.jsobject, \
 524     PACKAGES := netscape.javascript, \
 525     API_ROOT := jre, \
 526     DEST_DIR := plugin/jsobject, \
 527     FIRST_COPYRIGHT_YEAR := 1993, \
 528     TITLE := Java&trade; JSObject Doc, \
 529 ))
 530 
 531 TARGETS += $(jsobject)
 532 
 533 ################################################################################
 534 
 535 $(eval $(call SetupJavadocGeneration, mgmt, \
 536     MODULES := jdk.management, \
 537     PACKAGES := com.sun.management, \
 538     API_ROOT := jre, \
 539     DEST_DIR := management/extension, \
 540     OVERVIEW := $(JDK_TOPDIR)/src/java.management/share/classes/mgmt-overview.html, \
 541     TITLE := Monitoring and Management Interface for the Java&trade; Platform, \
 542     FIRST_COPYRIGHT_YEAR := 2003, \
 543     DISABLED_DOCLINT := accessibility missing reference, \
 544 ))
 545 
 546 TARGETS += $(mgmt)
 547 
 548 ################################################################################
 549 
 550 $(eval $(call SetupJavadocGeneration, attach, \
 551     MODULES := jdk.attach, \
 552     PACKAGES := \
 553         com.sun.tools.attach \
 554         com.sun.tools.attach.spi, \
 555     API_ROOT := jdk, \
 556     DEST_DIR := attach/spec, \
 557     TITLE := Attach API, \
 558     FIRST_COPYRIGHT_YEAR := 2005, \
 559     DISABLED_DOCLINT := reference, \
 560 ))
 561 
 562 TARGETS += $(attach)
 563 
 564 ################################################################################
 565 
 566 $(eval $(call SetupJavadocGeneration, jconsole, \
 567     MODULES := jdk.jconsole, \
 568     PACKAGES := com.sun.tools.jconsole, \
 569     API_ROOT := jdk, \
 570     DEST_DIR := jconsole/spec, \
 571     TITLE := JConsole API, \
 572     FIRST_COPYRIGHT_YEAR := 2006, \
 573 ))
 574 
 575 TARGETS += $(jconsole)
 576 
 577 ################################################################################
 578 
 579 $(eval $(call SetupJavadocGeneration, jshellapi, \
 580     MODULES := jdk.jshell, \
 581     PACKAGES := \
 582         jdk.jshell \
 583         jdk.jshell.spi \
 584         jdk.jshell.execution \
 585         jdk.jshell.tool, \
 586     API_ROOT := jdk, \
 587     DEST_DIR := jshell, \
 588     TITLE := JShell API, \
 589     FIRST_COPYRIGHT_YEAR := 2015, \
 590     SPLIT_INDEX := TRUE, \
 591 ))
 592 
 593 TARGETS += $(jshellapi)
 594 
 595 ################################################################################
 596 
 597 $(eval $(call SetupJavadocGeneration, treeapi, \
 598     MODULES := jdk.compiler, \
 599     PACKAGES := \
 600         com.sun.source.doctree \
 601         com.sun.source.tree \
 602         com.sun.source.util, \
 603     API_ROOT := jdk, \
 604     DEST_DIR := javac/tree, \
 605     TITLE := Compiler Tree API, \
 606     FIRST_COPYRIGHT_YEAR := 2005, \
 607     SPLIT_INDEX := TRUE, \
 608 ))
 609 
 610 TARGETS += $(treeapi)
 611 
 612 ################################################################################
 613 
 614 $(eval $(call SetupJavadocGeneration, nashornapi, \
 615     MODULES := jdk.scripting.nashorn, \
 616     PACKAGES := \
 617         jdk.nashorn.api.scripting \
 618         jdk.nashorn.api.tree, \
 619     API_ROOT := jdk, \
 620     DEST_DIR := nashorn, \
 621     TITLE := Nashorn API, \
 622     FIRST_COPYRIGHT_YEAR := 2014, \
 623     SPLIT_INDEX := TRUE, \
 624 ))
 625 
 626 TARGETS += $(nashornapi)
 627 
 628 ################################################################################
 629 
 630 $(eval $(call SetupJavadocGeneration, dynalinkapi, \
 631     MODULES := jdk.dynalink, \
 632     PACKAGES := \
 633         jdk.dynalink \
 634         jdk.dynalink.beans \
 635         jdk.dynalink.linker \
 636         jdk.dynalink.linker.support \
 637         jdk.dynalink.support, \
 638     API_ROOT := jdk, \
 639     DEST_DIR := dynalink, \
 640     TITLE := Dynalink API, \
 641     FIRST_COPYRIGHT_YEAR := 2015, \
 642 ))
 643 
 644 TARGETS += $(dynalinkapi)
 645 
 646 ################################################################################
 647 
 648 $(eval $(call SetupJavadocGeneration, sctp, \
 649     MODULES := jdk.sctp, \
 650     PACKAGES := com.sun.nio.sctp, \
 651     API_ROOT := jre, \
 652     DEST_DIR := nio/sctp/spec, \
 653     TITLE := SCTP API, \
 654     FIRST_COPYRIGHT_YEAR := 2009, \
 655 ))
 656 
 657 TARGETS += $(sctp)
 658 
 659 ################################################################################
 660 
 661 $(eval $(call SetupJavadocGeneration, jaccess, \
 662     MODULES := jdk.accessibility, \
 663     PACKAGES := com.sun.java.accessibility.util, \
 664     API_ROOT := jre, \
 665     DEST_DIR := accessibility/jaccess/spec, \
 666     TITLE := JACCESS API, \
 667     FIRST_COPYRIGHT_YEAR := 2002, \
 668 ))
 669 
 670 TARGETS += $(jaccess)
 671 
 672 ################################################################################
 673 
 674 $(eval $(call SetupJavadocGeneration, jdknet, \
 675     MODULES := jdk.net, \
 676     PACKAGES := jdk.net, \
 677     API_ROOT := jre, \
 678     DEST_DIR := net/socketoptions/spec, \
 679     TITLE := jdk.net API, \
 680     FIRST_COPYRIGHT_YEAR := 2014, \
 681     DISABLED_DOCLINT := missing, \
 682 ))
 683 
 684 TARGETS += $(jdknet)
 685 
 686 ################################################################################
 687 # Copy JDWP html file
 688 
 689 JDWP_HTML := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
 690 
 691 $(eval $(call SetupCopyFiles, COPY_JDWP_HTML, \
 692     FILES := $(JDWP_HTML), \
 693     DEST := $(JAVADOC_OUTPUTDIR)/platform/jpda/jdwp, \
 694 ))
 695 
 696 COPY_TARGETS += $(COPY_JDWP_HTML)
 697 
 698 ################################################################################
 699 # Copy JVMTI html file
 700 
 701 # Pick jvmti.html from any jvm variant, they are all the same.
 702 JVMTI_HTML := $(firstword \
 703     $(wildcard $(HOTSPOT_OUTPUTDIR)/variant-*/gensrc/jvmtifiles/jvmti.html))
 704 
 705 $(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \
 706     FILES := $(JVMTI_HTML), \
 707     DEST := $(JAVADOC_OUTPUTDIR)/platform/jvmti, \
 708 ))
 709 
 710 COPY_TARGETS += $(COPY_JVMTI_HTML)
 711 
 712 ################################################################################
 713 # Optional target which bundles all generated javadocs into a zip archive.
 714 
 715 JAVADOC_ARCHIVE_NAME := jdk-$(VERSION_STRING)-docs.zip
 716 JAVADOC_ARCHIVE_ASSEMBLY_DIR := $(SUPPORT_OUTPUTDIR)/docs/zip-docs
 717 JAVADOC_ARCHIVE_DIR := $(OUTPUT_ROOT)/bundles
 718 JAVADOC_ARCHIVE := $(JAVADOC_ARCHIVE_DIR)/$(JAVADOC_ARCHIVE_NAME)
 719 
 720 $(JAVADOC_ARCHIVE): $(TARGETS) $(COPY_TARGETS)
 721         $(call LogInfo, Compressing javadoc to single $(JAVADOC_ARCHIVE_NAME))
 722         $(MKDIR) -p $(JAVADOC_ARCHIVE_DIR)
 723         $(RM) -r $(JAVADOC_ARCHIVE_ASSEMBLY_DIR)
 724         $(MKDIR) -p $(JAVADOC_ARCHIVE_ASSEMBLY_DIR)
 725         all_roots=`$(FIND) $(JAVADOC_OUTPUTDIR) | $(GREP) index.html | grep -v old/doclet`; \
 726         pushd $(JAVADOC_ARCHIVE_ASSEMBLY_DIR); \
 727         for index_file in $${all_roots} ; do \
 728           target_dir=`dirname $${index_file}`; \
 729           name=`$(ECHO) $${target_dir} | $(SED) "s;/spec;;" | $(SED) "s;.*/;;"`; \
 730           $(LN) -s $${target_dir}  $${name}; \
 731         done; \
 732         $(ZIPEXE) -q -r $(JAVADOC_ARCHIVE) * ; \
 733         popd ;
 734 
 735 ZIP_TARGETS += $(JAVADOC_ARCHIVE)
 736 
 737 ################################################################################
 738 
 739 # Hook to include the corresponding custom file, if present.
 740 $(eval $(call IncludeCustomExtension, , Javadoc.gmk))
 741 
 742 ################################################################################
 743 
 744 docs-javadoc: $(TARGETS)
 745 
 746 docs-copy: $(COPY_TARGETS)
 747 
 748 docs-zip: $(ZIP_TARGETS)
 749 
 750 all: docs-javadoc docs-copy docs-zip
 751 
 752 .PHONY: default all docs-javadoc docs-copy docs-zip