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 $(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 © $(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 -taglet build.tools.taglet.ModuleGraph \ 178 -tag since \ 179 -tag version \ 180 -tag serialData \ 181 -tag factory \ 182 -tag see \ 183 -tag 'jvms:a:See <cite>The Java™ Virtual Machine Specification</cite>:' \ 184 -tag 'jls:a:See <cite>The Java™ Language Specification</cite>:' \ 185 -taglet build.tools.taglet.Incubating \ 186 -tagletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \ 187 # 188 189 DEFAULT_JAVADOC_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \ 190 -serialwarn -encoding ISO-8859-1 -breakiterator --system none 191 192 # 193 # TODO: this should be set by the configure option. 194 # 195 JAVADOC_MODULE_GRAPH=false 196 197 ################################################################################ 198 # Setup make rules for running javadoc. 199 # 200 # Parameter 1 is the name of the rule. This name is used as variable prefix, 201 # and the targets generated are listed in a variable by that name. Note that 202 # the index.html file will work as a "touch file" for all the magnitude of 203 # files that are generated by javadoc. 204 # 205 # Remaining parameters are named arguments. These include: 206 # MODULES - Modules to include 207 # PACKAGES - Packages to include 208 # IS_CORE - Set to TRUE for the Core API package which needs special treatment 209 # API_ROOT - Where to base the documentation (jre or jdk) 210 # DEST_DIR - A directory relative to the API root 211 # OVERVIEW - Path to a html overview file 212 # TITLE - Default title to use for the more specific versions below 213 # WINDOW_TITLE - Title to use in -windowtitle. Computed from TITLE if empty. 214 # HEADER_TITLE - Title to use in -header. Computed from TITLE if empty. 215 # DOC_TITLE - Title to use in -doctitle. Computed from TITLE if empty. 216 # FIRST_COPYRIGHT_YEAR - First year this bundle was introduced 217 # DISABLED_DOCLINT - Doclint warnings to exclude. 218 # DOCLINT_PACKAGES - Optional -Xdoclint/package value 219 # SPLIT_INDEX - Enable -splitIndex (split index-all.html if it is too large) 220 # BOTTOM_COPYRIGHT_URL - Copyright URL to use in -bottom 221 # BOTTOM_TEXT - Extra text to use in -bottom 222 # EXTRA_TOP - Additional -top data 223 # 224 SetupJavadocGeneration = $(NamedParamsMacroTemplate) 225 define SetupJavadocGenerationBody 226 ifeq ($$($1_IS_CORE), TRUE) 227 $1_JAVA := $$(JAVA) 228 $1_OUTPUT_DIRNAME := api 229 else 230 $1_JAVA := $$(JAVA_SMALL) 231 $1_OUTPUT_DIRNAME := $$($1_API_ROOT)/api/$$($1_DEST_DIR) 232 233 # Compute a relative path to core root. 234 # The non-core api javadocs need to be able to access the root of the core 235 # api directory, so for jdk/api or jre/api to get to the core api/ 236 # directory we would use this 237 $1_RELATIVE_CORE_DIR := $$(call DirToDotDot, $$($1_OUTPUT_DIRNAME))/api 238 239 # We need to tell javadoc the directory in which to find the core package-list 240 $1_OPTIONS += -linkoffline $$($1_RELATIVE_CORE_DIR) $$(CORE_PACKAGES_LIST_DIR) 241 242 $1_DEPS += $(CORE_PACKAGES_LIST_FILE) 243 endif 244 245 $1_OPTIONS += --add-modules $$(call CommaList, $$($1_MODULES)) 246 247 ifneq ($$($1_DISABLED_DOCLINT), ) 248 # Create a string like ",-syntax,-html" 249 $1_DOCLINT_EXCEPTIONS := ,$$(call CommaList, $$(addprefix -, $$($1_DISABLED_DOCLINT))) 250 endif 251 $1_OPTIONS += -Xdoclint:all$$($1_DOCLINT_EXCEPTIONS) 252 253 ifneq ($$($1_DOCLINT_PACKAGES), ) 254 $1_OPTIONS += -Xdoclint/package:$$(call CommaList, $$($1_DOCLINT_PACKAGES)) 255 endif 256 257 ifeq ($$($1_DOC_TITLE), ) 258 $1_DOC_TITLE := $$($1_TITLE) 259 endif 260 $1_OPTIONS += -doctitle '$$($1_DOC_TITLE)' 261 262 ifeq ($$($1_WINDOW_TITLE), ) 263 $1_WINDOW_TITLE := $$(strip $$(subst ™,, $$($1_TITLE))) 264 endif 265 $1_OPTIONS += -windowtitle '$$($1_WINDOW_TITLE)$$(DRAFT_WINDOW_TITLE_MARKER)' 266 267 ifeq ($$($1_HEADER_TITLE), ) 268 $1_HEADER_TITLE := $$(strip $$(subst ™,, $$($1_TITLE))) 269 endif 270 $1_OPTIONS += -header '<strong>$$($1_HEADER_TITLE)</strong>$$(DRAFT_MARKER)' 271 272 ifneq ($$($1_EXTRA_TOP), ) 273 $1_OPTIONS += -top '$$($1_EXTRA_TOP)' 274 endif 275 276 ifeq ($$($1_BOTTOM_TEXT), ) 277 $1_BOTTOM_TEXT := $(COMMON_BOTTOM_TEXT) 278 endif 279 $1_BOTTOM := $$(call GenerateBottom, $$($1_FIRST_COPYRIGHT_YEAR), \ 280 $$($1_BOTTOM_COPYRIGHT_URL), $$($1_BOTTOM_TEXT)) 281 $1_OPTIONS += -bottom '$$($1_BOTTOM)$$(DRAFT_MARKER)' 282 283 ifneq ($$($1_OVERVIEW), ) 284 $1_OPTIONS += -overview $$($1_OVERVIEW) 285 $1_DEPS += $$($1_OVERVIEW) 286 endif 287 288 ifneq ($$($1_SPLIT_INDEX), ) 289 $1_OPTIONS += -splitIndex 290 endif 291 292 ifneq ($$($DOCROOTPARENT_FLAG), ) 293 $1_OPTIONS += -Xdocrootparent $(JAVADOC_BASE_URL) 294 endif 295 296 $1_VARDEPS := $$($1_OPTIONS) $$($1_PACKAGES) 297 $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \ 298 $$(SUPPORT_OUTPUTDIR)/docs/$1.vardeps) 299 300 # Do not store debug level options in VARDEPS. 301 ifneq ($$(LOG_LEVEL), trace) 302 $1_OPTIONS += -quiet 303 else 304 $1_OPTIONS += -verbose 305 endif 306 307 $1_PACKAGE_DEPS := $$(call CacheFind, $$(wildcard $$(foreach p, \ 308 $$(subst .,/,$$(strip $$($1_PACKAGES))), \ 309 $$(addsuffix /$$p, $$(wildcard $$(JAVADOC_SOURCE_DIRS)))))) 310 311 # If there are many packages, use an @-file... 312 ifneq ($$(word 17, $$($1_PACKAGES)), ) 313 $1_PACKAGES_FILE := $$(SUPPORT_OUTPUTDIR)/docs/$1.packages 314 $1_PACKAGES_ARG := @$$($1_PACKAGES_FILE) 315 else 316 $1_PACKAGES_ARG := $$($1_PACKAGES) 317 endif 318 319 # The index.html which is a marker for all the output from javadoc. 320 $1_INDEX_FILE := $$(JAVADOC_OUTPUTDIR)/$$($1_OUTPUT_DIRNAME)/index.html 321 322 # Rule for actually running javadoc 323 $$($1_INDEX_FILE): $$(BUILD_TOOLS_JDK) $$($1_VARDEPS_FILE) $$($1_PACKAGE_DEPS) $$($1_DEPS) 324 $$(call LogWarn, Generating Javadoc from $$(words $$($1_PACKAGES)) package(s) for $$($1_OUTPUT_DIRNAME)) 325 $$(call MakeDir, $$(@D)) 326 ifneq ($$($1_PACKAGES_FILE), ) 327 $$(eval $$(call ListPathsSafely, $1_PACKAGES, $$($1_PACKAGES_FILE))) 328 endif 329 $$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/docs/$1.javadoc, \ 330 $$($1_JAVA) -Djava.awt.headless=true -DenableModuleGraph=$(JAVADOC_MODULE_GRAPH) \ 331 $(NEW_JAVADOC) -d $$(@D) \ 332 $$(DEFAULT_JAVADOC_TAGS) $$(DEFAULT_JAVADOC_OPTIONS) \ 333 --module-source-path $$(call PathList, $$(JAVADOC_SOURCE_DIRS)) \ 334 $$($1_OPTIONS) $$($1_PACKAGES_ARG)) 335 336 # The output returned will be the index.html file 337 $1 := $$($1_INDEX_FILE) 338 endef 339 340 ################################################################################ 341 342 $(eval $(call SetupJavadocGeneration, coredocs, \ 343 MODULES := java.se.ee, \ 344 PACKAGES := $(CORE_PACKAGES), \ 345 IS_CORE := TRUE, \ 346 OVERVIEW := $(JDK_TOPDIR)/src/java.base/share/classes/overview-core.html, \ 347 WINDOW_TITLE := Java Platform SE $(VERSION_SPECIFICATION), \ 348 HEADER_TITLE := Java™ Platform<br>Standard Ed. $(VERSION_SPECIFICATION), \ 349 DOC_TITLE := Java™ Platform$(COMMA) Standard Edition \ 350 $(VERSION_SPECIFICATION)<br>API Specification, \ 351 FIRST_COPYRIGHT_YEAR := 1993, \ 352 DISABLED_DOCLINT := accessibility html missing syntax, \ 353 DOCLINT_PACKAGES := -org.omg.* jdk.internal.logging.*, \ 354 SPLIT_INDEX := TRUE, \ 355 BOTTOM_COPYRIGHT_URL := $(CORE_BOTTOM_COPYRIGHT_URL), \ 356 BOTTOM_TEXT := $(CORE_BOTTOM_TEXT), \ 357 EXTRA_TOP := $(EARLYACCESS_TOP), \ 358 )) 359 360 TARGETS += $(coredocs) 361 362 ################################################################################ 363 364 $(eval $(call SetupJavadocGeneration, docletapi, \ 365 MODULES := jdk.javadoc, \ 366 PACKAGES := \ 367 jdk.javadoc.doclet, \ 368 API_ROOT := jdk, \ 369 DEST_DIR := javadoc/doclet, \ 370 TITLE := Doclet API, \ 371 FIRST_COPYRIGHT_YEAR := 1993, \ 372 )) 373 374 TARGETS += $(docletapi) 375 376 ################################################################################ 377 378 $(eval $(call SetupJavadocGeneration, old-docletapi, \ 379 MODULES := jdk.javadoc, \ 380 PACKAGES := com.sun.javadoc, \ 381 API_ROOT := jdk, \ 382 DEST_DIR := javadoc/old/doclet, \ 383 TITLE := Doclet API, \ 384 FIRST_COPYRIGHT_YEAR := 1993, \ 385 )) 386 387 TARGETS += $(old-docletapi) 388 389 ################################################################################ 390 391 $(eval $(call SetupJavadocGeneration, tagletapi, \ 392 MODULES := jdk.javadoc, \ 393 PACKAGES := com.sun.tools.doclets, \ 394 API_ROOT := jdk, \ 395 DEST_DIR := javadoc/old/taglet, \ 396 TITLE := Taglet API, \ 397 FIRST_COPYRIGHT_YEAR := 1993, \ 398 )) 399 400 TARGETS += $(tagletapi) 401 402 ################################################################################ 403 404 $(eval $(call SetupJavadocGeneration, domapi, \ 405 MODULES := \ 406 java.xml \ 407 jdk.xml.dom, \ 408 PACKAGES := \ 409 org.w3c.dom \ 410 org.w3c.dom.bootstrap \ 411 org.w3c.dom.ls \ 412 org.w3c.dom.ranges \ 413 org.w3c.dom.traversal \ 414 org.w3c.dom.html \ 415 org.w3c.dom.stylesheets \ 416 org.w3c.dom.css \ 417 org.w3c.dom.events \ 418 org.w3c.dom.views, \ 419 API_ROOT := jre, \ 420 DEST_DIR := plugin/dom, \ 421 TITLE := Common DOM API, \ 422 FIRST_COPYRIGHT_YEAR := 2005, \ 423 DISABLED_DOCLINT := accessibility html missing, \ 424 SPLIT_INDEX := TRUE, \ 425 )) 426 427 TARGETS += $(domapi) 428 429 ################################################################################ 430 431 $(eval $(call SetupJavadocGeneration, jdi, \ 432 MODULES := jdk.jdi, \ 433 PACKAGES := \ 434 com.sun.jdi \ 435 com.sun.jdi.event \ 436 com.sun.jdi.request \ 437 com.sun.jdi.connect \ 438 com.sun.jdi.connect.spi, \ 439 API_ROOT := jdk, \ 440 DEST_DIR := jpda/jdi, \ 441 OVERVIEW := $(JDK_TOPDIR)/src/jdk.jdi/share/classes/jdi-overview.html, \ 442 TITLE := Java™ Debug Interface, \ 443 FIRST_COPYRIGHT_YEAR := 1999, \ 444 DISABLED_DOCLINT := accessibility missing syntax, \ 445 SPLIT_INDEX := TRUE, \ 446 )) 447 448 TARGETS += $(jdi) 449 450 ################################################################################ 451 452 $(eval $(call SetupJavadocGeneration, jaas, \ 453 MODULES := jdk.security.auth, \ 454 PACKAGES := \ 455 com.sun.security.auth \ 456 com.sun.security.auth.callback \ 457 com.sun.security.auth.login \ 458 com.sun.security.auth.module, \ 459 API_ROOT := jre, \ 460 DEST_DIR := security/jaas/spec, \ 461 OVERVIEW := $(JDK_TOPDIR)/src/jdk.security.auth/share/classes/jaas-overview.html, \ 462 TITLE := Java™ Authentication and Authorization Service, \ 463 FIRST_COPYRIGHT_YEAR := 1998, \ 464 DISABLED_DOCLINT := missing, \ 465 )) 466 467 TARGETS += $(jaas) 468 469 ################################################################################ 470 471 $(eval $(call SetupJavadocGeneration, jgss, \ 472 MODULES := jdk.security.jgss, \ 473 PACKAGES := com.sun.security.jgss, \ 474 API_ROOT := jre, \ 475 DEST_DIR := security/jgss/spec, \ 476 OVERVIEW := $(JDK_TOPDIR)/src/java.security.jgss/share/classes/jgss-overview.html, \ 477 TITLE := Java™ GSS-API Utilities, \ 478 FIRST_COPYRIGHT_YEAR := 2000, \ 479 )) 480 481 TARGETS += $(jgss) 482 483 ################################################################################ 484 485 $(eval $(call SetupJavadocGeneration, smartcardio, \ 486 MODULES := java.smartcardio, \ 487 PACKAGES := javax.smartcardio, \ 488 API_ROOT := jre, \ 489 DEST_DIR := security/smartcardio/spec, \ 490 TITLE := Java™ Smart Card I/O, \ 491 FIRST_COPYRIGHT_YEAR := 2005, \ 492 )) 493 494 TARGETS += $(smartcardio) 495 496 ################################################################################ 497 498 $(eval $(call SetupJavadocGeneration, httpserver, \ 499 MODULES := jdk.httpserver, \ 500 PACKAGES := \ 501 com.sun.net.httpserver \ 502 com.sun.net.httpserver.spi, \ 503 API_ROOT := jre, \ 504 DEST_DIR := net/httpserver/spec, \ 505 TITLE := Java™ HTTP Server, \ 506 FIRST_COPYRIGHT_YEAR := 2005, \ 507 DISABLED_DOCLINT := accessibility missing syntax, \ 508 )) 509 510 TARGETS += $(httpserver) 511 512 ################################################################################ 513 514 $(eval $(call SetupJavadocGeneration, httpclient, \ 515 MODULES := jdk.incubator.httpclient, \ 516 PACKAGES := \ 517 jdk.incubator.http, \ 518 API_ROOT := jre, \ 519 DEST_DIR := incubator/httpclient/spec, \ 520 TITLE := Java™ HTTP Client API (incubator module), \ 521 FIRST_COPYRIGHT_YEAR := 2015, \ 522 DISABLED_DOCLINT := accessibility missing syntax, \ 523 )) 524 525 TARGETS += $(httpclient) 526 527 ################################################################################ 528 529 $(eval $(call SetupJavadocGeneration, jsobject, \ 530 MODULES := jdk.jsobject, \ 531 PACKAGES := netscape.javascript, \ 532 API_ROOT := jre, \ 533 DEST_DIR := plugin/jsobject, \ 534 FIRST_COPYRIGHT_YEAR := 1993, \ 535 TITLE := Java™ JSObject Doc, \ 536 )) 537 538 TARGETS += $(jsobject) 539 540 ################################################################################ 541 542 $(eval $(call SetupJavadocGeneration, mgmt, \ 543 MODULES := jdk.management, \ 544 PACKAGES := com.sun.management, \ 545 API_ROOT := jre, \ 546 DEST_DIR := management/extension, \ 547 OVERVIEW := $(JDK_TOPDIR)/src/java.management/share/classes/mgmt-overview.html, \ 548 TITLE := Monitoring and Management Interface for the Java™ Platform, \ 549 FIRST_COPYRIGHT_YEAR := 2003, \ 550 DISABLED_DOCLINT := accessibility missing reference, \ 551 )) 552 553 TARGETS += $(mgmt) 554 555 ################################################################################ 556 557 $(eval $(call SetupJavadocGeneration, attach, \ 558 MODULES := jdk.attach, \ 559 PACKAGES := \ 560 com.sun.tools.attach \ 561 com.sun.tools.attach.spi, \ 562 API_ROOT := jdk, \ 563 DEST_DIR := attach/spec, \ 564 TITLE := Attach API, \ 565 FIRST_COPYRIGHT_YEAR := 2005, \ 566 DISABLED_DOCLINT := reference, \ 567 )) 568 569 TARGETS += $(attach) 570 571 ################################################################################ 572 573 $(eval $(call SetupJavadocGeneration, jconsole, \ 574 MODULES := jdk.jconsole, \ 575 PACKAGES := com.sun.tools.jconsole, \ 576 API_ROOT := jdk, \ 577 DEST_DIR := jconsole/spec, \ 578 TITLE := JConsole API, \ 579 FIRST_COPYRIGHT_YEAR := 2006, \ 580 )) 581 582 TARGETS += $(jconsole) 583 584 ################################################################################ 585 586 $(eval $(call SetupJavadocGeneration, jshellapi, \ 587 MODULES := jdk.jshell, \ 588 PACKAGES := \ 589 jdk.jshell \ 590 jdk.jshell.spi \ 591 jdk.jshell.execution \ 592 jdk.jshell.tool, \ 593 API_ROOT := jdk, \ 594 DEST_DIR := jshell, \ 595 TITLE := JShell API, \ 596 FIRST_COPYRIGHT_YEAR := 2015, \ 597 SPLIT_INDEX := TRUE, \ 598 )) 599 600 TARGETS += $(jshellapi) 601 602 ################################################################################ 603 604 $(eval $(call SetupJavadocGeneration, treeapi, \ 605 MODULES := jdk.compiler, \ 606 PACKAGES := \ 607 com.sun.source.doctree \ 608 com.sun.source.tree \ 609 com.sun.source.util, \ 610 API_ROOT := jdk, \ 611 DEST_DIR := javac/tree, \ 612 TITLE := Compiler Tree API, \ 613 FIRST_COPYRIGHT_YEAR := 2005, \ 614 SPLIT_INDEX := TRUE, \ 615 )) 616 617 TARGETS += $(treeapi) 618 619 ################################################################################ 620 621 $(eval $(call SetupJavadocGeneration, nashornapi, \ 622 MODULES := jdk.scripting.nashorn, \ 623 PACKAGES := \ 624 jdk.nashorn.api.scripting \ 625 jdk.nashorn.api.tree, \ 626 API_ROOT := jdk, \ 627 DEST_DIR := nashorn, \ 628 TITLE := Nashorn API, \ 629 FIRST_COPYRIGHT_YEAR := 2014, \ 630 SPLIT_INDEX := TRUE, \ 631 )) 632 633 TARGETS += $(nashornapi) 634 635 ################################################################################ 636 637 $(eval $(call SetupJavadocGeneration, dynalinkapi, \ 638 MODULES := jdk.dynalink, \ 639 PACKAGES := \ 640 jdk.dynalink \ 641 jdk.dynalink.beans \ 642 jdk.dynalink.linker \ 643 jdk.dynalink.linker.support \ 644 jdk.dynalink.support, \ 645 API_ROOT := jdk, \ 646 DEST_DIR := dynalink, \ 647 TITLE := Dynalink API, \ 648 FIRST_COPYRIGHT_YEAR := 2015, \ 649 )) 650 651 TARGETS += $(dynalinkapi) 652 653 ################################################################################ 654 655 $(eval $(call SetupJavadocGeneration, sctp, \ 656 MODULES := jdk.sctp, \ 657 PACKAGES := com.sun.nio.sctp, \ 658 API_ROOT := jre, \ 659 DEST_DIR := nio/sctp/spec, \ 660 TITLE := SCTP API, \ 661 FIRST_COPYRIGHT_YEAR := 2009, \ 662 )) 663 664 TARGETS += $(sctp) 665 666 ################################################################################ 667 668 $(eval $(call SetupJavadocGeneration, jaccess, \ 669 MODULES := jdk.accessibility, \ 670 PACKAGES := com.sun.java.accessibility.util, \ 671 API_ROOT := jre, \ 672 DEST_DIR := accessibility/jaccess/spec, \ 673 TITLE := JACCESS API, \ 674 FIRST_COPYRIGHT_YEAR := 2002, \ 675 )) 676 677 TARGETS += $(jaccess) 678 679 ################################################################################ 680 681 $(eval $(call SetupJavadocGeneration, jdknet, \ 682 MODULES := jdk.net, \ 683 PACKAGES := jdk.net, \ 684 API_ROOT := jre, \ 685 DEST_DIR := net/socketoptions/spec, \ 686 TITLE := jdk.net API, \ 687 FIRST_COPYRIGHT_YEAR := 2014, \ 688 DISABLED_DOCLINT := missing, \ 689 )) 690 691 TARGETS += $(jdknet) 692 693 ################################################################################ 694 # Copy JDWP html file 695 696 JDWP_HTML := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html 697 698 $(eval $(call SetupCopyFiles, COPY_JDWP_HTML, \ 699 FILES := $(JDWP_HTML), \ 700 DEST := $(JAVADOC_OUTPUTDIR)/platform/jpda/jdwp, \ 701 )) 702 703 COPY_TARGETS += $(COPY_JDWP_HTML) 704 705 ################################################################################ 706 # Copy JVMTI html file 707 708 # Pick jvmti.html from any jvm variant, they are all the same. 709 JVMTI_HTML := $(firstword \ 710 $(wildcard $(HOTSPOT_OUTPUTDIR)/variant-*/gensrc/jvmtifiles/jvmti.html)) 711 712 $(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \ 713 FILES := $(JVMTI_HTML), \ 714 DEST := $(JAVADOC_OUTPUTDIR)/platform/jvmti, \ 715 )) 716 717 COPY_TARGETS += $(COPY_JVMTI_HTML) 718 719 ################################################################################ 720 # Optional target which bundles all generated javadocs into a zip archive. 721 722 JAVADOC_ARCHIVE_NAME := jdk-$(VERSION_STRING)-docs.zip 723 JAVADOC_ARCHIVE_ASSEMBLY_DIR := $(SUPPORT_OUTPUTDIR)/docs/zip-docs 724 JAVADOC_ARCHIVE_DIR := $(OUTPUT_ROOT)/bundles 725 JAVADOC_ARCHIVE := $(JAVADOC_ARCHIVE_DIR)/$(JAVADOC_ARCHIVE_NAME) 726 727 $(JAVADOC_ARCHIVE): $(TARGETS) $(COPY_TARGETS) 728 $(call LogInfo, Compressing javadoc to single $(JAVADOC_ARCHIVE_NAME)) 729 $(MKDIR) -p $(JAVADOC_ARCHIVE_DIR) 730 $(RM) -r $(JAVADOC_ARCHIVE_ASSEMBLY_DIR) 731 $(MKDIR) -p $(JAVADOC_ARCHIVE_ASSEMBLY_DIR) 732 all_roots=`$(FIND) $(JAVADOC_OUTPUTDIR) | $(GREP) index.html | grep -v old/doclet`; \ 733 pushd $(JAVADOC_ARCHIVE_ASSEMBLY_DIR); \ 734 for index_file in $${all_roots} ; do \ 735 target_dir=`dirname $${index_file}`; \ 736 name=`$(ECHO) $${target_dir} | $(SED) "s;/spec;;" | $(SED) "s;.*/;;"`; \ 737 $(LN) -s $${target_dir} $${name}; \ 738 done; \ 739 $(ZIPEXE) -q -r $(JAVADOC_ARCHIVE) * ; \ 740 popd ; 741 742 ZIP_TARGETS += $(JAVADOC_ARCHIVE) 743 744 ################################################################################ 745 746 # Hook to include the corresponding custom file, if present. 747 $(eval $(call IncludeCustomExtension, , Javadoc.gmk)) 748 749 ################################################################################ 750 751 docs-javadoc: $(TARGETS) 752 753 docs-copy: $(COPY_TARGETS) 754 755 docs-zip: $(ZIP_TARGETS) 756 757 all: docs-javadoc docs-copy docs-zip 758 759 .PHONY: default all docs-javadoc docs-copy docs-zip