24 |
24 |
25 default: all |
25 default: all |
26 |
26 |
27 include $(SPEC) |
27 include $(SPEC) |
28 include MakeBase.gmk |
28 include MakeBase.gmk |
|
29 include Modules.gmk |
|
30 include ZipArchive.gmk |
29 include $(JDK_TOPDIR)/make/Tools.gmk |
31 include $(JDK_TOPDIR)/make/Tools.gmk |
30 include $(JDK_TOPDIR)/make/ModuleTools.gmk |
32 include $(JDK_TOPDIR)/make/ModuleTools.gmk |
31 |
33 |
32 ################################################################################ |
34 # This is needed to properly setup DOCS_MODULES. |
33 |
35 $(eval $(call ReadImportMetaData)) |
34 # List of all possible directories for javadoc to look for sources |
36 |
35 # Allow custom to overwrite. |
37 ################################################################################ |
36 JAVADOC_SOURCE_DIRS = \ |
38 # Javadoc settings |
37 $(SUPPORT_OUTPUTDIR)/gensrc/* \ |
39 |
38 $(addsuffix /*, $(IMPORT_MODULES_SRC)) \ |
40 # All modules to have docs generated by docs-javadoc target |
39 $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS)/classes \ |
41 JAVADOC_MODULES := $(sort $(DOCS_MODULES)) |
40 $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_TYPE)/classes \ |
42 |
41 $(JDK_TOPDIR)/src/*/share/classes \ |
43 # On top of the sources that was used to compile the JDK, we need some |
42 $(HOTSPOT_TOPDIR)/src/*/share/classes \ |
44 # extra java.rmi sources that are used just for javadoc. |
43 $(LANGTOOLS_TOPDIR)/src/*/share/classes \ |
45 JAVADOC_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) \ |
44 $(NASHORN_TOPDIR)/src/*/share/classes \ |
46 $(SUPPORT_OUTPUTDIR)/rmic/* $(JDK_TOPDIR)/src/*/share/doc/stub) |
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 |
47 |
52 # Should we use -Xdocrootparent? Allow custom to overwrite. |
48 # Should we use -Xdocrootparent? Allow custom to overwrite. |
53 DOCROOTPARENT_FLAG = TRUE |
49 DOCROOTPARENT_FLAG = TRUE |
54 |
50 |
55 # URLs |
51 # URLs |
56 JAVADOC_BASE_URL := http://docs.oracle.com/javase/$(VERSION_SPECIFICATION)/docs |
52 JAVADOC_BASE_URL := http://docs.oracle.com/javase/$(VERSION_SPECIFICATION)/docs |
57 BUG_SUBMIT_URL := http://bugreport.java.com/bugreport/ |
53 BUG_SUBMIT_URL := http://bugreport.java.com/bugreport/ |
58 |
54 COPYRIGHT_URL := {@docroot}/../legal/cpyr.html |
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 $(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 © $(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 |
55 |
162 # In order to get a specific ordering it's necessary to specify the total |
56 # 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. |
57 # ordering of tags as the tags are otherwise ordered in order of definition. |
164 DEFAULT_JAVADOC_TAGS := \ |
58 JAVADOC_TAGS := \ |
165 -tag beaninfo:X \ |
59 -tag beaninfo:X \ |
166 -tag revised:X \ |
60 -tag revised:X \ |
167 -tag since.unbundled:X \ |
61 -tag since.unbundled:X \ |
168 -tag spec:X \ |
62 -tag spec:X \ |
169 -tag specdefault:X \ |
63 -tag specdefault:X \ |
185 -tag 'jls:a:See <cite>The Java™ Language Specification</cite>:' \ |
79 -tag 'jls:a:See <cite>The Java™ Language Specification</cite>:' \ |
186 -taglet build.tools.taglet.Incubating \ |
80 -taglet build.tools.taglet.Incubating \ |
187 -tagletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \ |
81 -tagletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \ |
188 # |
82 # |
189 |
83 |
190 DEFAULT_JAVADOC_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \ |
84 # Which doclint checks to ignore |
191 -serialwarn -encoding ISO-8859-1 -breakiterator --system none |
85 JAVADOC_DISABLED_DOCLINT := accessibility html missing syntax reference |
|
86 |
|
87 # The initial set of options for javadoc |
|
88 JAVADOC_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \ |
|
89 -serialwarn -encoding ISO-8859-1 -breakiterator -splitIndex --system none \ |
|
90 --expand-requires transitive |
192 |
91 |
193 # |
92 # |
194 # TODO: this should be set by the configure option. |
93 # TODO: this should be set by the configure option. |
195 # |
94 # |
196 ifndef ENABLE_MODULE_GRAPH |
95 ifndef ENABLE_MODULE_GRAPH |
197 ENABLE_MODULE_GRAPH=false |
96 ENABLE_MODULE_GRAPH=false |
198 endif |
97 endif |
199 |
98 |
200 ################################################################################ |
99 # Should we add DRAFT stamps to the generated javadoc? |
201 # Setup make rules for running javadoc. |
100 ifeq ($(VERSION_IS_GA), true) |
202 # |
101 IS_DRAFT := false |
203 # Parameter 1 is the name of the rule. This name is used as variable prefix, |
102 else |
204 # and the targets generated are listed in a variable by that name. Note that |
103 IS_DRAFT := true |
205 # the index.html file will work as a "touch file" for all the magnitude of |
104 endif |
206 # files that are generated by javadoc. |
105 |
207 # |
106 ################################################################################ |
208 # Remaining parameters are named arguments. These include: |
107 # General text snippets |
209 # MODULES - Modules to include |
108 |
210 # PACKAGES - Packages to include |
109 FULL_COMPANY_NAME := Oracle and/or its affiliates |
211 # IS_CORE - Set to TRUE for the Core API package which needs special treatment |
110 COMPANY_ADDRESS := 500 Oracle Parkway<br>Redwood Shores, CA 94065 USA |
212 # API_ROOT - Where to base the documentation (jre or jdk) |
111 |
213 # DEST_DIR - A directory relative to the API root |
112 ifeq ($(IS_DRAFT), true) |
214 # OVERVIEW - Path to a html overview file |
113 DRAFT_MARKER_STR := <br><strong>DRAFT $(VERSION_STRING)</strong> |
215 # TITLE - Default title to use for the more specific versions below |
114 ifeq ($(VERSION_BUILD), 0) |
216 # WINDOW_TITLE - Title to use in -windowtitle. Computed from TITLE if empty. |
115 DRAFT_MARKER_TITLE := [ad-hoc build] |
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 |
116 else |
233 $1_JAVA := $$(JAVA_SMALL) |
117 DRAFT_MARKER_TITLE := [build $(VERSION_BUILD)] |
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 |
118 endif |
247 |
119 endif |
248 $1_OPTIONS += --add-modules $$(call CommaList, $$($1_MODULES)) |
120 |
249 |
121 |
250 ifneq ($$($1_DISABLED_DOCLINT), ) |
122 ################################################################################ |
251 # Create a string like ",-syntax,-html" |
123 # JDK javadoc titles/text snippets |
252 $1_DOCLINT_EXCEPTIONS := ,$$(call CommaList, $$(addprefix -, $$($1_DISABLED_DOCLINT))) |
124 |
253 endif |
125 JAVADOC_WINDOW_TITLE := Java Platform SE $(VERSION_SPECIFICATION) \ |
254 $1_OPTIONS += -Xdoclint:all$$($1_DOCLINT_EXCEPTIONS) |
126 $(DRAFT_MARKER_TITLE) |
255 |
127 |
256 ifneq ($$($1_DOCLINT_PACKAGES), ) |
128 JAVADOC_DOC_TITLE := Java™ Platform, Standard Edition Development Kit \ |
257 $1_OPTIONS += -Xdoclint/package:$$(call CommaList, $$($1_DOCLINT_PACKAGES)) |
129 (JDK™) $(VERSION_SPECIFICATION)<br>API Specification |
258 endif |
130 |
259 |
131 JAVADOC_HEADER_TITLE := $(subst $(SPACE), ,$(strip \ |
260 ifeq ($$($1_DOC_TITLE), ) |
132 <strong>Java™ Platform<br>Standard Ed. \ |
261 $1_DOC_TITLE := $$($1_TITLE) |
133 $(VERSION_SPECIFICATION)</strong>$(DRAFT_MARKER_STR))) |
262 endif |
134 |
263 $1_OPTIONS += -doctitle '$$($1_DOC_TITLE)' |
135 JAVADOC_BOTTOM := \ |
264 |
136 <span style="font-size:smaller"> \ |
265 ifeq ($$($1_WINDOW_TITLE), ) |
137 <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a><br> \ |
266 $1_WINDOW_TITLE := $$(strip $$(subst ™,, $$($1_TITLE))) |
138 For further API reference and developer documentation, see \ |
267 endif |
139 <a href="$(JAVADOC_BASE_URL)/index.html" target="_blank">Java SE \ |
268 $1_OPTIONS += -windowtitle '$$($1_WINDOW_TITLE)$$(DRAFT_WINDOW_TITLE_MARKER)' |
140 Documentation</a>. That documentation contains more detailed, \ |
269 |
141 developer-targeted descriptions, with conceptual overviews, definitions \ |
270 ifeq ($$($1_HEADER_TITLE), ) |
142 of terms, workarounds, and working code examples.<br> \ |
271 $1_HEADER_TITLE := $$(strip $$(subst ™,, $$($1_TITLE))) |
143 Java is a trademark or registered trademark of $(FULL_COMPANY_NAME) in \ |
272 endif |
144 the US and other countries.<br> \ |
273 $1_OPTIONS += -header '<strong>$$($1_HEADER_TITLE)</strong>$$(DRAFT_MARKER)' |
145 <a href="$(COPYRIGHT_URL)">Copyright</a> \ |
274 |
146 © 1993, $(COPYRIGHT_YEAR), $(FULL_COMPANY_NAME). \ |
275 ifneq ($$($1_EXTRA_TOP), ) |
147 $(COMPANY_ADDRESS). All rights reserved.$(DRAFT_MARKER_STR)</span> |
276 $1_OPTIONS += -top '$$($1_EXTRA_TOP)' |
148 |
277 endif |
149 JAVADOC_TOP := \ |
278 |
150 <div style="background-color: $(HASH)EEEEEE"><div style="padding: 6px; \ |
279 ifeq ($$($1_BOTTOM_TEXT), ) |
151 margin-top: 2px; margin-bottom: 6px; margin-left: 6px; margin-right: \ |
280 $1_BOTTOM_TEXT := $(COMMON_BOTTOM_TEXT) |
152 6px; text-align: justify; font-size: 80%; font-family: Helvetica, Arial, \ |
281 endif |
153 sans-serif; font-weight: normal;">Please note that the specifications \ |
282 $1_BOTTOM := $$(call GenerateBottom, $$($1_FIRST_COPYRIGHT_YEAR), \ |
154 and other information contained herein are not final and are subject to \ |
283 $$($1_BOTTOM_COPYRIGHT_URL), $$($1_BOTTOM_TEXT)) |
155 change. The information is being made available to you solely for \ |
284 $1_OPTIONS += -bottom '$$($1_BOTTOM)$$(DRAFT_MARKER)' |
156 purpose of evaluation.</div></div> |
285 |
157 |
286 ifneq ($$($1_OVERVIEW), ) |
158 ################################################################################ |
287 $1_OPTIONS += -overview $$($1_OVERVIEW) |
159 # Java SE Reference javadoc titles/text snippets |
288 $1_DEPS += $$($1_OVERVIEW) |
160 |
289 endif |
161 REFERENCE_DOC_TITLE := Java™ Platform, Standard Edition \ |
290 |
162 $(VERSION_SPECIFICATION)<br>API Specification |
291 ifneq ($$($1_SPLIT_INDEX), ) |
163 |
292 $1_OPTIONS += -splitIndex |
164 ################################################################################ |
293 endif |
165 # Setup call to JDK javadoc based on above settings |
294 |
166 |
295 ifneq ($$($DOCROOTPARENT_FLAG), ) |
167 # Create a string like "-Xdoclint:all,-syntax,-html,..." |
296 $1_OPTIONS += -Xdocrootparent $(JAVADOC_BASE_URL) |
168 JAVADOC_OPTIONS += -Xdoclint:all,$(call CommaList, $(addprefix -, \ |
297 endif |
169 $(JAVADOC_DISABLED_DOCLINT))) |
298 |
170 |
299 $1_VARDEPS := $$($1_OPTIONS) $$($1_PACKAGES) |
171 ifneq ($($DOCROOTPARENT_FLAG), ) |
300 $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \ |
172 JAVADOC_OPTIONS += -Xdocrootparent $(JAVADOC_BASE_URL) |
301 $$(SUPPORT_OUTPUTDIR)/docs/$1.vardeps) |
173 endif |
302 |
174 |
303 # Do not store debug level options in VARDEPS. |
175 JAVADOC_TITLE_OPTIONS += -doctitle '$(JAVADOC_DOC_TITLE)' |
304 ifneq ($$(LOG_LEVEL), trace) |
176 JAVADOC_TITLE_OPTIONS += -windowtitle '$(JAVADOC_WINDOW_TITLE)' |
305 $1_OPTIONS += -quiet |
177 JAVADOC_TITLE_OPTIONS += -header '$(JAVADOC_HEADER_TITLE)' |
306 else |
178 JAVADOC_TITLE_OPTIONS += -bottom '$(JAVADOC_BOTTOM)' |
307 $1_OPTIONS += -verbose |
179 ifeq ($(IS_DRAFT), true) |
308 endif |
180 JAVADOC_TITLE_OPTIONS += -top '$(JAVADOC_TOP)' |
309 |
181 endif |
310 $1_PACKAGE_DEPS := $$(call CacheFind, $$(wildcard $$(foreach p, \ |
182 |
311 $$(subst .,/,$$(strip $$($1_PACKAGES))), \ |
183 # Do not store debug level options in VARDEPS. |
312 $$(addsuffix /$$p, $$(wildcard $$(JAVADOC_SOURCE_DIRS)))))) |
184 ifneq ($(LOG_LEVEL), trace) |
313 |
185 JAVADOC_LOG_OPTION += -quiet |
314 # If there are many packages, use an @-file... |
186 else |
315 ifneq ($$(word 17, $$($1_PACKAGES)), ) |
187 JAVADOC_LOG_OPTION += -verbose |
316 $1_PACKAGES_FILE := $$(SUPPORT_OUTPUTDIR)/docs/$1.packages |
188 endif |
317 $1_PACKAGES_ARG := @$$($1_PACKAGES_FILE) |
189 |
318 else |
190 JAVADOC_VARDEPS := $(JAVADOC_OPTIONS) $(JAVADOC_TITLE_OPTIONS) $(JAVADOC_TAGS) \ |
319 $1_PACKAGES_ARG := $$($1_PACKAGES) |
191 $(JAVADOC_MODULES) $(JAVADOC_SOURCE_PATH) |
320 endif |
192 JAVADOC_VARDEPS_FILE := $(call DependOnVariable, JAVADOC_VARDEPS, \ |
321 |
193 $(SUPPORT_OUTPUTDIR)/docs/javadoc.vardeps) |
322 # The index.html which is a marker for all the output from javadoc. |
194 |
323 $1_INDEX_FILE := $$(JAVADOC_OUTPUTDIR)/$$($1_OUTPUT_DIRNAME)/index.html |
195 # Get a list of all files in all the source dirs for all included modules |
324 |
196 JAVADOC_SOURCE_DEPS := $(call CacheFind, $(wildcard \ |
325 # Rule for actually running javadoc |
197 $(foreach module, $(JAVADOC_MODULES), $(call FindModuleSrcDirs, $(module))))) |
326 $$($1_INDEX_FILE): $$(BUILD_TOOLS_JDK) $$($1_VARDEPS_FILE) $$($1_PACKAGE_DEPS) $$($1_DEPS) |
198 |
327 $$(call LogWarn, Generating Javadoc from $$(words $$($1_PACKAGES)) package(s) for $$($1_OUTPUT_DIRNAME)) |
199 JAVADOC_TARGET_DIR := $(JAVADOC_OUTPUTDIR)/api |
328 $$(call MakeDir, $$(@D)) |
200 JAVADOC_OVERVIEW := $(JDK_TOPDIR)/src/java.base/share/classes/overview-core.html |
329 ifneq ($$($1_PACKAGES_FILE), ) |
201 |
330 $$(eval $$(call ListPathsSafely, $1_PACKAGES, $$($1_PACKAGES_FILE))) |
202 # Javadoc creates a lot of files but use index.html as a marker |
331 endif |
203 $(JAVADOC_TARGET_DIR)/index.html: $(BUILD_TOOLS_JDK) $(JAVADOC_VARDEPS_FILE) \ |
332 $$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/docs/$1.javadoc, \ |
204 $(JAVADOC_SOURCE_DEPS) $(JAVADOC_OVERVIEW) |
333 $$($1_JAVA) -Djava.awt.headless=true -DenableModuleGraph=$(ENABLE_MODULE_GRAPH) \ |
205 $(call LogWarn, Generating Javadoc for $(words $(JAVADOC_MODULES)) modules) |
334 $(NEW_JAVADOC) -d $$(@D) \ |
206 $(call LogInfo, Javadoc modules: $(JAVADOC_MODULES)) |
335 $$(DEFAULT_JAVADOC_TAGS) $$(DEFAULT_JAVADOC_OPTIONS) \ |
207 $(call MakeDir, $(JAVADOC_TARGET_DIR)) |
336 --module-source-path $$(call PathList, $$(JAVADOC_SOURCE_DIRS)) \ |
208 $(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/docs/javadoc, \ |
337 $$($1_OPTIONS) $$($1_PACKAGES_ARG)) |
209 $(JAVA) -Djava.awt.headless=true \ |
338 |
210 -DenableModuleGraph=$(ENABLE_MODULE_GRAPH) \ |
339 # The output returned will be the index.html file |
211 $(NEW_JAVADOC) -d $(JAVADOC_TARGET_DIR) \ |
340 $1 := $$($1_INDEX_FILE) |
212 $(JAVADOC_TAGS) $(JAVADOC_OPTIONS) $(JAVADOC_LOG_OPTION) \ |
341 endef |
213 $(JAVADOC_TITLE_OPTIONS) -overview $(JAVADOC_OVERVIEW) \ |
342 |
214 --module-source-path $(JAVADOC_SOURCE_PATH) \ |
343 ################################################################################ |
215 --module $(call CommaList, $(JAVADOC_MODULES))) |
344 |
216 |
345 $(eval $(call SetupJavadocGeneration, coredocs, \ |
217 JAVADOC_TARGETS += $(JAVADOC_TARGET_DIR)/index.html |
346 MODULES := java.se.ee, \ |
218 |
347 PACKAGES := $(CORE_PACKAGES), \ |
219 ################################################################################ |
348 IS_CORE := TRUE, \ |
220 # Setup call to Java SE Reference javadoc based on above settings |
349 OVERVIEW := $(JDK_TOPDIR)/src/java.base/share/classes/overview-core.html, \ |
221 |
350 WINDOW_TITLE := Java Platform SE $(VERSION_SPECIFICATION), \ |
222 REFERENCE_TARGET_DIR := $(IMAGES_OUTPUTDIR)/javase-docs/api |
351 HEADER_TITLE := Java™ Platform<br>Standard Ed. $(VERSION_SPECIFICATION), \ |
223 REFERENCE_OVERVIEW := $(JDK_TOPDIR)/src/java.base/share/classes/overview-core.html |
352 DOC_TITLE := Java™ Platform$(COMMA) Standard Edition \ |
224 |
353 $(VERSION_SPECIFICATION)<br>API Specification, \ |
225 REFERENCE_TITLE_OPTIONS += -doctitle '$(REFERENCE_DOC_TITLE)' |
354 FIRST_COPYRIGHT_YEAR := 1993, \ |
226 REFERENCE_TITLE_OPTIONS += -windowtitle '$(JAVADOC_WINDOW_TITLE)' |
355 DISABLED_DOCLINT := accessibility html missing syntax, \ |
227 REFERENCE_TITLE_OPTIONS += -header '$(JAVADOC_HEADER_TITLE)' |
356 DOCLINT_PACKAGES := -org.omg.* jdk.internal.logging.*, \ |
228 REFERENCE_TITLE_OPTIONS += -bottom '$(JAVADOC_BOTTOM)' |
357 SPLIT_INDEX := TRUE, \ |
229 ifeq ($(IS_DRAFT), true) |
358 BOTTOM_COPYRIGHT_URL := $(CORE_BOTTOM_COPYRIGHT_URL), \ |
230 REFERENCE_TITLE_OPTIONS += -top '$(JAVADOC_TOP)' |
359 BOTTOM_TEXT := $(CORE_BOTTOM_TEXT), \ |
231 endif |
360 EXTRA_TOP := $(EARLYACCESS_TOP), \ |
232 |
361 )) |
233 REFERENCE_VARDEPS := $(JAVADOC_OPTIONS) $(REFERENCE_TITLE_OPTIONS) $(JAVADOC_TAGS) \ |
362 |
234 $(JAVADOC_MODULES) $(JAVADOC_SOURCE_PATH) |
363 TARGETS += $(coredocs) |
235 REFERENCE_VARDEPS_FILE := $(call DependOnVariable, REFERENCE_VARDEPS, \ |
364 |
236 $(SUPPORT_OUTPUTDIR)/docs/reference.vardeps) |
365 ################################################################################ |
237 |
366 |
238 # Javadoc creates a lot of files but use index.html as a marker. |
367 $(eval $(call SetupJavadocGeneration, docletapi, \ |
239 $(REFERENCE_TARGET_DIR)/index.html: $(BUILD_TOOLS_JDK) $(REFERENCE_VARDEPS_FILE) \ |
368 MODULES := jdk.javadoc, \ |
240 $(JAVADOC_SOURCE_DEPS) $(REFERENCE_OVERVIEW) |
369 PACKAGES := \ |
241 $(call LogWarn, Generating reference Javadoc for Java SE) |
370 jdk.javadoc.doclet, \ |
242 $(call MakeDir, $(REFERENCE_TARGET_DIR)) |
371 API_ROOT := jdk, \ |
243 $(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/docs/reference, \ |
372 DEST_DIR := javadoc/doclet, \ |
244 $(JAVA) -Djava.awt.headless=true \ |
373 TITLE := Doclet API, \ |
245 -DenableModuleGraph=$(ENABLE_MODULE_GRAPH) \ |
374 FIRST_COPYRIGHT_YEAR := 1993, \ |
246 $(NEW_JAVADOC) -d $(REFERENCE_TARGET_DIR) \ |
375 )) |
247 $(JAVADOC_TAGS) $(JAVADOC_OPTIONS) $(JAVADOC_LOG_OPTION) \ |
376 |
248 $(REFERENCE_TITLE_OPTIONS) -overview $(REFERENCE_OVERVIEW) \ |
377 TARGETS += $(docletapi) |
249 --module-source-path $(JAVADOC_SOURCE_PATH) \ |
378 |
250 --module java.se.ee) |
379 ################################################################################ |
251 |
380 |
252 REFERENCE_TARGETS += $(REFERENCE_TARGET_DIR)/index.html |
381 $(eval $(call SetupJavadocGeneration, old-docletapi, \ |
253 |
382 MODULES := jdk.javadoc, \ |
254 ################################################################################ |
383 PACKAGES := com.sun.javadoc, \ |
255 # Copy targets |
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™ 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™ 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™ 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™ 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™ 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™ 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™ 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™ 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 |
256 |
699 JDWP_HTML := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html |
257 JDWP_HTML := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html |
700 |
258 |
701 $(eval $(call SetupCopyFiles, COPY_JDWP_HTML, \ |
259 $(eval $(call SetupCopyFiles, COPY_JDWP_HTML, \ |
702 FILES := $(JDWP_HTML), \ |
260 FILES := $(JDWP_HTML), \ |
703 DEST := $(JAVADOC_OUTPUTDIR)/platform/jpda/jdwp, \ |
261 DEST := $(JAVADOC_OUTPUTDIR)/platform/jpda/jdwp, \ |
704 )) |
262 )) |
705 |
263 |
706 COPY_TARGETS += $(COPY_JDWP_HTML) |
264 COPY_TARGETS += $(COPY_JDWP_HTML) |
707 |
265 |
708 ################################################################################ |
|
709 # Copy JVMTI html file |
|
710 |
|
711 # Pick jvmti.html from any jvm variant, they are all the same. |
266 # Pick jvmti.html from any jvm variant, they are all the same. |
712 JVMTI_HTML := $(firstword \ |
267 JVMTI_HTML := $(firstword \ |
713 $(wildcard $(HOTSPOT_OUTPUTDIR)/variant-*/gensrc/jvmtifiles/jvmti.html)) |
268 $(wildcard $(HOTSPOT_OUTPUTDIR)/variant-*/gensrc/jvmtifiles/jvmti.html)) |
714 |
269 |
715 $(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \ |
270 $(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \ |