93 $(UPGRADEABLE_MODULES) \ |
99 $(UPGRADEABLE_MODULES) \ |
94 $(AGGREGATOR_MODULES) |
100 $(AGGREGATOR_MODULES) |
95 # |
101 # |
96 |
102 |
97 PLATFORM_MODULES += \ |
103 PLATFORM_MODULES += \ |
98 java.compiler \ |
|
99 jdk.incubator.httpclient \ |
|
100 java.scripting \ |
104 java.scripting \ |
101 java.security.jgss \ |
105 java.security.jgss \ |
102 java.smartcardio \ |
106 java.smartcardio \ |
103 java.sql \ |
107 java.sql \ |
104 java.sql.rowset \ |
108 java.sql.rowset \ |
105 java.xml.crypto \ |
109 java.xml.crypto \ |
106 jdk.accessibility \ |
110 jdk.accessibility \ |
107 jdk.charsets \ |
111 jdk.charsets \ |
|
112 jdk.crypto.cryptoki \ |
108 jdk.crypto.ec \ |
113 jdk.crypto.ec \ |
109 jdk.crypto.cryptoki \ |
|
110 jdk.desktop \ |
|
111 jdk.dynalink \ |
114 jdk.dynalink \ |
|
115 jdk.incubator.httpclient \ |
112 jdk.jsobject \ |
116 jdk.jsobject \ |
113 jdk.localedata \ |
117 jdk.localedata \ |
114 jdk.naming.dns \ |
118 jdk.naming.dns \ |
115 jdk.scripting.nashorn \ |
119 jdk.scripting.nashorn \ |
116 jdk.security.auth \ |
120 jdk.security.auth \ |
117 jdk.security.jgss \ |
121 jdk.security.jgss \ |
118 jdk.xml.dom \ |
122 jdk.xml.dom \ |
119 jdk.zipfs \ |
123 jdk.zipfs \ |
120 # |
124 # |
121 |
125 |
|
126 ifeq ($(OPENJDK_TARGET_OS), windows) |
|
127 PLATFORM_MODULES += jdk.crypto.mscapi |
|
128 endif |
|
129 |
|
130 ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
131 PLATFORM_MODULES += jdk.crypto.ucrypto |
|
132 endif |
|
133 |
122 JRE_TOOL_MODULES += \ |
134 JRE_TOOL_MODULES += \ |
123 jdk.jdwp.agent \ |
135 jdk.jdwp.agent \ |
124 jdk.pack \ |
136 jdk.pack \ |
125 jdk.scripting.nashorn.shell \ |
137 jdk.scripting.nashorn.shell \ |
126 # |
138 # |
127 |
139 |
128 ifeq ($(OPENJDK_TARGET_OS), windows) |
140 ################################################################################ |
129 PLATFORM_MODULES += jdk.crypto.mscapi |
141 |
130 endif |
142 # DOCS_MODULES defines the root modules for javadoc generation. |
131 ifeq ($(OPENJDK_TARGET_OS), solaris) |
143 # All of their `require transitive` modules directly and indirectly will be included. |
132 PLATFORM_MODULES += jdk.crypto.ucrypto |
144 DOCS_MODULES += \ |
133 endif |
145 java.se.ee \ |
|
146 java.smartcardio \ |
|
147 jdk.accessibility \ |
|
148 jdk.attach \ |
|
149 jdk.charsets \ |
|
150 jdk.compiler \ |
|
151 jdk.crypto.cryptoki \ |
|
152 jdk.crypto.ec \ |
|
153 jdk.dynalink \ |
|
154 jdk.editpad \ |
|
155 jdk.hotspot.agent \ |
|
156 jdk.httpserver \ |
|
157 jdk.incubator.httpclient \ |
|
158 jdk.jartool \ |
|
159 jdk.javadoc \ |
|
160 jdk.jcmd \ |
|
161 jdk.jconsole \ |
|
162 jdk.jdeps \ |
|
163 jdk.jdi \ |
|
164 jdk.jdwp.agent \ |
|
165 jdk.jlink \ |
|
166 jdk.jsobject \ |
|
167 jdk.jshell \ |
|
168 jdk.jstatd \ |
|
169 jdk.localedata \ |
|
170 jdk.management \ |
|
171 jdk.management.agent \ |
|
172 jdk.naming.dns \ |
|
173 jdk.naming.rmi \ |
|
174 jdk.net \ |
|
175 jdk.pack \ |
|
176 jdk.policytool \ |
|
177 jdk.rmic \ |
|
178 jdk.scripting.nashorn \ |
|
179 jdk.sctp \ |
|
180 jdk.security.auth \ |
|
181 jdk.security.jgss \ |
|
182 jdk.xml.dom \ |
|
183 jdk.zipfs \ |
|
184 # |
134 |
185 |
135 # These modules are included in the interim image which is used to run profiling |
186 # These modules are included in the interim image which is used to run profiling |
136 # before building the real images. |
187 # before building the real images. |
137 INTERIM_IMAGE_MODULES := java.base java.logging |
188 INTERIM_IMAGE_MODULES := java.base java.logging |
138 |
189 |
232 FindModuleSrcDirs = \ |
285 FindModuleSrcDirs = \ |
233 $(strip $(wildcard \ |
286 $(strip $(wildcard \ |
234 $(addsuffix /$(strip $1), $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \ |
287 $(addsuffix /$(strip $1), $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \ |
235 $(foreach sub, $(SRC_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS))))) |
288 $(foreach sub, $(SRC_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS))))) |
236 |
289 |
|
290 # Find all specs dirs for a particular module |
|
291 # $1 - Module to find specs dirs for |
|
292 FindModuleSpecsDirs = \ |
|
293 $(strip $(wildcard \ |
|
294 $(foreach sub, $(SPEC_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS))))) |
|
295 |
237 # Construct the complete module source path |
296 # Construct the complete module source path |
238 GetModuleSrcPath = \ |
297 GetModuleSrcPath = \ |
239 $(call PathList, \ |
298 $(call PathList, \ |
240 $(addsuffix /*, $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \ |
299 $(addsuffix /*, $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \ |
241 $(foreach sub, $(SRC_SUBDIRS), $(addsuffix /*/$(sub), $(TOP_SRC_DIRS)))) |
300 $(foreach sub, $(SRC_SUBDIRS), $(addsuffix /*/$(sub), $(TOP_SRC_DIRS)))) |
242 |
301 |
243 ################################################################################ |
302 ################################################################################ |
244 # Extract module dependencies from module-info.java files. |
303 # Extract module dependencies from module-info.java files, both normal |
|
304 # dependencies ("requires"), and indirect exports ("requires transitive"). |
245 |
305 |
246 MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk |
306 MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk |
247 |
307 |
248 MODULE_INFOS := $(call FindAllModuleInfos, *) |
308 MODULE_INFOS := $(call FindAllModuleInfos, *) |
249 |
309 |
253 $(RM) $@ |
313 $(RM) $@ |
254 $(foreach m, $(MODULE_INFOS), \ |
314 $(foreach m, $(MODULE_INFOS), \ |
255 ( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) :=" && \ |
315 ( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) :=" && \ |
256 $(NAWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\ |
316 $(NAWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\ |
257 BEGIN { if (MODULE != "java.base") printf(" java.base"); } \ |
317 BEGIN { if (MODULE != "java.base") printf(" java.base"); } \ |
258 /requires/ { sub(/;/, ""); \ |
318 /^ *requires/ { sub(/;/, ""); \ |
259 sub(/requires/, ""); \ |
319 sub(/requires/, ""); \ |
260 sub(/transitive/, ""); \ |
320 sub(/transitive/, ""); \ |
261 sub(/\/\/.*/, ""); \ |
321 sub(/\/\/.*/, ""); \ |
262 sub(/\/\*.*\*\//, ""); \ |
322 sub(/\/\*.*\*\//, ""); \ |
263 gsub(/^ +\*.*/, ""); \ |
323 gsub(/^ +\*.*/, ""); \ |
264 gsub(/ /, ""); \ |
324 gsub(/ /, ""); \ |
265 printf(" %s", $$0) } \ |
325 printf(" %s", $$0) } \ |
266 END { printf("\n") }' $m \ |
326 END { printf("\n") }' $m && \ |
|
327 $(PRINTF) "TRANSITIVE_MODULES_$(call GetModuleNameFromModuleInfo, $m) :=" && \ |
|
328 $(NAWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\ |
|
329 BEGIN { if (MODULE != "java.base") printf(" java.base"); } \ |
|
330 /^ *requires *transitive/ { \ |
|
331 sub(/;/, ""); \ |
|
332 sub(/requires/, ""); \ |
|
333 sub(/transitive/, ""); \ |
|
334 sub(/\/\/.*/, ""); \ |
|
335 sub(/\/\*.*\*\//, ""); \ |
|
336 gsub(/^ +\*.*/, ""); \ |
|
337 gsub(/ /, ""); \ |
|
338 printf(" %s", $$0) } \ |
|
339 END { printf("\n") }' $m \ |
267 ) >> $@ $(NEWLINE)) |
340 ) >> $@ $(NEWLINE)) |
268 |
341 |
269 -include $(MODULE_DEPS_MAKEFILE) |
342 -include $(MODULE_DEPS_MAKEFILE) |
270 |
343 |
271 # Param 1: Module to find deps for |
344 # Find dependencies ("requires") for a given module. |
|
345 # Param 1: Module to find dependencies for. |
272 FindDepsForModule = \ |
346 FindDepsForModule = \ |
273 $(DEPS_$(strip $1)) |
347 $(DEPS_$(strip $1)) |
274 |
348 |
275 # Finds transitive dependencies in 3 levels. |
349 # Find dependencies ("requires") transitively in 3 levels for a given module. |
276 # Param 1: Module to find transitive deps for |
350 # Param 1: Module to find dependencies for. |
277 FindTransitiveDepsForModule = \ |
351 FindTransitiveDepsForModule = \ |
278 $(sort $(call FindDepsForModule, $1) \ |
352 $(sort $(call FindDepsForModule, $1) \ |
279 $(foreach m, $(call FindDepsForModule, $1), \ |
353 $(foreach m, $(call FindDepsForModule, $1), \ |
280 $(call FindDepsForModule, $m) \ |
354 $(call FindDepsForModule, $m) \ |
281 $(foreach n, $(call FindDepsForModule, $m), \ |
355 $(foreach n, $(call FindDepsForModule, $m), \ |
282 $(call FindDepsForModule, $n)))) |
356 $(call FindDepsForModule, $n)))) |
283 |
357 |
|
358 # Find dependencies ("requires") transitively in 3 levels for a set of modules. |
|
359 # Param 1: List of modules to find dependencies for. |
|
360 FindTransitiveDepsForModules = \ |
|
361 $(sort $(foreach m, $1, $(call FindTransitiveDepsForModule, $m))) |
|
362 |
|
363 # Find indirect exported modules ("requires transitive") for a given module . |
|
364 # Param 1: Module to find indirect exported modules for. |
|
365 FindIndirectExportsForModule = \ |
|
366 $(TRANSITIVE_MODULES_$(strip $1)) |
|
367 |
|
368 # Finds indirect exported modules transitively in 3 levels for a given module. |
|
369 # Param 1: Module to find indirect exported modules for. |
|
370 FindTransitiveIndirectDepsForModule = \ |
|
371 $(sort $(call FindIndirectExportsForModule, $1) \ |
|
372 $(foreach m, $(call FindIndirectExportsForModule, $1), \ |
|
373 $(call FindIndirectExportsForModule, $m) \ |
|
374 $(foreach n, $(call FindIndirectExportsForModule, $m), \ |
|
375 $(call FindIndirectExportsForModule, $n)))) |
|
376 |
|
377 # Finds indirect exported modules transitively in 3 levels for a set of modules. |
|
378 # Param 1: List of modules to find indirect exported modules for. |
|
379 FindTransitiveIndirectDepsForModules = \ |
|
380 $(sort $(foreach m, $1, $(call FindTransitiveIndirectDepsForModule, $m))) |
|
381 |
284 # Upgradeable modules are those that are either defined as upgradeable or that |
382 # Upgradeable modules are those that are either defined as upgradeable or that |
285 # require an upradeable module. |
383 # require an upradeable module. |
286 FindAllUpgradeableModules = \ |
384 FindAllUpgradeableModules = \ |
287 $(filter-out $(MODULES_FILTER) $(NON_UPGRADEABLE_MODULES), \ |
385 $(sort $(filter-out $(MODULES_FILTER), $(UPGRADEABLE_MODULES) $(UPGRADEABLE_TOOL_MODULES))) |
288 $(sort $(UPGRADEABLE_MODULES) $(foreach m, \ |
386 |
289 $(filter-out $(UPGRADEABLE_MODULES), $(call FindAllModules)), \ |
|
290 $(if $(filter $(UPGRADEABLE_MODULES), \ |
|
291 $(call FindTransitiveDepsForModule, $m)), \ |
|
292 $m \ |
|
293 ) \ |
|
294 )) \ |
|
295 ) |
|
296 |
387 |
297 ################################################################################ |
388 ################################################################################ |
298 |
389 |
299 LEGAL_SUBDIRS += $(OPENJDK_TARGET_OS)/legal |
390 LEGAL_SUBDIRS += $(OPENJDK_TARGET_OS)/legal |
300 ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE)) |
391 ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE)) |