annotate make/Docs.gmk @ 47459:a6e591e12f12

8189919: Update link to license in Docs.gmk Reviewed-by: mr
author iris
date Thu, 26 Oct 2017 10:46:29 -0700
parents 28d6070f5f2f
children ffa68af7da87 4f96cf952e71
rev   line source
ihse@43047 1 # Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
ohair@13697 2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ohair@13697 3 #
ohair@13697 4 # This code is free software; you can redistribute it and/or modify it
ohair@13697 5 # under the terms of the GNU General Public License version 2 only, as
ohair@13697 6 # published by the Free Software Foundation. Oracle designates this
ohair@13697 7 # particular file as subject to the "Classpath" exception as provided
ohair@13697 8 # by Oracle in the LICENSE file that accompanied this code.
ohair@13697 9 #
ohair@13697 10 # This code is distributed in the hope that it will be useful, but WITHOUT
ohair@13697 11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ohair@13697 12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ohair@13697 13 # version 2 for more details (a copy is included in the LICENSE file that
ohair@13697 14 # accompanied this code).
ohair@13697 15 #
ohair@13697 16 # You should have received a copy of the GNU General Public License version
ohair@13697 17 # 2 along with this work; if not, write to the Free Software Foundation,
ohair@13697 18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ohair@13697 19 #
ohair@13697 20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@13697 21 # or visit www.oracle.com if you need additional information or have any
ohair@13697 22 # questions.
ohair@13697 23 #
ohair@13697 24
ihse@41652 25 default: all
ihse@41652 26
ohair@13697 27 include $(SPEC)
ohair@13697 28 include MakeBase.gmk
ihse@44725 29 include Modules.gmk
ihse@44983 30 include ProcessMarkdown.gmk
ihse@44725 31 include ZipArchive.gmk
erikj@47217 32 include $(TOPDIR)/make/ToolsJdk.gmk
erikj@47217 33 include $(TOPDIR)/make/ModuleTools.gmk
ohair@13697 34
ihse@44725 35 # This is needed to properly setup DOCS_MODULES.
ihse@44725 36 $(eval $(call ReadImportMetaData))
ihse@44725 37
ihse@41652 38 ################################################################################
ihse@44827 39 # Hook to include the corresponding custom file, if present.
ihse@47314 40 $(eval $(call IncludeCustomExtension, Docs.gmk))
ihse@44827 41
ihse@44827 42 ################################################################################
ihse@45323 43 # This file generates all documentation for OpenJDK.
ihse@45323 44 #
ihse@45323 45 # We will generate API documentation for two different selections of the source
ihse@45323 46 # code: "Java SE", which contains just the modules covered by the top-level
ihse@45323 47 # module java.se.ee, and "JDK", which covers all of Java SE and also all
ihse@45323 48 # other available modules that should be documented, including imported modules,
ihse@45323 49 # if any.
ihse@45323 50 #
ihse@45323 51 # We will also generate separate, free-standing specifications from either
ihse@45323 52 # markdown or existing html files.
ihse@45323 53 #
ihse@45323 54
ihse@45323 55 ################################################################################
ihse@44725 56 # Javadoc settings
ohair@13697 57
ihse@44725 58 # On top of the sources that was used to compile the JDK, we need some
ihse@44725 59 # extra java.rmi sources that are used just for javadoc.
ihse@44726 60 MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) \
erikj@47217 61 $(SUPPORT_OUTPUTDIR)/rmic/* $(TOPDIR)/src/*/share/doc/stub)
alanb@36506 62
ihse@41652 63 # URLs
ihse@45108 64 JAVADOC_BASE_URL := http://www.oracle.com/pls/topic/lookup?ctx=javase9&id=homepage
ihse@41652 65 BUG_SUBMIT_URL := http://bugreport.java.com/bugreport/
ihse@45613 66 COPYRIGHT_URL := {@docroot}/../legal/copyright.html
iris@47459 67 LICENSE_URL := http://www.oracle.com/technetwork/java/javase/terms/license/java10speclicense.html
ihse@44990 68 REDISTRIBUTION_URL := http://www.oracle.com/technetwork/java/redist-137594.html
ihse@44990 69
ihse@42135 70 # In order to get a specific ordering it's necessary to specify the total
ihse@42135 71 # ordering of tags as the tags are otherwise ordered in order of definition.
ihse@44725 72 JAVADOC_TAGS := \
ihse@42135 73 -tag beaninfo:X \
ihse@42135 74 -tag revised:X \
ihse@42135 75 -tag since.unbundled:X \
ihse@42135 76 -tag spec:X \
ihse@42135 77 -tag specdefault:X \
ihse@42135 78 -tag Note:X \
ihse@42135 79 -tag ToDo:X \
ihse@42135 80 -tag 'apiNote:a:API Note:' \
ihse@42135 81 -tag 'implSpec:a:Implementation Requirements:' \
ihse@42135 82 -tag 'implNote:a:Implementation Note:' \
ihse@42135 83 -tag param \
ihse@42135 84 -tag return \
ihse@42135 85 -tag throws \
mchung@44397 86 -taglet build.tools.taglet.ModuleGraph \
ihse@42135 87 -tag since \
ihse@42135 88 -tag version \
ihse@42135 89 -tag serialData \
ihse@42135 90 -tag factory \
ihse@42135 91 -tag see \
ihse@42135 92 -tag 'jvms:a:See <cite>The Java&trade; Virtual Machine Specification</cite>:' \
ihse@42135 93 -tag 'jls:a:See <cite>The Java&trade; Language Specification</cite>:' \
ksrini@44826 94 -taglet build.tools.taglet.ExtLink \
chegar@43285 95 -taglet build.tools.taglet.Incubating \
chegar@43285 96 -tagletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@44827 97 $(CUSTOM_JAVADOC_TAGS) \
ihse@42135 98 #
ihse@42135 99
ihse@47432 100 # The reference tags must stay stable to allow for comparisons across the
ihse@47432 101 # development cycle. If JAVADOC_TAGS needs to change, make sure that
ihse@47432 102 # REFERENCE_TAGS remains unchanged, by copying and hardcoding, if necessary.
ihse@47432 103 REFERENCE_TAGS := $(JAVADOC_TAGS)
ihse@47432 104
ihse@44725 105 # Which doclint checks to ignore
ihse@44725 106 JAVADOC_DISABLED_DOCLINT := accessibility html missing syntax reference
ihse@44725 107
ihse@44725 108 # The initial set of options for javadoc
jjg@46087 109 JAVADOC_OPTIONS := -use -keywords -notimestamp \
jjg@46087 110 -serialwarn -encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
ksrini@47429 111 -splitIndex --system none -html5 -javafx --expand-requires transitive \
ksrini@47429 112 --override-methods=summary
ihse@41652 113
ihse@47432 114 # The reference options must stay stable to allow for comparisons across the
ihse@47432 115 # development cycle.
ihse@47432 116 REFERENCE_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
ihse@47432 117 -serialwarn -encoding ISO-8859-1 -breakiterator -splitIndex --system none \
ihse@47432 118 -html5 -javafx --expand-requires transitive
ihse@47432 119
ihse@44725 120 # Should we add DRAFT stamps to the generated javadoc?
ihse@44725 121 ifeq ($(VERSION_IS_GA), true)
ihse@44725 122 IS_DRAFT := false
ihse@44725 123 else
ihse@44725 124 IS_DRAFT := true
ihse@44725 125 endif
ohair@13697 126
ihse@41652 127 ################################################################################
ihse@44725 128 # General text snippets
alanb@36506 129
ihse@44725 130 FULL_COMPANY_NAME := Oracle and/or its affiliates
mr@45616 131 COMPANY_ADDRESS := 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@13697 132
mr@45616 133 JAVA_PLATFORM := Java Platform
ihse@45323 134
ihse@44725 135 ifeq ($(IS_DRAFT), true)
ihse@44725 136 DRAFT_MARKER_STR := <br><strong>DRAFT $(VERSION_STRING)</strong>
ihse@44725 137 ifeq ($(VERSION_BUILD), 0)
ihse@44725 138 DRAFT_MARKER_TITLE := [ad-hoc build]
ihse@44725 139 else
ihse@44725 140 DRAFT_MARKER_TITLE := [build $(VERSION_BUILD)]
ihse@44725 141 endif
mr@45616 142 DRAFT_TEXT := This specification is not final and is subject to change. \
mr@45616 143 Use is subject to <a href="$(LICENSE_URL)">license terms</a>.
ihse@47432 144
ihse@47432 145 # Workaround stylesheet bug
ihse@47432 146 HEADER_STYLE := style="margin-top: 9px;"
ihse@47432 147 else
ihse@47432 148 HEADER_STYLE := style="margin-top: 14px;"
ihse@44725 149 endif
ihse@44725 150
ihse@44725 151 JAVADOC_BOTTOM := \
mr@45616 152 <a href="$(BUG_SUBMIT_URL)">Report a bug or suggest an enhancement</a><br> \
mr@45616 153 For further API reference and developer documentation see the \
ihse@45108 154 <a href="$(JAVADOC_BASE_URL)" target="_blank">Java SE \
mr@45616 155 Documentation</a>, which contains more detailed, \
mr@45616 156 developer-targeted descriptions with conceptual overviews, definitions \
ihse@44725 157 of terms, workarounds, and working code examples.<br> \
ihse@44725 158 Java is a trademark or registered trademark of $(FULL_COMPANY_NAME) in \
ihse@44725 159 the US and other countries.<br> \
ihse@44725 160 <a href="$(COPYRIGHT_URL)">Copyright</a> \
mr@45616 161 &copy; 1993, $(COPYRIGHT_YEAR), $(FULL_COMPANY_NAME), \
mr@45616 162 $(COMPANY_ADDRESS).<br>All rights reserved. \
mr@45616 163 Use is subject to <a href="$(LICENSE_URL)">license terms</a> and the \
ihse@44990 164 <a href="$(REDISTRIBUTION_URL)">documentation redistribution policy</a>. \
mr@45616 165 $(DRAFT_MARKER_STR) <!-- Version $(VERSION_STRING) -->
mr@45616 166
ihse@44725 167 JAVADOC_TOP := \
mr@45616 168 <div style="padding: 6px; text-align: center; font-size: 80%; \
mr@45616 169 font-family: DejaVu Sans, Arial, Helvetica, sans-serif; \
mr@45616 170 font-weight: normal;">$(DRAFT_TEXT)</div>
ksrini@35367 171
ihse@47432 172 JDK_INDEX_CONTENT := \
ihse@47432 173 <!DOCTYPE html> \
ihse@47432 174 <html lang="en"> \
ihse@47432 175 <head> \
ihse@47432 176 <meta http-equiv="refresh" content="0;url=api/index.html"> \
ihse@47432 177 </head> \
ihse@47432 178 </html>
ihse@47432 179
ihse@41652 180 ################################################################################
ihse@44726 181 # JDK javadoc titles/text snippets
ksrini@35367 182
mr@45616 183 JDK_SHORT_NAME := Java SE $(VERSION_SPECIFICATION) &amp; JDK $(VERSION_SPECIFICATION)
mr@45616 184 JDK_LONG_NAME := Java<sup>&reg;</sup> Platform, Standard Edition \
mr@45775 185 &amp;&nbsp;Java&nbsp;Development&nbsp;Kit
ihse@44726 186
ihse@44726 187 ################################################################################
ihse@44726 188 # Java SE javadoc titles/text snippets
ihse@44726 189
mr@45616 190 JAVASE_SHORT_NAME := Java SE $(VERSION_SPECIFICATION)
mr@45616 191 JAVASE_LONG_NAME := Java<sup>&reg;</sup> Platform, Standard Edition
ksrini@35367 192
ihse@41652 193 ################################################################################
ihse@44726 194 # Functions
alanb@36506 195
ihse@44726 196 # Helper function for creating a png file from a dot file generated by the
ihse@44726 197 # GenGraphs tool.
ihse@44726 198 # param 1: SetupJavadocGeneration namespace ($1)
ihse@44726 199 # param 2: module name
ihse@44726 200 #
ihse@44726 201 define setup_gengraph_dot_to_png
ihse@44726 202 $1_$2_DOT_SRC := $$($1_GENGRAPHS_DIR)/$2.dot
ihse@44726 203 $1_$2_PNG_TARGET := $$($1_TARGET_DIR)/$2-graph.png
ksrini@35367 204
ihse@44726 205 # For each module needing a graph, create a png file from the dot file
ihse@44726 206 # generated by the GenGraphs tool and store it in the target dir.
ihse@44726 207 $$($1_$2_PNG_TARGET): $$($1_GENGRAPHS_MARKER)
ihse@44726 208 $$(call MakeDir, $$(@D))
ihse@44726 209 $$(call ExecuteWithLog, $$($1_$2_DOT_SRC), \
ihse@44726 210 $$(DOT) -Tpng -o $$($1_$2_PNG_TARGET) $$($1_$2_DOT_SRC))
ihse@44725 211
ihse@44726 212 $1_MODULEGRAPH_TARGETS += $$($1_$2_PNG_TARGET)
ihse@44726 213 endef
ksrini@35367 214
ihse@45323 215 # Helper function to create the overview.html file to use with the -overview
ihse@45323 216 # javadoc option.
ihse@45323 217 # Returns the filename as $1_OVERVIEW.
ihse@45323 218 #
ihse@45323 219 # param 1: SetupJavadocGeneration namespace ($1)
ihse@45323 220 define create_overview_file
ihse@45323 221 $1_OVERVIEW_TEXT := \
ihse@45323 222 <!DOCTYPE html> \
ihse@45323 223 <html><head></head><body> \
ihse@45323 224 #
ihse@45323 225 ifneq ($$($1_GROUPS),)
ihse@45323 226 $1_OVERVIEW_TEXT += \
mr@45616 227 <p>This document is divided into \
mr@45616 228 $$(subst 2,two,$$(subst 3,three,$$(words $$($1_GROUPS)))) sections:</p> \
mr@45616 229 <blockquote><dl> \
mr@45616 230 #
ihse@45323 231 $1_OVERVIEW_TEXT += $$(foreach g, $$($1_GROUPS), \
mr@45616 232 <dt style="margin-top: 8px;"><a href="\#$$g">$$($$g_GROUP_NAME)</a></dt> \
mr@45775 233 <dd style="margin-top: 8px;">$$($$g_GROUP_DESCRIPTION)</dd> \
ihse@45323 234 )
ihse@45323 235 $1_OVERVIEW_TEXT += \
mr@45775 236 </dl></blockquote> \
ihse@45323 237 #
ihse@45323 238 endif
ihse@45323 239 $1_OVERVIEW_TEXT += \
ihse@45323 240 </body></html> \
ihse@45323 241 #
ihse@45323 242
ihse@45323 243 $1_OVERVIEW := $$(SUPPORT_OUTPUTDIR)/docs/$1-overview.html
ihse@45323 244
ihse@45323 245 $1_OVERVIEW_VARDEPS_FILE := $$(call DependOnVariable, $1_OVERVIEW_TEXT, \
ihse@45323 246 $$($1_OVERVIEW).vardeps)
ihse@45323 247
ihse@45323 248 $$($1_OVERVIEW): $$($1_OVERVIEW_VARDEPS_FILE)
ihse@45323 249 $$(call LogInfo, Creating overview.html for $1)
ihse@45323 250 $$(call MakeDir, $$(@D))
ihse@45323 251 $$(PRINTF) > $$@ '$$($1_OVERVIEW_TEXT)'
ihse@45323 252 endef
ihse@45323 253
ihse@41652 254 ################################################################################
ihse@45323 255 # Setup make rules to create an API documentation collection, using javadoc and
ihse@45323 256 # other tools if needed.
ihse@44726 257 #
ihse@44726 258 # Parameter 1 is the name of the rule. This name is used as variable prefix.
ihse@44726 259 # Targets generated are returned as $1_JAVADOC_TARGETS and
ihse@44726 260 # $1_MODULEGRAPH_TARGETS. Note that the index.html file will work as a "touch
ihse@44726 261 # file" for all the magnitude of files that are generated by javadoc.
ihse@44726 262 #
ihse@44726 263 # Remaining parameters are named arguments. These include:
ihse@44726 264 # MODULES - Modules to generate javadoc for
ihse@45323 265 # GROUPS - Name of the groups to divide the modules into, if any
ihse@45323 266 # SHORT_NAME - The short name of this documentation collection
ihse@45323 267 # LONG_NAME - The long name of this documentation collection
ihse@44726 268 # TARGET_DIR - Where to store the output
ihse@44726 269 #
ihse@44726 270 SetupApiDocsGeneration = $(NamedParamsMacroTemplate)
ihse@44726 271 define SetupApiDocsGenerationBody
ksrini@35367 272
ihse@45233 273 # Figure out all modules, both specified and transitive indirect exports, that
ihse@45233 274 # will be processed by javadoc.
ihse@45233 275 $1_INDIRECT_EXPORTS := $$(call FindTransitiveIndirectDepsForModules, $$($1_MODULES))
ihse@45233 276 $1_ALL_MODULES := $$(sort $$($1_MODULES) $$($1_INDIRECT_EXPORTS))
ksrini@35367 277
ihse@44726 278 ifeq ($$(ENABLE_FULL_DOCS), true)
ihse@44726 279 # Tell the ModuleGraph taglet to generate html links to soon-to-be-created
ihse@44726 280 # png files with module graphs.
ihse@44726 281 $1_JAVA_ARGS += -DenableModuleGraph=true
ihse@44726 282 endif
ihse@44725 283
ihse@47432 284 # Start with basic options and tags
ihse@47432 285 ifeq ($$($1_OPTIONS), )
ihse@47432 286 $1_OPTIONS := $$(JAVADOC_OPTIONS)
ihse@47432 287 endif
ihse@47432 288 ifeq ($$($1_TAGS), )
ihse@47432 289 $1_TAGS := $$(JAVADOC_TAGS)
ihse@47432 290 endif
ihse@47432 291 $1_OPTIONS += $$($1_TAGS)
ihse@44725 292
ihse@44726 293 $1_OPTIONS += --module-source-path $$(MODULES_SOURCE_PATH)
ihse@44726 294 $1_OPTIONS += --module $$(call CommaList, $$($1_MODULES))
ihse@44725 295
ihse@44726 296 # Create a string like "-Xdoclint:all,-syntax,-html,..."
ihse@44726 297 $1_OPTIONS += -Xdoclint:all,$$(call CommaList, $$(addprefix -, \
ihse@44726 298 $$(JAVADOC_DISABLED_DOCLINT)))
ihse@44726 299
ihse@47432 300 $1_DOC_TITLE := $$($1_LONG_NAME)<br>Version $$(VERSION_SPECIFICATION) API \
ihse@47432 301 Specification
ihse@47432 302 $1_WINDOW_TITLE := $$(subst &amp;,&,$$($1_SHORT_NAME)) $$(DRAFT_MARKER_TITLE)
ihse@47432 303 $1_HEADER_TITLE := <div $$(HEADER_STYLE)><strong>$$($1_SHORT_NAME)</strong> \
mr@45616 304 $$(DRAFT_MARKER_STR)</div>
ihse@45323 305
ihse@44726 306 $1_OPTIONS += -doctitle '$$($1_DOC_TITLE)'
ihse@44726 307 $1_OPTIONS += -windowtitle '$$($1_WINDOW_TITLE)'
ihse@44726 308 $1_OPTIONS += -header '$$($1_HEADER_TITLE)'
ihse@45323 309 $1_OPTIONS += -bottom '$$(JAVADOC_BOTTOM)'
ihse@44726 310 ifeq ($$(IS_DRAFT), true)
ihse@45323 311 $1_OPTIONS += -top '$$(JAVADOC_TOP)'
ihse@44726 312 endif
ihse@44726 313
ihse@44726 314 # Do not store debug level options in VARDEPS.
ihse@44726 315 ifneq ($$(LOG_LEVEL), trace)
ihse@44726 316 $1_LOG_OPTION += -quiet
ihse@44726 317 else
ihse@44726 318 $1_LOG_OPTION += -verbose
ihse@44726 319 endif
ihse@44726 320
ihse@45323 321 # Generate the overview.html file. This will return the filename in
ihse@45323 322 # $1_OVERVIEW.
ihse@45323 323 $$(eval $$(call create_overview_file,$1))
ihse@45323 324 $1_OPTIONS += -overview $$($1_OVERVIEW)
ihse@45323 325
ihse@45323 326 $$(foreach g, $$($1_GROUPS), \
ihse@45323 327 $$(eval $1_OPTIONS += -group "$$($$g_GROUP_NAME)" "$$($$g_GROUP_MODULES)") \
ihse@45323 328 )
ihse@45323 329
ihse@47432 330 ifeq ($$($1_JAVADOC_CMD), )
ihse@47432 331 $1_JAVADOC_CMD := $$(JAVA) -Djava.awt.headless=true $$($1_JAVA_ARGS) \
ihse@47432 332 $$(NEW_JAVADOC)
ihse@47432 333 endif
ihse@47432 334
ihse@44726 335 $1_VARDEPS := $$($1_JAVA_ARGS) $$($1_OPTIONS) $$(MODULES_SOURCE_PATH) \
ihse@47432 336 $$($1_ALL_MODULES) $$($1_JAVADOC_CMD)
ihse@44726 337 $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
ihse@44726 338 $$(SUPPORT_OUTPUTDIR)/docs/$1.vardeps)
ihse@44726 339
ihse@44726 340 # Get a list of all files in all the source dirs for all included modules
ihse@44726 341 $1_SOURCE_DEPS := $$(call CacheFind, $$(wildcard $$(foreach module, \
ihse@44726 342 $$($1_ALL_MODULES), $$(call FindModuleSrcDirs, $$(module)))))
ihse@44726 343
ihse@44726 344 # Javadoc creates a lot of files but use index.html as a marker
ihse@44726 345 $$($1_TARGET_DIR)/index.html: $$(BUILD_TOOLS_JDK) $$($1_VARDEPS_FILE) \
ihse@44726 346 $$($1_SOURCE_DEPS) $$($1_OVERVIEW)
ihse@45323 347 $$(call LogWarn, Generating $1 javadoc for \
ihse@44726 348 $$(words $$($1_ALL_MODULES)) modules)
ihse@44726 349 $$(call LogInfo, Javadoc modules: $$($1_ALL_MODULES))
ihse@44726 350 $$(call MakeDir, $$($1_TARGET_DIR))
ihse@44726 351 $$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/docs/$1, \
ihse@47432 352 $$($1_JAVADOC_CMD) -d $$($1_TARGET_DIR) \
ihse@47432 353 $$($1_OPTIONS) $$($1_LOG_OPTION))
ihse@44726 354
ihse@44726 355 $1_JAVADOC_TARGETS := $$($1_TARGET_DIR)/index.html
ihse@44726 356
ihse@44726 357 ifeq ($$(ENABLE_FULL_DOCS), true)
ihse@44726 358 # We have asked ModuleGraph to generate links to png files. Now we must
ihse@44726 359 # produce the png files.
ihse@44726 360
ihse@44726 361 # Locate which modules has the @moduleGraph tag in their module-info.java
ihse@44726 362 $1_MODULES_NEEDING_GRAPH := $$(strip $$(foreach m, $$($1_ALL_MODULES), \
ihse@44726 363 $$(if $$(shell $$(GREP) -e @moduleGraph \
ihse@44726 364 $$(wildcard $$(addsuffix /module-info.java, \
ihse@44726 365 $$(call FindModuleSrcDirs, $$m)))), \
ihse@44726 366 $$m) \
ihse@44726 367 ))
ihse@44726 368
ihse@44726 369 # First we run the GenGraph tool. It will query the module structure of the
ihse@44726 370 # running JVM and output .dot files for all existing modules.
ihse@44726 371 GENGRAPHS_PROPS := \
erikj@47217 372 $$(TOPDIR)/make/jdk/src/classes/build/tools/jigsaw/javadoc-graphs.properties
ihse@44726 373
ihse@44726 374 $1_GENGRAPHS_DIR := $$(SUPPORT_OUTPUTDIR)/docs/$1-gengraphs
ihse@44726 375 $1_GENGRAPHS_MARKER := $$($1_GENGRAPHS_DIR)/_gengraphs_run.marker
ihse@44726 376
ihse@44726 377 $$($1_GENGRAPHS_MARKER): $$(BUILD_JIGSAW_TOOLS) $$(GENGRAPHS_PROPS)
ihse@45323 378 $$(call LogInfo, Running gengraphs for $1 documentation)
ihse@44726 379 $$(call MakeDir, $$($1_GENGRAPHS_DIR))
ihse@44726 380 $$(call ExecuteWithLog, $$($1_GENGRAPHS_DIR)/gengraphs, \
ihse@44726 381 $$(TOOL_GENGRAPHS) --spec --output $$($1_GENGRAPHS_DIR) \
ihse@44726 382 --dot-attributes $$(GENGRAPHS_PROPS) && \
ihse@44726 383 $$(TOUCH) $$($1_GENGRAPHS_MARKER))
ihse@44726 384
ihse@44726 385 # For each module needing a graph, create a png file from the dot file
ihse@44726 386 # generated by the GenGraphs tool and store it in the target dir.
ihse@44726 387 # They will depend on $1_GENGRAPHS_MARKER, and will be added to $1.
ihse@44726 388 $$(foreach m, $$($1_MODULES_NEEDING_GRAPH), \
ihse@44726 389 $$(eval $$(call setup_gengraph_dot_to_png,$1,$$m)) \
ihse@44726 390 )
ihse@44726 391 endif
ihse@44726 392 endef
ihse@44726 393
ihse@44726 394 ################################################################################
ihse@44726 395 # Setup generation of the JDK API documentation (javadoc + modulegraph)
ihse@44726 396
ihse@45323 397 # Define the groups of the JDK API documentation
ihse@45323 398 JavaSE_GROUP_NAME := Java SE
ihse@45323 399 JavaSE_GROUP_MODULES := $(call ColonList, $(sort java.se.ee \
ihse@45323 400 $(call FindTransitiveIndirectDepsForModules, java.se.ee)))
ihse@45323 401 JavaSE_GROUP_DESCRIPTION := \
mr@45616 402 The Java Platform, Standard Edition (Java SE) APIs define the core Java \
mr@45616 403 platform for general-purpose computing. These APIs are in modules whose \
mr@45616 404 names start with {@code java}. \
ihse@45323 405 #
ihse@45323 406 JDK_GROUPS += JavaSE
ihse@45323 407
ihse@45323 408 JDK_GROUP_NAME := JDK
ihse@45323 409 JDK_GROUP_MODULES := jdk.*
ihse@45323 410 JDK_GROUP_DESCRIPTION := \
mr@45616 411 The Java Development Kit (JDK) APIs are specific to the JDK and will not \
mr@45616 412 necessarily be available in all implementations of the Java SE Platform. \
mr@45616 413 These APIs are in modules whose names start with {@code jdk}. \
ihse@45323 414 #
ihse@45323 415 JDK_GROUPS += JDK
ihse@45323 416
ihse@45323 417 # If we are importing JavaFX, we need a JavaFX group. In an ideal world, this
ihse@45323 418 # would have been abstracted away to a more proper generic handling of imported
ihse@45323 419 # modules.
ihse@45323 420 ifneq ($(findstring javafx., $(IMPORTED_MODULES)), )
ihse@45323 421 JavaFX_GROUP_NAME := JavaFX
ihse@45323 422 JavaFX_GROUP_MODULES := javafx.*
ihse@45323 423 JavaFX_GROUP_DESCRIPTION := \
mr@45616 424 The JavaFX APIs define a set of user-interface controls, graphics, \
ihse@45323 425 media, and web packages for developing rich client applications. These \
mr@45616 426 APIs are in modules whose names start with {@code javafx}. \
ihse@45323 427 #
ihse@45323 428 JDK_GROUPS += JavaFX
ihse@45323 429 endif
ihse@45323 430
ihse@44726 431 # All modules to have docs generated by docs-jdk-api target
ihse@45323 432 JDK_MODULES := $(sort $(DOCS_MODULES))
ihse@44726 433
ihse@44726 434 $(eval $(call SetupApiDocsGeneration, JDK_API, \
ihse@45323 435 MODULES := $(JDK_MODULES), \
ihse@45323 436 GROUPS := $(JDK_GROUPS), \
ihse@45323 437 SHORT_NAME := $(JDK_SHORT_NAME), \
ihse@45323 438 LONG_NAME := $(JDK_LONG_NAME), \
ihse@45103 439 TARGET_DIR := $(DOCS_OUTPUTDIR)/api, \
ihse@44726 440 ))
ihse@44726 441
ihse@44726 442 # Targets generated are returned in JDK_API_JAVADOC_TARGETS and
ihse@44726 443 # JDK_API_MODULEGRAPH_TARGETS.
ihse@44726 444
ihse@44726 445 ################################################################################
ihse@44726 446 # Setup generation of the Java SE API documentation (javadoc + modulegraph)
ihse@44726 447
mr@45616 448 # The Java SE module scope is just java.se.ee and its transitive indirect
ihse@45233 449 # exports.
ihse@45323 450 JAVASE_MODULES := java.se.ee
ihse@44726 451
ihse@44726 452 $(eval $(call SetupApiDocsGeneration, JAVASE_API, \
ihse@45323 453 MODULES := $(JAVASE_MODULES), \
ihse@45323 454 SHORT_NAME := $(JAVASE_SHORT_NAME), \
ihse@45323 455 LONG_NAME := $(JAVASE_LONG_NAME), \
ihse@44726 456 TARGET_DIR := $(IMAGES_OUTPUTDIR)/javase-docs/api, \
ihse@44726 457 ))
ihse@44726 458
ihse@44726 459 # Targets generated are returned in JAVASE_API_JAVADOC_TARGETS and
ihse@44726 460 # JAVASE_API_MODULEGRAPH_TARGETS.
ohair@13697 461
ihse@41652 462 ################################################################################
ihse@47432 463 # Setup generation of the reference Java SE API documentation (javadoc + modulegraph)
ihse@47432 464
ihse@47432 465 # The reference javadoc is just the same as javase, but using the BootJDK javadoc
ihse@47432 466 # and a stable set of javadoc options.
ihse@47432 467
ihse@47432 468 $(eval $(call SetupApiDocsGeneration, REFERENCE_API, \
ihse@47432 469 MODULES := $(JAVASE_MODULES), \
ihse@47432 470 SHORT_NAME := $(JAVASE_SHORT_NAME), \
ihse@47432 471 LONG_NAME := $(JAVASE_LONG_NAME), \
ihse@47432 472 TARGET_DIR := $(IMAGES_OUTPUTDIR)/reference-docs/api, \
ihse@47432 473 JAVADOC_CMD := $(JAVADOC), \
ihse@47432 474 OPTIONS := $(REFERENCE_OPTIONS), \
ihse@47432 475 TAGS := $(REFERENCE_TAGS), \
ihse@47432 476 ))
ihse@47432 477
ihse@47432 478 # Targets generated are returned in REFERENCE_API_JAVADOC_TARGETS and
ihse@47432 479 # REFERENCE_API_MODULEGRAPH_TARGETS.
ihse@47432 480
ihse@47432 481 ################################################################################
mchung@45105 482
ihse@45229 483 JDK_INDEX_HTML := $(DOCS_OUTPUTDIR)/index.html
mchung@45105 484
ihse@47432 485 $(JDK_INDEX_HTML):
mchung@45610 486 $(ECHO) '$(JDK_INDEX_CONTENT)' > $@
mchung@45105 487
ihse@45613 488 JDK_INDEX_TARGETS += $(JDK_INDEX_HTML)
ihse@45229 489
ihse@45229 490 # Copy the global resources
erikj@47217 491 GLOBAL_SPECS_RESOURCES_DIR := $(TOPDIR)/make/data/docs-resources/
ihse@45229 492 $(eval $(call SetupCopyFiles, COPY_GLOBAL_RESOURCES, \
ihse@45229 493 SRC := $(GLOBAL_SPECS_RESOURCES_DIR), \
ihse@45229 494 FILES := $(call CacheFind, $(GLOBAL_SPECS_RESOURCES_DIR)), \
ihse@45229 495 DEST := $(DOCS_OUTPUTDIR), \
ihse@45229 496 ))
ihse@45229 497 JDK_INDEX_TARGETS += $(COPY_GLOBAL_RESOURCES)
mchung@45105 498
mchung@45617 499 # Copy the legal notices distributed with the docs bundle
mchung@45617 500 DOCS_LEGAL_NOTICES := jquery.md jszip.md pako.md
mchung@45617 501 $(eval $(call SetupCopyFiles, COPY_DOCS_LEGAL_NOTICES, \
erikj@47217 502 SRC := $(TOPDIR)/src/jdk.javadoc/share/legal, \
mchung@45617 503 FILES := $(DOCS_LEGAL_NOTICES), \
mchung@45617 504 DEST := $(DOCS_OUTPUTDIR)/legal, \
mchung@45617 505 ))
mchung@45617 506 JDK_INDEX_TARGETS += $(COPY_DOCS_LEGAL_NOTICES)
mchung@45617 507
mchung@45105 508 ################################################################################
ihse@44733 509 # Copy JDK specs files
ihse@41652 510
ihse@44733 511 # For all html documentation in $module/share/specs directories, copy it
ihse@44733 512 # unmodified
ihse@41652 513
ihse@44733 514 ALL_MODULES := $(call FindAllModules)
ihse@44983 515 COPY_SPEC_FILTER := %.html %.gif %.jpg %.mib %.css
ihse@44733 516
ihse@44733 517 $(foreach m, $(ALL_MODULES), \
ihse@44733 518 $(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \
ihse@45095 519 $(foreach d, $(SPECS_$m), \
ihse@45095 520 $(if $(filter $(COPY_SPEC_FILTER), $(call CacheFind, $d)), \
ihse@45095 521 $(eval $(call SetupCopyFiles, COPY_$m, \
ihse@45095 522 SRC := $d, \
ihse@45095 523 FILES := $(filter $(COPY_SPEC_FILTER), $(call CacheFind, $d)), \
ihse@45103 524 DEST := $(DOCS_OUTPUTDIR)/specs/, \
ihse@45095 525 )) \
ihse@45095 526 $(eval JDK_SPECS_TARGETS += $(COPY_$m)) \
ihse@45095 527 ) \
ihse@44733 528 ) \
ihse@44733 529 )
ihse@44733 530
ihse@44734 531 ifeq ($(ENABLE_FULL_DOCS), true)
ihse@44734 532 # For all markdown files in $module/share/specs directories, convert them to
ihse@44734 533 # html.
ihse@44734 534
ihse@45229 535 GLOBAL_SPECS_DEFAULT_CSS_FILE := $(DOCS_OUTPUTDIR)/resources/jdk-default.css
ihse@44734 536
ihse@44734 537 $(foreach m, $(ALL_MODULES), \
ihse@44734 538 $(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \
ihse@44983 539 $(foreach d, $(SPECS_$m), \
ihse@44983 540 $(if $(filter %.md, $(call CacheFind, $d)), \
erikj@47217 541 $(eval $m_$d_NAME := CONVERT_MARKDOWN_$m_$(strip $(call RelativePath, $d, $(TOPDIR)))) \
erikj@47217 542 $(eval $(call SetupProcessMarkdown, $($m_$d_NAME), \
ihse@44983 543 SRC := $d, \
ihse@44983 544 FILES := $(filter %.md, $(call CacheFind, $d)), \
ihse@45103 545 DEST := $(DOCS_OUTPUTDIR)/specs/, \
ihse@44983 546 CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
ihse@44983 547 )) \
erikj@47217 548 $(eval JDK_SPECS_TARGETS += $($($m_$d_NAME))) \
ihse@44983 549 ) \
ihse@44734 550 ) \
ihse@44734 551 )
ihse@44734 552 endif
ihse@44734 553
ihse@44733 554 # Special treatment for generated documentation
ihse@44733 555
ihse@44733 556 JDWP_PROTOCOL := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
ihse@44733 557 $(eval $(call SetupCopyFiles, COPY_JDWP_PROTOCOL, \
ihse@44733 558 FILES := $(JDWP_PROTOCOL), \
ihse@45103 559 DEST := $(DOCS_OUTPUTDIR)/specs/jdwp, \
ihse@41652 560 ))
ihse@44733 561 JDK_SPECS_TARGETS += $(COPY_JDWP_PROTOCOL)
ihse@41652 562
ihse@44733 563 # Get jvmti.html from the main jvm variant (all variants' jvmti.html are identical).
ihse@44733 564 JVMTI_HTML := $(HOTSPOT_OUTPUTDIR)/variant-$(JVM_VARIANT_MAIN)/gensrc/jvmtifiles/jvmti.html
erikj@41260 565 $(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \
erikj@41260 566 FILES := $(JVMTI_HTML), \
ihse@45103 567 DEST := $(DOCS_OUTPUTDIR)/specs, \
erikj@41260 568 ))
ihse@44733 569 JDK_SPECS_TARGETS += $(COPY_JVMTI_HTML)
ohair@13697 570
ihse@41652 571 ################################################################################
ihse@41652 572 # Optional target which bundles all generated javadocs into a zip archive.
neugens@37034 573
ihse@44725 574 JAVADOC_ZIP_NAME := jdk-$(VERSION_STRING)-docs.zip
ihse@47253 575 JAVADOC_ZIP_FILE := $(OUTPUTDIR)/bundles/$(JAVADOC_ZIP_NAME)
ihse@41652 576
ihse@44725 577 $(eval $(call SetupZipArchive, BUILD_JAVADOC_ZIP, \
ihse@45103 578 SRC := $(DOCS_OUTPUTDIR), \
ihse@44733 579 ZIP := $(JAVADOC_ZIP_FILE), \
ihse@44733 580 EXTRA_DEPS := $(JDK_API_JAVADOC_TARGETS) $(JDK_API_MODULEGRAPH_TARGETS) \
ihse@44733 581 $(JDK_SPECS_TARGETS), \
ihse@44725 582 ))
neugens@37034 583
ihse@44725 584 ZIP_TARGETS += $(BUILD_JAVADOC_ZIP)
erikj@39384 585
erikj@39384 586 ################################################################################
erikj@39384 587
ihse@45103 588 docs-jdk-api-javadoc: $(JDK_API_JAVADOC_TARGETS) $(JDK_API_CUSTOM_TARGETS)
mchung@44397 589
ihse@44726 590 docs-jdk-api-modulegraph: $(JDK_API_MODULEGRAPH_TARGETS)
ihse@44725 591
ihse@45103 592 docs-javase-api-javadoc: $(JAVASE_API_JAVADOC_TARGETS) $(JAVASE_API_CUSTOM_TARGETS)
ihse@44726 593
ihse@44726 594 docs-javase-api-modulegraph: $(JAVASE_API_MODULEGRAPH_TARGETS)
ihse@41652 595
ihse@47432 596 docs-reference-api-javadoc: $(REFERENCE_API_JAVADOC_TARGETS) $(REFERENCE_API_CUSTOM_TARGETS)
ihse@47432 597
ihse@47432 598 docs-reference-api-modulegraph: $(REFERENCE_API_MODULEGRAPH_TARGETS)
ihse@47432 599
ihse@44733 600 docs-jdk-specs: $(JDK_SPECS_TARGETS)
ihse@41652 601
ihse@45229 602 docs-jdk-index: $(JDK_INDEX_TARGETS)
mchung@45105 603
ihse@41652 604 docs-zip: $(ZIP_TARGETS)
ihse@41652 605
ihse@44726 606 all: docs-jdk-api-javadoc docs-jdk-api-modulegraph docs-javase-api-javadoc \
ihse@47432 607 docs-javase-api-modulegraph docs-reference-api-javadoc \
ihse@47432 608 docs-reference-api-modulegraph docs-jdk-specs docs-jdk-index docs-zip
ihse@41652 609
ihse@44726 610 .PHONY: default all docs-jdk-api-javadoc docs-jdk-api-modulegraph \
ihse@47432 611 docs-javase-api-javadoc docs-javase-api-modulegraph \
ihse@47432 612 docs-reference-api-javadoc docs-reference-api-modulegraph docs-jdk-specs \
mchung@45105 613 docs-jdk-index docs-zip