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