author | mchung |
Thu, 31 Mar 2016 14:11:15 -0700 | |
changeset 36723 | 295e7ec5d8f9 |
parent 36545 | 91a564aa5e89 |
child 36725 | f458544b0d76 |
permissions | -rw-r--r-- |
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
1 |
# |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
2 |
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
4 |
# |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
10 |
# |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
15 |
# accompanied this code). |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
16 |
# |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
20 |
# |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
23 |
# questions. |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
24 |
# |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
25 |
|
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
26 |
ifndef _MODULES_GMK |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
27 |
_MODULES_GMK := 1 |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
28 |
|
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
29 |
################################################################################ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
30 |
# |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
31 |
# BOOT_MODULES are modules defined by the boot loader |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
32 |
# PLATFORM_MODULES are modules defined by the platform loader |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
33 |
# JRE_TOOL_MODULES are tools included in JRE and defined by the application loader |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
34 |
# |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
35 |
# All other modules not declared below are defined by the application loader |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
36 |
# and are not included in JRE. |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
37 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
38 |
BOOT_MODULES := |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
39 |
PLATFORM_MODULES := |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
40 |
JRE_TOOL_MODULES := |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
41 |
|
36506 | 42 |
# Hook to include the corresponding custom file, if present. |
43 |
$(eval $(call IncludeCustomExtension, , common/Modules.gmk)) |
|
44 |
||
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
45 |
UPGRADEABLE_MDOULES := |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
46 |
AGGREGATOR_MDOULES := |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
47 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
48 |
BOOT_MODULES += \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
49 |
java.base \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
50 |
java.datatransfer \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
51 |
java.desktop \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
52 |
java.httpclient \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
53 |
java.instrument \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
54 |
java.logging \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
55 |
java.management \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
56 |
java.naming \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
57 |
java.prefs \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
58 |
java.rmi \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
59 |
java.security.jgss \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
60 |
java.security.sasl \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
61 |
java.sql \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
62 |
java.xml \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
63 |
java.xml.crypto \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
64 |
jdk.httpserver \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
65 |
jdk.management \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
66 |
jdk.sctp \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
67 |
jdk.security.auth \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
68 |
jdk.security.jgss \ |
36545
91a564aa5e89
8152697: JVMCI tests fail with UnsatisfiedLinkError as jdk.vm.ci not defined by boot loader
mchung
parents:
36543
diff
changeset
|
69 |
jdk.vm.ci \ |
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
70 |
# |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
71 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
72 |
# to be deprivileged |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
73 |
BOOT_MODULES += \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
74 |
java.compiler \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
75 |
java.scripting \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
76 |
java.sql.rowset \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
77 |
java.smartcardio \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
78 |
jdk.charsets \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
79 |
jdk.naming.rmi \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
80 |
# |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
81 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
82 |
UPGRADEABLE_MODULES += \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
83 |
java.activation \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
84 |
java.annotations.common \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
85 |
java.corba \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
86 |
java.transaction \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
87 |
java.xml.bind \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
88 |
java.xml.ws \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
89 |
# |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
90 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
91 |
AGGREGATOR_MODULES += \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
92 |
java.compact1 \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
93 |
java.compact2 \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
94 |
java.compact3 \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
95 |
java.se \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
96 |
java.se.ee \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
97 |
# |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
98 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
99 |
PLATFORM_MODULES += \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
100 |
$(UPGRADEABLE_MODULES) \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
101 |
$(AGGREGATOR_MODULES) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
102 |
# |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
103 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
104 |
PLATFORM_MODULES += \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
105 |
jdk.accessibility \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
106 |
jdk.crypto.ec \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
107 |
jdk.crypto.pkcs11 \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
108 |
jdk.dynalink \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
109 |
jdk.jsobject \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
110 |
jdk.xml.dom \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
111 |
jdk.localedata \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
112 |
jdk.naming.dns \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
113 |
jdk.scripting.nashorn \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
114 |
jdk.zipfs \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
115 |
# |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
116 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
117 |
JRE_TOOL_MODULES += \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
118 |
jdk.pack200 \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
119 |
jdk.scripting.nashorn.shell \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
120 |
# |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
121 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
122 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
123 |
PLATFORM_MODULES += jdk.crypto.mscapi |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
124 |
endif |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
125 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
126 |
PLATFORM_MODULES += jdk.crypto.ucrypto |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
127 |
endif |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
128 |
|
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
129 |
################################################################################ |
34116
b746e382da18
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
33045
diff
changeset
|
130 |
# Some platforms don't have the serviceability agent |
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
131 |
|
34116
b746e382da18
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
33045
diff
changeset
|
132 |
ifeq ($(INCLUDE_SA), false) |
b746e382da18
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
33045
diff
changeset
|
133 |
MODULES_FILTER += jdk.hotspot.agent |
b746e382da18
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
33045
diff
changeset
|
134 |
endif |
b746e382da18
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
33045
diff
changeset
|
135 |
|
b746e382da18
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
33045
diff
changeset
|
136 |
################################################################################ |
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
137 |
# Module list macros |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
138 |
|
36506 | 139 |
# Use append so that the custom extension may add to this variable |
140 |
||
141 |
ALL_TOP_SRC_DIRS += \ |
|
33045
00f484891bcf
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
30095
diff
changeset
|
142 |
$(HOTSPOT_TOPDIR)/src \ |
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
143 |
$(JDK_TOPDIR)/src \ |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
144 |
$(LANGTOOLS_TOPDIR)/src \ |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
145 |
$(CORBA_TOPDIR)/src \ |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
146 |
$(JAXP_TOPDIR)/src \ |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
147 |
$(JAXWS_TOPDIR)/src \ |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
148 |
$(NASHORN_TOPDIR)/src \ |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
149 |
# |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
150 |
|
36506 | 151 |
# Find all module-info.java files for the current build target platform and |
152 |
# configuration. |
|
153 |
# Param 1 - Module to find for, set to * for finding all |
|
154 |
FindAllModuleInfos = \ |
|
155 |
$(wildcard \ |
|
156 |
$(patsubst %,%/$(strip $1)/$(OPENJDK_TARGET_OS)/classes/module-info.java, $(ALL_TOP_SRC_DIRS)) \ |
|
157 |
$(patsubst %,%/$(strip $1)/$(OPENJDK_TARGET_OS_TYPE)/classes/module-info.java, $(ALL_TOP_SRC_DIRS)) \ |
|
158 |
$(patsubst %,%/$(strip $1)/share/classes/module-info.java, $(ALL_TOP_SRC_DIRS)) \ |
|
159 |
$(patsubst %,%/$(strip $1)/module-info.java, $(IMPORT_MODULES_SRC))) |
|
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
160 |
|
36506 | 161 |
# Extract the module names from the paths of module-info.java files. The |
162 |
# position of the module directory differs depending on if this is an imported |
|
163 |
# src dir or not. |
|
164 |
GetModuleNameFromModuleInfo = \ |
|
165 |
$(strip $(foreach mi, $1, \ |
|
166 |
$(if $(filter $(addsuffix %, $(IMPORT_MODULES_SRC)), $(mi)), \ |
|
167 |
$(notdir $(patsubst %/,%, $(dir $(mi)))), \ |
|
168 |
$(notdir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(mi))))))))))) |
|
169 |
||
170 |
# Find all modules by looking for module-info.java files and looking at parent |
|
171 |
# directories. |
|
172 |
FindAllModules = \ |
|
173 |
$(sort $(filter-out $(MODULES_FILTER), \ |
|
174 |
$(call GetModuleNameFromModuleInfo, $(MODULE_INFOS)))) |
|
175 |
||
176 |
FindImportedModules = \ |
|
177 |
$(if $(IMPORT_MODULES_CLASSES), $(notdir $(wildcard $(IMPORT_MODULES_CLASSES)/*))) |
|
26548 | 178 |
|
179 |
################################################################################ |
|
36506 | 180 |
# Extract module dependencies from module-info.java files. |
181 |
||
26548 | 182 |
MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk |
36506 | 183 |
|
184 |
MODULE_INFOS := $(call FindAllModuleInfos, *) |
|
185 |
||
186 |
$(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \ |
|
187 |
$(call DependOnVariable, MODULE_INFOS, $(MAKESUPPORT_OUTPUTDIR)/MODULE_INFOS.vardeps) |
|
188 |
$(MKDIR) -p $(@D) |
|
189 |
$(RM) $@ |
|
190 |
$(foreach m, $(MODULE_INFOS), \ |
|
191 |
( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) :=" && \ |
|
192 |
$(NAWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\ |
|
193 |
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \ |
|
194 |
/requires/ { sub(/;/, ""); \ |
|
195 |
sub(/requires/, ""); \ |
|
196 |
sub(/public/, ""); \ |
|
197 |
sub(/\/\/.*/, ""); \ |
|
198 |
sub(/\/\*.*\*\//, ""); \ |
|
199 |
gsub(/ /, ""); \ |
|
200 |
printf(" %s", $$0) } \ |
|
201 |
END { printf("\n") }' $m \ |
|
202 |
) >> $@ $(NEWLINE)) |
|
203 |
||
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
204 |
-include $(MODULE_DEPS_MAKEFILE) |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
205 |
|
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
206 |
# Param 1: Module to find deps for |
36506 | 207 |
FindDepsForModule = \ |
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
208 |
$(DEPS_$(strip $1)) |
36506 | 209 |
|
210 |
# Finds transitive dependencies in 3 levels. |
|
211 |
# Param 1: Module to find transitive deps for |
|
212 |
FindTransitiveDepsForModule = \ |
|
213 |
$(sort $(call FindDepsForModule, $1) \ |
|
214 |
$(foreach m, $(call FindDepsForModule, $1), \ |
|
215 |
$(call FindDepsForModule, $m) \ |
|
216 |
$(foreach n, $(call FindDepsForModule, $m), \ |
|
217 |
$(call FindDepsForModule, $n)))) |
|
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
218 |
|
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
219 |
################################################################################ |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
220 |
|
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
221 |
# Param 1 - Name of module |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
222 |
define ReadSingleImportMetaData |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
223 |
ifneq ($$(wildcard $(IMPORT_MODULES_MAKE)/$$(strip $1)/build.properties), ) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
224 |
classloader := |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
225 |
include_in_jre := |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
226 |
include_in_jdk := |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
227 |
include $(IMPORT_MODULES_MAKE)/$$(strip $1)/build.properties |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
228 |
ifeq ($$(include_in_jre), true) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
229 |
JRE_MODULES += $1 |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
230 |
endif |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
231 |
ifeq ($$(include_in_jdk), true) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
232 |
JDK_MODULES += $1 |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
233 |
endif |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
234 |
ifeq ($$(classloader), boot) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
235 |
BOOT_MODULES += $1 |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
236 |
else ifeq ($$(classloader), ext) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
237 |
PLATFORM_MODULES += $1 |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
238 |
endif |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
239 |
else |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
240 |
# Default to include in all |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
241 |
JRE_MODULES += $1 |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
242 |
JDK_MODULES += $1 |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
243 |
endif |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
244 |
endef |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
245 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
246 |
# Reading the imported modules metadata has a cost, so to make it available, |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
247 |
# a makefile needs to eval-call this macro first. After calling this, the |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
248 |
# following variables are populated with data from the imported modules: |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
249 |
# * JRE_MODULES |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
250 |
# * JDK_MODULES |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
251 |
# * BOOT_MODULES |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
252 |
# * PLATFORM_MODULES |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
253 |
# * JRE_TOOL_MODULES |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
254 |
define ReadImportMetaData |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
255 |
IMPORTED_MODULES := $(call FindImportedModules) |
36723
295e7ec5d8f9
8153217: javafx modules are not included in the jre
mchung
parents:
36545
diff
changeset
|
256 |
$(foreach m, $(IMPORTED_MODULES), $(eval $(call ReadSingleImportMetaData, $m))) |
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
257 |
endef |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
258 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
259 |
################################################################################ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
260 |
|
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
261 |
endif # _MODULES_GMK |