< prev index next >

make/Javadoc.gmk

Print this page




   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 include $(JDK_TOPDIR)/make/ModuleTools.gmk
  31 



  32 ################################################################################

  33 
  34 # List of all possible directories for javadoc to look for sources
  35 # Allow custom to overwrite.
  36 JAVADOC_SOURCE_DIRS = \
  37       $(SUPPORT_OUTPUTDIR)/gensrc/* \
  38       $(addsuffix /*, $(IMPORT_MODULES_SRC)) \
  39       $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS)/classes \
  40       $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_TYPE)/classes \
  41       $(JDK_TOPDIR)/src/*/share/classes \
  42       $(HOTSPOT_TOPDIR)/src/*/share/classes \
  43       $(LANGTOOLS_TOPDIR)/src/*/share/classes \
  44       $(NASHORN_TOPDIR)/src/*/share/classes \
  45       $(CORBA_TOPDIR)/src/*/share/classes \
  46       $(JAXP_TOPDIR)/src/*/share/classes \
  47       $(JAXWS_TOPDIR)/src/*/share/classes \
  48       $(SUPPORT_OUTPUTDIR)/rmic/* \
  49       $(JDK_TOPDIR)/src/*/share/doc/stub \
  50       #
  51 



  52 # Should we use -Xdocrootparent? Allow custom to overwrite.
  53 DOCROOTPARENT_FLAG = TRUE
  54 
  55 # URLs
  56 JAVADOC_BASE_URL := http://docs.oracle.com/javase/$(VERSION_SPECIFICATION)/docs
  57 BUG_SUBMIT_URL := http://bugreport.java.com/bugreport/
  58 
  59 ################################################################################
  60 # Text snippets
  61 
  62 FULL_COMPANY_NAME := Oracle and/or its affiliates
  63 COMPANY_ADDRESS := 500 Oracle Parkway<br>Redwood Shores, CA 94065 USA
  64 BUG_SUBMIT_LINE := <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a>
  65 
  66 COMMON_BOTTOM_TEXT := $(BUG_SUBMIT_LINE)<br> Java is a trademark or registered \
  67     trademark of $(FULL_COMPANY_NAME) in the US and other countries.
  68 
  69 CORE_BOTTOM_COPYRIGHT_URL := {@docroot}/../legal/cpyr.html
  70 CORE_BOTTOM_TEXT := \
  71     $(BUG_SUBMIT_LINE) \
  72     <br>For further API reference and developer documentation, see \
  73     <a href="$(JAVADOC_BASE_URL)/index.html" target="_blank">Java SE \
  74     Documentation</a>. That documentation contains more detailed, \
  75     developer-targeted descriptions, with conceptual overviews, definitions of \
  76     terms, workarounds, and working code examples.
  77 
  78 ifeq ($(VERSION_IS_GA), true)
  79   DRAFT_MARKER :=
  80   DRAFT_WINDOW_TITLE_MARKER :=
  81   EARLYACCESS_TOP :=
  82 else
  83   # We need a draft format when not building the GA version.
  84   DRAFT_MARKER := <br><strong>DRAFT&nbsp;$(VERSION_STRING)</strong>
  85   ifeq ($(VERSION_BUILD), 0)
  86     DRAFT_WINDOW_TITLE_MARKER := $(SPACE)[ad-hoc build]
  87   else
  88     DRAFT_WINDOW_TITLE_MARKER := $(SPACE)[build $(VERSION_BUILD)]
  89   endif
  90   EARLYACCESS_TOP := \
  91       <div style="background-color: $(HASH)EEEEEE"><div style="padding: 6px; \
  92       margin-top: 2px; margin-bottom: 6px; margin-left: 6px; margin-right: \
  93       6px; text-align: justify; font-size: 80%; font-family: Helvetica, Arial, \
  94       sans-serif; font-weight: normal;">Please note that the specifications \
  95       and other information contained herein are not final and are subject to \
  96       change. The information is being made available to you solely for \
  97       purpose of evaluation.</div></div>
  98 endif
  99 
 100 ################################################################################
 101 # Special treatment for the core package list. All separate "small" javadoc
 102 # invocation needs to be able to see the core package list.
 103 
 104 ALL_PKG_DIRS := $(dir $(filter %.java, $(call CacheFind, \
 105     $(wildcard $(JAVADOC_SOURCE_DIRS)))))
 106 ALL_SRC_PREFIXES := $(addsuffix /%, $(wildcard $(JAVADOC_SOURCE_DIRS)))
 107 ALL_PKG_DIRNAMES := $(foreach prefix, $(ALL_SRC_PREFIXES), \
 108     $(patsubst $(prefix),%, $(filter $(prefix), $(ALL_PKG_DIRS))))
 109 ALL_PACKAGES := $(sort $(subst /,., $(patsubst %/, %, $(ALL_PKG_DIRNAMES))))
 110 
 111 # Core packages are all packages beginning with java, javax or org, except a few
 112 # excludes.
 113 JAVA_PACKAGES := $(filter java.%, $(ALL_PACKAGES))
 114 JAVAX_PACKAGES := $(filter javax.%, $(ALL_PACKAGES))
 115 ORG_PACKAGES := $(filter org.%, $(ALL_PACKAGES))
 116 
 117 # Allow custom makefile to add more excluded packages
 118 CORE_EXCLUDED_PACKAGES += \
 119     java.awt.dnd.peer \
 120     java.awt.peer \
 121     javax.smartcardio \
 122     org.jcp.xml.dsig.internal% \
 123     org.w3c.dom.css \
 124     org.w3c.dom.html \
 125     org.w3c.dom.stylesheets \
 126     org.w3c.dom.xpath \
 127     org.graalvm.compiler.% \
 128     #
 129 
 130 CORE_PACKAGES := $(filter-out $(CORE_EXCLUDED_PACKAGES), \
 131     $(JAVA_PACKAGES) $(JAVAX_PACKAGES) $(ORG_PACKAGES))
 132 
 133 CORE_PACKAGES_LIST_DIR := $(SUPPORT_OUTPUTDIR)/docs/core-packages
 134 CORE_PACKAGES_LIST_FILE := $(CORE_PACKAGES_LIST_DIR)/package-list
 135 
 136 CORE_PACKAGES_VARDEPS_FILE := $(call DependOnVariable, CORE_PACKAGES, \
 137     $(CORE_PACKAGES_LIST_FILE).vardeps)
 138 
 139 $(CORE_PACKAGES_LIST_FILE): $(CORE_PACKAGES_VARDEPS_FILE)
 140         $(call MakeDir, $(@D))
 141         $(eval $(call ListPathsSafely, CORE_PACKAGES, $@))
 142 
 143 ################################################################################
 144 # Support functions for SetupJavadocGeneration
 145 
 146 # Generate the text used in the -bottom argument.
 147 # Note that COPYRIGHT_YEAR is the current year (from spec.gmk)
 148 # Arguments:
 149 # arg 1: first copyright year
 150 # arg 2: copyright url (optional)
 151 # arg 3: free-form text snippet (optional)
 152 define GenerateBottom
 153   <span style="font-size:smaller">$(if $(strip $3), $(strip $3))<br> $(if \
 154       $(strip $2),<a href="$(strip $2)">Copyright</a>,Copyright) \
 155       &copy; $(strip $1), $(COPYRIGHT_YEAR), $(FULL_COMPANY_NAME). \
 156       $(COMPANY_ADDRESS). All rights reserved.</span>
 157 endef
 158 
 159 # Speed up finding by filling cache
 160 $(eval $(call FillCacheFind, $(wildcard $(JAVADOC_SOURCE_DIRS))))
 161 
 162 # In order to get a specific ordering it's necessary to specify the total
 163 # ordering of tags as the tags are otherwise ordered in order of definition.
 164 DEFAULT_JAVADOC_TAGS := \
 165     -tag beaninfo:X \
 166     -tag revised:X \
 167     -tag since.unbundled:X \
 168     -tag spec:X \
 169     -tag specdefault:X \
 170     -tag Note:X \
 171     -tag ToDo:X \
 172     -tag 'apiNote:a:API Note:' \
 173     -tag 'implSpec:a:Implementation Requirements:' \
 174     -tag 'implNote:a:Implementation Note:' \
 175     -tag param \
 176     -tag return \
 177     -tag throws \
 178     -taglet build.tools.taglet.ModuleGraph \
 179     -tag since \
 180     -tag version \
 181     -tag serialData \
 182     -tag factory \
 183     -tag see \
 184     -tag 'jvms:a:See <cite>The Java&trade; Virtual Machine Specification</cite>:' \
 185     -tag 'jls:a:See <cite>The Java&trade; Language Specification</cite>:' \
 186     -taglet build.tools.taglet.Incubating \
 187     -tagletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
 188     #
 189 
 190 DEFAULT_JAVADOC_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
 191     -serialwarn -encoding ISO-8859-1 -breakiterator --system none





 192 
 193 #
 194 # TODO: this should be set by the configure option.
 195 #
 196 ifndef ENABLE_MODULE_GRAPH
 197    ENABLE_MODULE_GRAPH=false
 198 endif
 199 
 200 ################################################################################
 201 # Setup make rules for running javadoc.
 202 #
 203 # Parameter 1 is the name of the rule. This name is used as variable prefix,
 204 # and the targets generated are listed in a variable by that name. Note that
 205 # the index.html file will work as a "touch file" for all the magnitude of
 206 # files that are generated by javadoc.
 207 #
 208 # Remaining parameters are named arguments. These include:
 209 #   MODULES - Modules to include
 210 #   PACKAGES - Packages to include
 211 #   IS_CORE - Set to TRUE for the Core API package which needs special treatment
 212 #   API_ROOT - Where to base the documentation (jre or jdk)
 213 #   DEST_DIR - A directory relative to the API root
 214 #   OVERVIEW - Path to a html overview file
 215 #   TITLE - Default title to use for the more specific versions below
 216 #   WINDOW_TITLE - Title to use in -windowtitle. Computed from TITLE if empty.
 217 #   HEADER_TITLE - Title to use in -header. Computed from TITLE if empty.
 218 #   DOC_TITLE - Title to use in -doctitle. Computed from TITLE if empty.
 219 #   FIRST_COPYRIGHT_YEAR - First year this bundle was introduced
 220 #   DISABLED_DOCLINT - Doclint warnings to exclude.
 221 #   DOCLINT_PACKAGES - Optional -Xdoclint/package value
 222 #   SPLIT_INDEX - Enable -splitIndex (split index-all.html if it is too large)
 223 #   BOTTOM_COPYRIGHT_URL - Copyright URL to use in -bottom
 224 #   BOTTOM_TEXT - Extra text to use in -bottom
 225 #   EXTRA_TOP - Additional -top data
 226 #
 227 SetupJavadocGeneration = $(NamedParamsMacroTemplate)
 228 define SetupJavadocGenerationBody
 229   ifeq ($$($1_IS_CORE), TRUE)
 230     $1_JAVA := $$(JAVA)
 231     $1_OUTPUT_DIRNAME := api
 232   else
 233     $1_JAVA := $$(JAVA_SMALL)
 234     $1_OUTPUT_DIRNAME := $$($1_API_ROOT)/api/$$($1_DEST_DIR)
 235 
 236     # Compute a relative path to core root.
 237     # The non-core api javadocs need to be able to access the root of the core
 238     # api directory, so for jdk/api or jre/api to get to the core api/
 239     # directory we would use this
 240     $1_RELATIVE_CORE_DIR := $$(call DirToDotDot, $$($1_OUTPUT_DIRNAME))/api
 241 
 242     # We need to tell javadoc the directory in which to find the core package-list
 243     $1_OPTIONS += -linkoffline $$($1_RELATIVE_CORE_DIR) $$(CORE_PACKAGES_LIST_DIR)
 244 
 245     $1_DEPS += $(CORE_PACKAGES_LIST_FILE)
 246   endif
 247 
 248   $1_OPTIONS += --add-modules $$(call CommaList, $$($1_MODULES))
 249 
 250   ifneq ($$($1_DISABLED_DOCLINT), )
 251     # Create a string like ",-syntax,-html"
 252     $1_DOCLINT_EXCEPTIONS := ,$$(call CommaList, $$(addprefix -, $$($1_DISABLED_DOCLINT)))
 253   endif
 254   $1_OPTIONS += -Xdoclint:all$$($1_DOCLINT_EXCEPTIONS)
 255 
 256   ifneq ($$($1_DOCLINT_PACKAGES), )
 257     $1_OPTIONS += -Xdoclint/package:$$(call CommaList, $$($1_DOCLINT_PACKAGES))
 258   endif
 259 
 260   ifeq ($$($1_DOC_TITLE), )
 261     $1_DOC_TITLE := $$($1_TITLE)
 262   endif
 263   $1_OPTIONS += -doctitle '$$($1_DOC_TITLE)'
 264 
 265   ifeq ($$($1_WINDOW_TITLE), )
 266     $1_WINDOW_TITLE := $$(strip $$(subst &trade;,, $$($1_TITLE)))
 267   endif
 268   $1_OPTIONS += -windowtitle '$$($1_WINDOW_TITLE)$$(DRAFT_WINDOW_TITLE_MARKER)'
 269 
 270   ifeq ($$($1_HEADER_TITLE), )
 271     $1_HEADER_TITLE := $$(strip $$(subst &trade;,, $$($1_TITLE)))
 272   endif
 273   $1_OPTIONS += -header '<strong>$$($1_HEADER_TITLE)</strong>$$(DRAFT_MARKER)'
 274 
 275   ifneq ($$($1_EXTRA_TOP), )
 276     $1_OPTIONS += -top '$$($1_EXTRA_TOP)'
 277   endif
 278 
 279   ifeq ($$($1_BOTTOM_TEXT), )
 280     $1_BOTTOM_TEXT := $(COMMON_BOTTOM_TEXT)
 281   endif
 282   $1_BOTTOM := $$(call GenerateBottom, $$($1_FIRST_COPYRIGHT_YEAR), \
 283       $$($1_BOTTOM_COPYRIGHT_URL), $$($1_BOTTOM_TEXT))
 284   $1_OPTIONS += -bottom '$$($1_BOTTOM)$$(DRAFT_MARKER)'
 285 
 286   ifneq ($$($1_OVERVIEW), )
 287     $1_OPTIONS += -overview $$($1_OVERVIEW)
 288     $1_DEPS +=  $$($1_OVERVIEW)
 289   endif
 290 
 291   ifneq ($$($1_SPLIT_INDEX), )
 292     $1_OPTIONS += -splitIndex
 293   endif
 294 
 295   ifneq ($$($DOCROOTPARENT_FLAG), )
 296     $1_OPTIONS += -Xdocrootparent $(JAVADOC_BASE_URL)
 297   endif
 298 
 299   $1_VARDEPS := $$($1_OPTIONS) $$($1_PACKAGES)
 300   $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
 301        $$(SUPPORT_OUTPUTDIR)/docs/$1.vardeps)
 302 
 303   # Do not store debug level options in VARDEPS.
 304   ifneq ($$(LOG_LEVEL), trace)
 305     $1_OPTIONS += -quiet
 306   else
 307     $1_OPTIONS += -verbose
 308   endif
 309 
 310   $1_PACKAGE_DEPS := $$(call CacheFind, $$(wildcard $$(foreach p, \
 311       $$(subst .,/,$$(strip $$($1_PACKAGES))), \
 312       $$(addsuffix /$$p, $$(wildcard $$(JAVADOC_SOURCE_DIRS))))))
 313 
 314   # If there are many packages, use an @-file...
 315   ifneq ($$(word 17, $$($1_PACKAGES)), )
 316     $1_PACKAGES_FILE := $$(SUPPORT_OUTPUTDIR)/docs/$1.packages
 317     $1_PACKAGES_ARG := @$$($1_PACKAGES_FILE)
 318   else
 319     $1_PACKAGES_ARG := $$($1_PACKAGES)
 320   endif
 321 
 322   # The index.html which is a marker for all the output from javadoc.
 323   $1_INDEX_FILE := $$(JAVADOC_OUTPUTDIR)/$$($1_OUTPUT_DIRNAME)/index.html
 324 
 325   # Rule for actually running javadoc
 326   $$($1_INDEX_FILE): $$(BUILD_TOOLS_JDK) $$($1_VARDEPS_FILE) $$($1_PACKAGE_DEPS) $$($1_DEPS)
 327         $$(call LogWarn, Generating Javadoc from $$(words $$($1_PACKAGES)) package(s) for $$($1_OUTPUT_DIRNAME))
 328         $$(call MakeDir, $$(@D))
 329         ifneq ($$($1_PACKAGES_FILE), )
 330           $$(eval $$(call ListPathsSafely, $1_PACKAGES, $$($1_PACKAGES_FILE)))
 331         endif
 332         $$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/docs/$1.javadoc, \
 333             $$($1_JAVA) -Djava.awt.headless=true -DenableModuleGraph=$(ENABLE_MODULE_GRAPH) \
 334                 $(NEW_JAVADOC) -d $$(@D) \
 335                 $$(DEFAULT_JAVADOC_TAGS) $$(DEFAULT_JAVADOC_OPTIONS) \
 336                 --module-source-path $$(call PathList, $$(JAVADOC_SOURCE_DIRS)) \
 337                 $$($1_OPTIONS) $$($1_PACKAGES_ARG))
 338 
 339   # The output returned will be the index.html file
 340   $1 := $$($1_INDEX_FILE)
 341 endef
 342 
 343 ################################################################################
 344 
 345 $(eval $(call SetupJavadocGeneration, coredocs, \
 346     MODULES := java.se.ee, \
 347     PACKAGES := $(CORE_PACKAGES), \
 348     IS_CORE := TRUE, \
 349     OVERVIEW := $(JDK_TOPDIR)/src/java.base/share/classes/overview-core.html, \
 350     WINDOW_TITLE := Java Platform SE $(VERSION_SPECIFICATION), \
 351     HEADER_TITLE := Java&trade;&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;$(VERSION_SPECIFICATION), \
 352     DOC_TITLE := Java&trade; Platform$(COMMA) Standard Edition \
 353       $(VERSION_SPECIFICATION)<br>API Specification, \
 354     FIRST_COPYRIGHT_YEAR := 1993, \
 355     DISABLED_DOCLINT := accessibility html missing syntax, \
 356     DOCLINT_PACKAGES := -org.omg.* jdk.internal.logging.*, \
 357     SPLIT_INDEX := TRUE, \
 358     BOTTOM_COPYRIGHT_URL := $(CORE_BOTTOM_COPYRIGHT_URL), \
 359     BOTTOM_TEXT := $(CORE_BOTTOM_TEXT), \
 360     EXTRA_TOP := $(EARLYACCESS_TOP), \
 361 ))
 362 
 363 TARGETS += $(coredocs)
 364 
 365 ################################################################################
 366 
 367 $(eval $(call SetupJavadocGeneration, docletapi, \
 368     MODULES := jdk.javadoc, \
 369     PACKAGES := \
 370         jdk.javadoc.doclet, \
 371     API_ROOT := jdk, \
 372     DEST_DIR := javadoc/doclet, \
 373     TITLE := Doclet API, \
 374     FIRST_COPYRIGHT_YEAR := 1993, \
 375 ))
 376 
 377 TARGETS += $(docletapi)
 378 
 379 ################################################################################
 380 
 381 $(eval $(call SetupJavadocGeneration, old-docletapi, \
 382     MODULES := jdk.javadoc, \
 383     PACKAGES := com.sun.javadoc, \
 384     API_ROOT := jdk, \
 385     DEST_DIR := javadoc/old/doclet, \
 386     TITLE := Doclet API, \
 387     FIRST_COPYRIGHT_YEAR := 1993, \
 388 ))
 389 
 390 TARGETS += $(old-docletapi)
 391 
 392 ################################################################################
 393 
 394 $(eval $(call SetupJavadocGeneration, tagletapi, \
 395     MODULES := jdk.javadoc, \
 396     PACKAGES := com.sun.tools.doclets, \
 397     API_ROOT := jdk, \
 398     DEST_DIR := javadoc/old/taglet, \
 399     TITLE := Taglet API, \
 400     FIRST_COPYRIGHT_YEAR := 1993, \
 401 ))
 402 
 403 TARGETS += $(tagletapi)
 404 
 405 ################################################################################
 406 
 407 $(eval $(call SetupJavadocGeneration, domapi, \
 408     MODULES := \
 409         java.xml \
 410         jdk.xml.dom, \
 411     PACKAGES := \
 412         org.w3c.dom \
 413         org.w3c.dom.bootstrap \
 414         org.w3c.dom.ls \
 415         org.w3c.dom.ranges \
 416         org.w3c.dom.traversal \
 417         org.w3c.dom.html \
 418         org.w3c.dom.stylesheets \
 419         org.w3c.dom.css \
 420         org.w3c.dom.events \
 421         org.w3c.dom.views, \
 422     API_ROOT := jre, \
 423     DEST_DIR := plugin/dom, \
 424     TITLE := Common DOM API, \
 425     FIRST_COPYRIGHT_YEAR := 2005, \
 426     DISABLED_DOCLINT := accessibility html missing, \
 427     SPLIT_INDEX := TRUE, \
 428 ))
 429 
 430 TARGETS += $(domapi)
 431 
 432 ################################################################################
 433 
 434 $(eval $(call SetupJavadocGeneration, jdi, \
 435     MODULES := jdk.jdi, \
 436     PACKAGES := \
 437         com.sun.jdi \
 438         com.sun.jdi.event \
 439         com.sun.jdi.request \
 440         com.sun.jdi.connect \
 441         com.sun.jdi.connect.spi, \
 442     API_ROOT := jdk, \
 443     DEST_DIR := jpda/jdi, \
 444     OVERVIEW := $(JDK_TOPDIR)/src/jdk.jdi/share/classes/jdi-overview.html, \
 445     TITLE := Java&trade; Debug Interface, \
 446     FIRST_COPYRIGHT_YEAR := 1999, \
 447     DISABLED_DOCLINT := accessibility missing syntax, \
 448     SPLIT_INDEX := TRUE, \
 449 ))
 450 
 451 TARGETS += $(jdi)
 452 
 453 ################################################################################
 454 
 455 $(eval $(call SetupJavadocGeneration, jaas, \
 456     MODULES := jdk.security.auth, \
 457     PACKAGES := \
 458         com.sun.security.auth \
 459         com.sun.security.auth.callback \
 460         com.sun.security.auth.login \
 461         com.sun.security.auth.module, \
 462     API_ROOT := jre, \
 463     DEST_DIR := security/jaas/spec, \
 464     OVERVIEW := $(JDK_TOPDIR)/src/jdk.security.auth/share/classes/jaas-overview.html, \
 465     TITLE := Java&trade; Authentication and Authorization Service, \
 466     FIRST_COPYRIGHT_YEAR := 1998, \
 467     DISABLED_DOCLINT := missing, \
 468 ))
 469 
 470 TARGETS += $(jaas)
 471 
 472 ################################################################################
 473 
 474 $(eval $(call SetupJavadocGeneration, jgss, \
 475     MODULES := jdk.security.jgss, \
 476     PACKAGES := com.sun.security.jgss, \
 477     API_ROOT := jre, \
 478     DEST_DIR := security/jgss/spec, \
 479     OVERVIEW := $(JDK_TOPDIR)/src/java.security.jgss/share/classes/jgss-overview.html, \
 480     TITLE := Java&trade; GSS-API Utilities, \
 481     FIRST_COPYRIGHT_YEAR := 2000, \
 482 ))
 483 
 484 TARGETS += $(jgss)
 485 
 486 ################################################################################
 487 
 488 $(eval $(call SetupJavadocGeneration, smartcardio, \
 489     MODULES := java.smartcardio, \
 490     PACKAGES := javax.smartcardio, \
 491     API_ROOT := jre, \
 492     DEST_DIR := security/smartcardio/spec, \
 493     TITLE := Java&trade; Smart Card I/O, \
 494     FIRST_COPYRIGHT_YEAR := 2005, \
 495 ))
 496 
 497 TARGETS += $(smartcardio)
 498 
 499 ################################################################################
 500 
 501 $(eval $(call SetupJavadocGeneration, httpserver, \
 502     MODULES := jdk.httpserver, \
 503     PACKAGES := \
 504         com.sun.net.httpserver \
 505         com.sun.net.httpserver.spi, \
 506     API_ROOT := jre, \
 507     DEST_DIR := net/httpserver/spec, \
 508     TITLE := Java&trade; HTTP Server, \
 509     FIRST_COPYRIGHT_YEAR := 2005, \
 510     DISABLED_DOCLINT := accessibility missing syntax, \
 511 ))
 512 
 513 TARGETS += $(httpserver)
 514 
 515 ################################################################################
 516 
 517 $(eval $(call SetupJavadocGeneration, httpclient, \
 518     MODULES := jdk.incubator.httpclient, \
 519     PACKAGES := \
 520         jdk.incubator.http, \
 521     API_ROOT := jre, \
 522     DEST_DIR := incubator/httpclient/spec, \
 523     TITLE := Java&trade; HTTP Client API (incubator module), \
 524     FIRST_COPYRIGHT_YEAR := 2015, \
 525     DISABLED_DOCLINT := accessibility missing syntax, \
 526 ))
 527 
 528 TARGETS += $(httpclient)
 529 
 530 ################################################################################
 531 
 532 $(eval $(call SetupJavadocGeneration, jsobject, \
 533     MODULES := jdk.jsobject, \
 534     PACKAGES := netscape.javascript, \
 535     API_ROOT := jre, \
 536     DEST_DIR := plugin/jsobject, \
 537     FIRST_COPYRIGHT_YEAR := 1993, \
 538     TITLE := Java&trade; JSObject Doc, \
 539 ))
 540 
 541 TARGETS += $(jsobject)
 542 
 543 ################################################################################
 544 
 545 $(eval $(call SetupJavadocGeneration, mgmt, \
 546     MODULES := jdk.management, \
 547     PACKAGES := com.sun.management, \
 548     API_ROOT := jre, \
 549     DEST_DIR := management/extension, \
 550     OVERVIEW := $(JDK_TOPDIR)/src/java.management/share/classes/mgmt-overview.html, \
 551     TITLE := Monitoring and Management Interface for the Java&trade; Platform, \
 552     FIRST_COPYRIGHT_YEAR := 2003, \
 553     DISABLED_DOCLINT := accessibility missing reference, \
 554 ))
 555 
 556 TARGETS += $(mgmt)
 557 
 558 ################################################################################
 559 
 560 $(eval $(call SetupJavadocGeneration, attach, \
 561     MODULES := jdk.attach, \
 562     PACKAGES := \
 563         com.sun.tools.attach \
 564         com.sun.tools.attach.spi, \
 565     API_ROOT := jdk, \
 566     DEST_DIR := attach/spec, \
 567     TITLE := Attach API, \
 568     FIRST_COPYRIGHT_YEAR := 2005, \
 569     DISABLED_DOCLINT := reference, \
 570 ))
 571 
 572 TARGETS += $(attach)
 573 
 574 ################################################################################
 575 
 576 $(eval $(call SetupJavadocGeneration, jconsole, \
 577     MODULES := jdk.jconsole, \
 578     PACKAGES := com.sun.tools.jconsole, \
 579     API_ROOT := jdk, \
 580     DEST_DIR := jconsole/spec, \
 581     TITLE := JConsole API, \
 582     FIRST_COPYRIGHT_YEAR := 2006, \
 583 ))
 584 
 585 TARGETS += $(jconsole)
 586 
 587 ################################################################################
 588 
 589 $(eval $(call SetupJavadocGeneration, jshellapi, \
 590     MODULES := jdk.jshell, \
 591     PACKAGES := \
 592         jdk.jshell \
 593         jdk.jshell.spi \
 594         jdk.jshell.execution \
 595         jdk.jshell.tool, \
 596     API_ROOT := jdk, \
 597     DEST_DIR := jshell, \
 598     TITLE := JShell API, \
 599     FIRST_COPYRIGHT_YEAR := 2015, \
 600     SPLIT_INDEX := TRUE, \
 601 ))
 602 
 603 TARGETS += $(jshellapi)
 604 
 605 ################################################################################
 606 
 607 $(eval $(call SetupJavadocGeneration, treeapi, \
 608     MODULES := jdk.compiler, \
 609     PACKAGES := \
 610         com.sun.source.doctree \
 611         com.sun.source.tree \
 612         com.sun.source.util, \
 613     API_ROOT := jdk, \
 614     DEST_DIR := javac/tree, \
 615     TITLE := Compiler Tree API, \
 616     FIRST_COPYRIGHT_YEAR := 2005, \
 617     SPLIT_INDEX := TRUE, \
 618 ))
 619 
 620 TARGETS += $(treeapi)
 621 
 622 ################################################################################
 623 
 624 $(eval $(call SetupJavadocGeneration, nashornapi, \
 625     MODULES := jdk.scripting.nashorn, \
 626     PACKAGES := \
 627         jdk.nashorn.api.scripting \
 628         jdk.nashorn.api.tree, \
 629     API_ROOT := jdk, \
 630     DEST_DIR := nashorn, \
 631     TITLE := Nashorn API, \
 632     FIRST_COPYRIGHT_YEAR := 2014, \
 633     SPLIT_INDEX := TRUE, \
 634 ))
 635 
 636 TARGETS += $(nashornapi)

 637 
 638 ################################################################################

 639 
 640 $(eval $(call SetupJavadocGeneration, dynalinkapi, \
 641     MODULES := jdk.dynalink, \
 642     PACKAGES := \
 643         jdk.dynalink \
 644         jdk.dynalink.beans \
 645         jdk.dynalink.linker \
 646         jdk.dynalink.linker.support \
 647         jdk.dynalink.support, \
 648     API_ROOT := jdk, \
 649     DEST_DIR := dynalink, \
 650     TITLE := Dynalink API, \
 651     FIRST_COPYRIGHT_YEAR := 2015, \
 652 ))




 653 
 654 TARGETS += $(dynalinkapi)







 655 
 656 ################################################################################

 657 
 658 $(eval $(call SetupJavadocGeneration, sctp, \
 659     MODULES := jdk.sctp, \
 660     PACKAGES := com.sun.nio.sctp, \
 661     API_ROOT := jre, \
 662     DEST_DIR := nio/sctp/spec, \
 663     TITLE := SCTP API, \
 664     FIRST_COPYRIGHT_YEAR := 2009, \
 665 ))
 666 
 667 TARGETS += $(sctp)
 668 
 669 ################################################################################
 670 
 671 $(eval $(call SetupJavadocGeneration, jaccess, \
 672     MODULES := jdk.accessibility, \
 673     PACKAGES := com.sun.java.accessibility.util, \
 674     API_ROOT := jre, \
 675     DEST_DIR := accessibility/jaccess/spec, \
 676     TITLE := JACCESS API, \
 677     FIRST_COPYRIGHT_YEAR := 2002, \
 678 ))
 679 
 680 TARGETS += $(jaccess)






 681 
 682 ################################################################################





 683 
 684 $(eval $(call SetupJavadocGeneration, jdknet, \
 685     MODULES := jdk.net, \
 686     PACKAGES := jdk.net, \
 687     API_ROOT := jre, \
 688     DEST_DIR := net/socketoptions/spec, \
 689     TITLE := jdk.net API, \
 690     FIRST_COPYRIGHT_YEAR := 2014, \
 691     DISABLED_DOCLINT := missing, \
 692 ))






































 693 
 694 TARGETS += $(jdknet)
 695 
 696 ################################################################################
 697 # Copy JDWP html file
 698 
 699 JDWP_HTML := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
 700 
 701 $(eval $(call SetupCopyFiles, COPY_JDWP_HTML, \
 702     FILES := $(JDWP_HTML), \
 703     DEST := $(JAVADOC_OUTPUTDIR)/platform/jpda/jdwp, \
 704 ))
 705 
 706 COPY_TARGETS += $(COPY_JDWP_HTML)
 707 
 708 ################################################################################
 709 # Copy JVMTI html file
 710 
 711 # Pick jvmti.html from any jvm variant, they are all the same.
 712 JVMTI_HTML := $(firstword \
 713     $(wildcard $(HOTSPOT_OUTPUTDIR)/variant-*/gensrc/jvmtifiles/jvmti.html))
 714 
 715 $(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \
 716     FILES := $(JVMTI_HTML), \
 717     DEST := $(JAVADOC_OUTPUTDIR)/platform/jvmti, \
 718 ))
 719 
 720 COPY_TARGETS += $(COPY_JVMTI_HTML)
 721 
 722 ################################################################################
 723 # Optional target which bundles all generated javadocs into a zip archive.
 724 
 725 JAVADOC_ARCHIVE_NAME := jdk-$(VERSION_STRING)-docs.zip
 726 JAVADOC_ARCHIVE_ASSEMBLY_DIR := $(SUPPORT_OUTPUTDIR)/docs/zip-docs
 727 JAVADOC_ARCHIVE_DIR := $(OUTPUT_ROOT)/bundles
 728 JAVADOC_ARCHIVE := $(JAVADOC_ARCHIVE_DIR)/$(JAVADOC_ARCHIVE_NAME)
 729 
 730 $(JAVADOC_ARCHIVE): $(TARGETS) $(COPY_TARGETS)
 731         $(call LogInfo, Compressing javadoc to single $(JAVADOC_ARCHIVE_NAME))
 732         $(MKDIR) -p $(JAVADOC_ARCHIVE_DIR)
 733         $(RM) -r $(JAVADOC_ARCHIVE_ASSEMBLY_DIR)
 734         $(MKDIR) -p $(JAVADOC_ARCHIVE_ASSEMBLY_DIR)
 735         all_roots=`$(FIND) $(JAVADOC_OUTPUTDIR) | $(GREP) index.html | grep -v old/doclet`; \
 736         pushd $(JAVADOC_ARCHIVE_ASSEMBLY_DIR); \
 737         for index_file in $${all_roots} ; do \
 738           target_dir=`dirname $${index_file}`; \
 739           name=`$(ECHO) $${target_dir} | $(SED) "s;/spec;;" | $(SED) "s;.*/;;"`; \
 740           $(LN) -s $${target_dir}  $${name}; \
 741         done; \
 742         $(ZIPEXE) -q -r $(JAVADOC_ARCHIVE) * ; \
 743         popd ;
 744 
 745 ZIP_TARGETS += $(JAVADOC_ARCHIVE)






 746 
 747 ################################################################################
 748 # generate .dot files for module graphs
 749 
 750 JAVADOC_MODULE_GRAPHS_DIR := $(SUPPORT_OUTPUTDIR)/docs/module-graphs
 751 JAVADOC_MODULE_GRAPHS := $(JAVADOC_MODULE_GRAPHS_DIR)/java.se.dot
 752 JAVADOC_MODULE_GRAPHS_PROPS := $(JDK_TOPDIR)/make/src/classes/build/tools/jigsaw/javadoc-graphs.properties
 753 
 754 $(JAVADOC_MODULE_GRAPHS): $(BUILD_JIGSAW_TOOLS) $(JAVADOC_MODULE_GRAPHS_PROPS)
 755         $(MKDIR) -p $(@D)
 756         $(TOOL_GENGRAPHS) --spec --output $(JAVADOC_MODULE_GRAPHS_DIR) \
 757             --dot-attributes $(JAVADOC_MODULE_GRAPHS_PROPS)
 758 
 759 MODULE_GRAPH_TARGETS += $(JAVADOC_MODULE_GRAPHS)
 760 
 761 ################################################################################
 762 
 763 # Hook to include the corresponding custom file, if present.
 764 $(eval $(call IncludeCustomExtension, , Javadoc.gmk))
 765 
 766 ################################################################################
 767 
 768 docs-module-graphs: $(MODULE_GRAPH_TARGETS) 
 769 
 770 docs-javadoc: $(TARGETS)


 771 
 772 docs-copy: $(COPY_TARGETS)
 773 
 774 docs-zip: $(ZIP_TARGETS)
 775 
 776 all: docs-module-graphs docs-javadoc docs-copy docs-zip
 777 
 778 .PHONY: default all docs-module-graphs docs-javadoc docs-copy docs-zip


   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 Modules.gmk
  30 include ZipArchive.gmk
  31 include $(JDK_TOPDIR)/make/Tools.gmk
  32 include $(JDK_TOPDIR)/make/ModuleTools.gmk
  33 
  34 # This is needed to properly setup DOCS_MODULES.
  35 $(eval $(call ReadImportMetaData))
  36 
  37 ################################################################################
  38 # Javadoc settings
  39 
  40 # List of all possible directories for javadoc to look for sources
  41 # Allow custom to overwrite.
  42 JAVADOC_SOURCE_DIRS = \
  43       $(SUPPORT_OUTPUTDIR)/gensrc/* \
  44       $(addsuffix /*, $(IMPORT_MODULES_SRC)) \
  45       $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS)/classes \
  46       $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_TYPE)/classes \
  47       $(JDK_TOPDIR)/src/*/share/classes \
  48       $(HOTSPOT_TOPDIR)/src/*/share/classes \
  49       $(LANGTOOLS_TOPDIR)/src/*/share/classes \
  50       $(NASHORN_TOPDIR)/src/*/share/classes \
  51       $(CORBA_TOPDIR)/src/*/share/classes \
  52       $(JAXP_TOPDIR)/src/*/share/classes \
  53       $(JAXWS_TOPDIR)/src/*/share/classes \
  54       $(SUPPORT_OUTPUTDIR)/rmic/* \
  55       $(JDK_TOPDIR)/src/*/share/doc/stub \
  56       #
  57 
  58 # All modules to have docs generated by docs-javadoc target
  59 JAVADOC_MODULES := $(sort $(DOCS_MODULES))
  60 
  61 # Should we use -Xdocrootparent? Allow custom to overwrite.
  62 DOCROOTPARENT_FLAG = TRUE
  63 
  64 # URLs
  65 JAVADOC_BASE_URL := http://docs.oracle.com/javase/$(VERSION_SPECIFICATION)/docs
  66 BUG_SUBMIT_URL := http://bugreport.java.com/bugreport/
  67 COPYRIGHT_URL := {@docroot}/../legal/cpyr.html






































































































  68 
  69 # In order to get a specific ordering it's necessary to specify the total
  70 # ordering of tags as the tags are otherwise ordered in order of definition.
  71 JAVADOC_TAGS := \
  72     -tag beaninfo:X \
  73     -tag revised:X \
  74     -tag since.unbundled:X \
  75     -tag spec:X \
  76     -tag specdefault:X \
  77     -tag Note:X \
  78     -tag ToDo:X \
  79     -tag 'apiNote:a:API Note:' \
  80     -tag 'implSpec:a:Implementation Requirements:' \
  81     -tag 'implNote:a:Implementation Note:' \
  82     -tag param \
  83     -tag return \
  84     -tag throws \
  85     -taglet build.tools.taglet.ModuleGraph \
  86     -tag since \
  87     -tag version \
  88     -tag serialData \
  89     -tag factory \
  90     -tag see \
  91     -tag 'jvms:a:See <cite>The Java&trade; Virtual Machine Specification</cite>:' \
  92     -tag 'jls:a:See <cite>The Java&trade; Language Specification</cite>:' \
  93     -taglet build.tools.taglet.Incubating \
  94     -tagletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
  95     #
  96 
  97 # Which doclint checks to ignore
  98 JAVADOC_DISABLED_DOCLINT := accessibility html missing syntax reference
  99 
 100 # The initial set of options for javadoc
 101 JAVADOC_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
 102     -serialwarn -encoding ISO-8859-1 -breakiterator -splitIndex --system none \
 103     --expand-requires transitive
 104 
 105 #
 106 # TODO: this should be set by the configure option.
 107 #
 108 ifndef ENABLE_MODULE_GRAPH
 109    ENABLE_MODULE_GRAPH=false
 110 endif
 111 
 112 # Should we add DRAFT stamps to the generated javadoc?
 113 ifeq ($(VERSION_IS_GA), true)
 114   IS_DRAFT := false
 115 else
 116   IS_DRAFT := true
 117 endif
























































































 118 
 119 ################################################################################
 120 # Text snippets

 121 
 122 FULL_COMPANY_NAME := Oracle and/or its affiliates
 123 COMPANY_ADDRESS := 500 Oracle Parkway<br>Redwood Shores, CA 94065 USA








 124 
 125 ifeq ($(IS_DRAFT), true)
 126   DRAFT_MARKER_STR := <br><strong>DRAFT $(VERSION_STRING)</strong>
 127   ifeq ($(VERSION_BUILD), 0)
 128     DRAFT_MARKER_TITLE := [ad-hoc build]




 129   else
 130     DRAFT_MARKER_TITLE := [build $(VERSION_BUILD)]











 131   endif
 132 endif














































































































































































































































































































 133 
 134 JAVADOC_WINDOW_TITLE := Java Platform SE $(VERSION_SPECIFICATION) \
 135     $(DRAFT_MARKER_TITLE)
 136 
 137 JAVADOC_DOC_TITLE := Java&trade; Platform, Standard Edition \
 138     $(VERSION_SPECIFICATION)<br>API Specification
 139 
 140 JAVADOC_HEADER_TITLE := $(subst $(SPACE),&nbsp;,$(strip \
 141     <strong>Java&trade; Platform<br>Standard Ed. \
 142     $(VERSION_SPECIFICATION)</strong>$(DRAFT_MARKER_STR)))
 143 
 144 JAVADOC_BOTTOM := \
 145     <span style="font-size:smaller"> \
 146     <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a><br> \
 147     For further API reference and developer documentation, see \
 148     <a href="$(JAVADOC_BASE_URL)/index.html" target="_blank">Java SE \
 149     Documentation</a>. That documentation contains more detailed, \
 150     developer-targeted descriptions, with conceptual overviews, definitions \
 151     of terms, workarounds, and working code examples.<br> \
 152     Java is a trademark or registered trademark of $(FULL_COMPANY_NAME) in \
 153     the US and other countries.<br> \
 154     <a href="$(COPYRIGHT_URL)">Copyright</a> \
 155     &copy; 1993, $(COPYRIGHT_YEAR), $(FULL_COMPANY_NAME). \
 156     $(COMPANY_ADDRESS). All rights reserved.$(DRAFT_MARKER_STR)</span>
 157 
 158 JAVADOC_TOP := \
 159       <div style="background-color: $(HASH)EEEEEE"><div style="padding: 6px; \
 160       margin-top: 2px; margin-bottom: 6px; margin-left: 6px; margin-right: \
 161       6px; text-align: justify; font-size: 80%; font-family: Helvetica, Arial, \
 162       sans-serif; font-weight: normal;">Please note that the specifications \
 163       and other information contained herein are not final and are subject to \
 164       change. The information is being made available to you solely for \
 165       purpose of evaluation.</div></div>
 166 
 167 ################################################################################
 168 # Setup call to javadoc based on above settings
 169 
 170 # Create a string like "-Xdoclint:all,-syntax,-html,..."
 171 JAVADOC_OPTIONS += -Xdoclint:all,$(call CommaList, $(addprefix -, \
 172     $(JAVADOC_DISABLED_DOCLINT)))









 173 
 174 ifneq ($($DOCROOTPARENT_FLAG), )
 175   JAVADOC_OPTIONS += -Xdocrootparent $(JAVADOC_BASE_URL)
 176 endif





 177 
 178 JAVADOC_OPTIONS += -doctitle '$(JAVADOC_DOC_TITLE)'
 179 JAVADOC_OPTIONS += -windowtitle '$(JAVADOC_WINDOW_TITLE)'
 180 JAVADOC_OPTIONS += -header '$(JAVADOC_HEADER_TITLE)'
 181 JAVADOC_OPTIONS += -bottom '$(JAVADOC_BOTTOM)'
 182 ifeq ($(IS_DRAFT), true)
 183   JAVADOC_OPTIONS += -top '$(JAVADOC_TOP)'
 184 endif
 185 
 186 # Do not store debug level options in VARDEPS.
 187 ifneq ($(LOG_LEVEL), trace)
 188   JAVADOC_LOG_OPTION += -quiet
 189 else
 190   JAVADOC_LOG_OPTION += -verbose
 191 endif
 192 
 193 JAVADOC_VARDEPS := $(JAVADOC_OPTIONS) $(JAVADOC_TAGS) $(JAVADOC_MODULES)
 194 JAVADOC_VARDEPS_FILE := $(call DependOnVariable, JAVADOC_VARDEPS, \
 195     $(SUPPORT_OUTPUTDIR)/docs/javadoc.vardeps)
 196 
 197 # Get a list of all files in all the source dirs for all included modules
 198 JAVADOC_SOURCE_DEPS := $(call CacheFind, $(wildcard \
 199     $(foreach module, $(JAVADOC_MODULES), $(call FindModuleSrcDirs, $(module)))))
 200 
 201 JAVADOC_TARGET_DIR := $(JAVADOC_OUTPUTDIR)/api
 202 JAVADOC_OVERVIEW := $(JDK_TOPDIR)/src/java.base/share/classes/overview-core.html
 203 
 204 # Javadoc creates a lot of files but use index.html as a marker
 205 $(JAVADOC_TARGET_DIR)/index.html: $(BUILD_TOOLS_JDK) $(JAVADOC_VARDEPS_FILE) \
 206     $(JAVADOC_SOURCE_DEPS) $(JAVADOC_OVERVIEW)
 207         $(call LogWarn, Generating Javadoc for $(words $(JAVADOC_MODULES)) modules)
 208         $(call LogInfo, Javadoc modules: $(JAVADOC_MODULES))
 209         $(call MakeDir, $(JAVADOC_TARGET_DIR))
 210         $(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/docs/javadoc, \
 211             $(JAVA) -Djava.awt.headless=true \
 212                 -DenableModuleGraph=$(ENABLE_MODULE_GRAPH) \
 213                 $(NEW_JAVADOC) -d $(JAVADOC_TARGET_DIR) \
 214                 $(JAVADOC_TAGS) $(JAVADOC_OPTIONS) $(JAVADOC_LOG_OPTION) \
 215                 -overview $(JAVADOC_OVERVIEW) \
 216                 --module-source-path $(call PathList, $(JAVADOC_SOURCE_DIRS)) \
 217                 --module $(call CommaList, $(JAVADOC_MODULES)))
 218 
 219 JAVADOC_TARGETS += $(JAVADOC_TARGET_DIR)/index.html
 220 
 221 ################################################################################
 222 # Generate reference javadoc for Java SE
 223 
 224 REFERENCE_TARGET_DIR := $(SUPPORT_OUTPUTDIR)/javase-api
 225 REFERENCE_OVERVIEW := $(JDK_TOPDIR)/src/java.base/share/classes/overview-core.html
 226 
 227 # Javadoc creates a lot of files but use index.html as a marker.
 228 $(REFERENCE_TARGET_DIR)/index.html: $(BUILD_TOOLS_JDK) $(JAVADOC_VARDEPS_FILE) \
 229     $(JAVADOC_SOURCE_DEPS) $(REFERENCE_OVERVIEW)
 230         $(call LogWarn, Generating reference Javadoc for Java SE)
 231         $(call MakeDir, $(REFERENCE_TARGET_DIR))
 232         $(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/docs/reference, \
 233             $(JAVA) -Djava.awt.headless=true \
 234                 -DenableModuleGraph=$(ENABLE_MODULE_GRAPH) \
 235                 $(NEW_JAVADOC) -d $(REFERENCE_TARGET_DIR) \
 236                 $(JAVADOC_TAGS) $(JAVADOC_OPTIONS) $(JAVADOC_LOG_OPTION) \
 237                 -overview $(REFERENCE_OVERVIEW) \
 238                 --module-source-path $(call PathList, $(JAVADOC_SOURCE_DIRS)) \
 239                 --module $(call CommaList, java.base java.se.ee))
 240 
 241 REFERENCE_TARGETS += $(REFERENCE_TARGET_DIR)/index.html
 242 
 243 ################################################################################
 244 # Copy targets
 245 
 246 JDWP_HTML := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
 247 
 248 $(eval $(call SetupCopyFiles, COPY_JDWP_HTML, \
 249     FILES := $(JDWP_HTML), \
 250     DEST := $(JAVADOC_OUTPUTDIR)/platform/jpda/jdwp, \
 251 ))
 252 
 253 COPY_TARGETS += $(COPY_JDWP_HTML)
 254 



 255 # Pick jvmti.html from any jvm variant, they are all the same.
 256 JVMTI_HTML := $(firstword \
 257     $(wildcard $(HOTSPOT_OUTPUTDIR)/variant-*/gensrc/jvmtifiles/jvmti.html))
 258 
 259 $(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \
 260     FILES := $(JVMTI_HTML), \
 261     DEST := $(JAVADOC_OUTPUTDIR)/platform/jvmti, \
 262 ))
 263 
 264 COPY_TARGETS += $(COPY_JVMTI_HTML)
 265 
 266 ################################################################################
 267 # Optional target which bundles all generated javadocs into a zip archive.
 268 
 269 JAVADOC_ZIP_NAME := jdk-$(VERSION_STRING)-docs.zip
 270 JAVADOC_ZIP_FILE := $(OUTPUT_ROOT)/bundles/$(JAVADOC_ZIP_NAME)

















 271 
 272 $(eval $(call SetupZipArchive, BUILD_JAVADOC_ZIP, \
 273   SRC := $(JAVADOC_OUTPUTDIR), \
 274   ZIP := $(JAVADOC_ZIP_FILE), \
 275   EXTRA_DEPS := $(JAVADOC_TARGETS) $(COPY_TARGETS), \
 276 ))
 277 
 278 ZIP_TARGETS += $(BUILD_JAVADOC_ZIP)
 279 
 280 ################################################################################
 281 # generate .dot files for module graphs
 282 
 283 JAVADOC_MODULE_GRAPHS_DIR := $(SUPPORT_OUTPUTDIR)/docs/module-graphs
 284 JAVADOC_MODULE_GRAPHS := $(JAVADOC_MODULE_GRAPHS_DIR)/java.se.dot
 285 JAVADOC_MODULE_GRAPHS_PROPS := $(JDK_TOPDIR)/make/src/classes/build/tools/jigsaw/javadoc-graphs.properties
 286 
 287 $(JAVADOC_MODULE_GRAPHS): $(BUILD_JIGSAW_TOOLS) $(JAVADOC_MODULE_GRAPHS_PROPS)
 288         $(MKDIR) -p $(@D)
 289         $(TOOL_GENGRAPHS) --spec --output $(JAVADOC_MODULE_GRAPHS_DIR) \
 290             --dot-attributes $(JAVADOC_MODULE_GRAPHS_PROPS)
 291 
 292 MODULE_GRAPH_TARGETS += $(JAVADOC_MODULE_GRAPHS)
 293 
 294 ################################################################################
 295 
 296 # Hook to include the corresponding custom file, if present.
 297 $(eval $(call IncludeCustomExtension, , Javadoc.gmk))
 298 
 299 ################################################################################
 300 
 301 docs-module-graphs: $(MODULE_GRAPH_TARGETS)
 302 
 303 docs-javadoc: $(JAVADOC_TARGETS)
 304 
 305 docs-reference: $(REFERENCE_TARGETS)
 306 
 307 docs-copy: $(COPY_TARGETS)
 308 
 309 docs-zip: $(ZIP_TARGETS)
 310 
 311 all: docs-module-graphs docs-javadoc docs-reference docs-copy docs-zip
 312 
 313 .PHONY: default all docs-module-graphs docs-javadoc docs-reference docs-copy docs-zip
< prev index next >