author | sundar |
Wed, 18 May 2016 15:04:39 +0530 | |
changeset 37973 | 922326ad0c94 |
parent 37770 | 9f040cf69078 |
child 37975 | 551c5d86de79 |
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 := |
37764
63e0379dd186
8154956: Module system implementation refresh (4/2016)
alanb
parents:
37030
diff
changeset
|
41 |
UPGRADEABLE_MODULES := |
63e0379dd186
8154956: Module system implementation refresh (4/2016)
alanb
parents:
37030
diff
changeset
|
42 |
AGGREGATOR_MODULES := |
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
43 |
|
36506 | 44 |
# Hook to include the corresponding custom file, if present. |
45 |
$(eval $(call IncludeCustomExtension, , common/Modules.gmk)) |
|
46 |
||
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
47 |
BOOT_MODULES += \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
48 |
java.base \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
49 |
java.datatransfer \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
50 |
java.desktop \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
51 |
java.httpclient \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
52 |
java.instrument \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
53 |
java.logging \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
54 |
java.management \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
55 |
java.naming \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
56 |
java.prefs \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
57 |
java.rmi \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
58 |
java.security.jgss \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
59 |
java.security.sasl \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
60 |
java.sql \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
61 |
java.xml \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
62 |
java.xml.crypto \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
63 |
jdk.httpserver \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
64 |
jdk.management \ |
37650
ef6c24163cb2
8044773: Refactor jdk.net API so that it can be moved out of the base module
chegar
parents:
37030
diff
changeset
|
65 |
jdk.net \ |
36543
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 \ |
36793 | 69 |
jdk.unsupported \ |
36545
91a564aa5e89
8152697: JVMCI tests fail with UnsatisfiedLinkError as jdk.vm.ci not defined by boot loader
mchung
parents:
36543
diff
changeset
|
70 |
jdk.vm.ci \ |
36543
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 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
73 |
# to be deprivileged |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
74 |
BOOT_MODULES += \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
75 |
java.sql.rowset \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
76 |
java.smartcardio \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
77 |
jdk.naming.rmi \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
78 |
# |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
79 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
80 |
UPGRADEABLE_MODULES += \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
81 |
java.activation \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
82 |
java.annotations.common \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
83 |
java.corba \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
84 |
java.transaction \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
85 |
java.xml.bind \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
86 |
java.xml.ws \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
87 |
# |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
88 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
89 |
AGGREGATOR_MODULES += \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
90 |
java.compact1 \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
91 |
java.compact2 \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
92 |
java.compact3 \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
93 |
java.se \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
94 |
java.se.ee \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
95 |
# |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
96 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
97 |
PLATFORM_MODULES += \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
98 |
$(UPGRADEABLE_MODULES) \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
99 |
$(AGGREGATOR_MODULES) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
100 |
# |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
101 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
102 |
PLATFORM_MODULES += \ |
37768 | 103 |
java.compiler \ |
37973 | 104 |
java.scripting \ |
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
105 |
jdk.accessibility \ |
37769 | 106 |
jdk.charsets \ |
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
107 |
jdk.crypto.ec \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
108 |
jdk.crypto.pkcs11 \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
109 |
jdk.dynalink \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
110 |
jdk.jsobject \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
111 |
jdk.xml.dom \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
112 |
jdk.localedata \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
113 |
jdk.naming.dns \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
114 |
jdk.scripting.nashorn \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
115 |
jdk.zipfs \ |
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 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
118 |
JRE_TOOL_MODULES += \ |
36790 | 119 |
jdk.jdwp.agent \ |
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
120 |
jdk.pack200 \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
121 |
jdk.scripting.nashorn.shell \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
122 |
# |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
123 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
124 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
125 |
PLATFORM_MODULES += jdk.crypto.mscapi |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
126 |
endif |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
127 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
128 |
PLATFORM_MODULES += jdk.crypto.ucrypto |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
129 |
endif |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
130 |
|
37770 | 131 |
# These modules are included in the interim image which is used to run profiling |
132 |
# before building the real images. |
|
133 |
INTERIM_IMAGE_MODULES := java.base java.logging |
|
134 |
||
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
135 |
################################################################################ |
34116
b746e382da18
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
33045
diff
changeset
|
136 |
# 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
|
137 |
|
34116
b746e382da18
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
33045
diff
changeset
|
138 |
ifeq ($(INCLUDE_SA), false) |
b746e382da18
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
33045
diff
changeset
|
139 |
MODULES_FILTER += jdk.hotspot.agent |
b746e382da18
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
33045
diff
changeset
|
140 |
endif |
b746e382da18
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
33045
diff
changeset
|
141 |
|
b746e382da18
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
33045
diff
changeset
|
142 |
################################################################################ |
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
143 |
# Module list macros |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
144 |
|
37030 | 145 |
# Use append so that the custom extension may add to these variables |
36506 | 146 |
|
37030 | 147 |
GENERATED_SRC_DIRS += \ |
148 |
$(SUPPORT_OUTPUTDIR)/gensrc \ |
|
149 |
# |
|
150 |
||
151 |
TOP_SRC_DIRS += \ |
|
152 |
$(CORBA_TOPDIR)/src \ |
|
33045
00f484891bcf
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
30095
diff
changeset
|
153 |
$(HOTSPOT_TOPDIR)/src \ |
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
154 |
$(JDK_TOPDIR)/src \ |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
155 |
$(LANGTOOLS_TOPDIR)/src \ |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
156 |
$(JAXP_TOPDIR)/src \ |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
157 |
$(JAXWS_TOPDIR)/src \ |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
158 |
$(NASHORN_TOPDIR)/src \ |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
159 |
# |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
160 |
|
37030 | 161 |
SRC_SUBDIRS += $(OPENJDK_TARGET_OS)/classes |
162 |
ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE)) |
|
163 |
SRC_SUBDIRS += $(OPENJDK_TARGET_OS_TYPE)/classes |
|
164 |
endif |
|
165 |
SRC_SUBDIRS += share/classes |
|
166 |
||
36506 | 167 |
# Find all module-info.java files for the current build target platform and |
168 |
# configuration. |
|
169 |
# Param 1 - Module to find for, set to * for finding all |
|
170 |
FindAllModuleInfos = \ |
|
171 |
$(wildcard \ |
|
37030 | 172 |
$(foreach sub, $(SRC_SUBDIRS), \ |
173 |
$(patsubst %,%/$(strip $1)/$(sub)/module-info.java, $(TOP_SRC_DIRS))) \ |
|
36506 | 174 |
$(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
|
175 |
|
36506 | 176 |
# Extract the module names from the paths of module-info.java files. The |
177 |
# position of the module directory differs depending on if this is an imported |
|
178 |
# src dir or not. |
|
179 |
GetModuleNameFromModuleInfo = \ |
|
180 |
$(strip $(foreach mi, $1, \ |
|
181 |
$(if $(filter $(addsuffix %, $(IMPORT_MODULES_SRC)), $(mi)), \ |
|
182 |
$(notdir $(patsubst %/,%, $(dir $(mi)))), \ |
|
183 |
$(notdir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(mi))))))))))) |
|
184 |
||
185 |
# Find all modules by looking for module-info.java files and looking at parent |
|
186 |
# directories. |
|
187 |
FindAllModules = \ |
|
188 |
$(sort $(filter-out $(MODULES_FILTER), \ |
|
189 |
$(call GetModuleNameFromModuleInfo, $(MODULE_INFOS)))) |
|
190 |
||
191 |
FindImportedModules = \ |
|
37652
67e98335455c
8155629: MODULES_FILTER should apply to imported modules
erikj
parents:
37650
diff
changeset
|
192 |
$(filter-out $(MODULES_FILTER), \ |
67e98335455c
8155629: MODULES_FILTER should apply to imported modules
erikj
parents:
37650
diff
changeset
|
193 |
$(if $(IMPORT_MODULES_CLASSES), $(notdir $(wildcard $(IMPORT_MODULES_CLASSES)/*)))) |
26548 | 194 |
|
37030 | 195 |
# Find all source dirs for a particular module |
196 |
# $1 - Module to find source dirs for |
|
197 |
FindModuleSrcDirs = \ |
|
198 |
$(strip $(wildcard \ |
|
199 |
$(addsuffix /$(strip $1), $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \ |
|
200 |
$(foreach sub, $(SRC_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS))))) |
|
201 |
||
202 |
# Construct the complete module source path |
|
203 |
GetModuleSrcPath = \ |
|
204 |
$(call PathList, \ |
|
205 |
$(addsuffix /*, $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \ |
|
206 |
$(foreach sub, $(SRC_SUBDIRS), $(addsuffix /*/$(sub), $(TOP_SRC_DIRS)))) |
|
207 |
||
26548 | 208 |
################################################################################ |
36506 | 209 |
# Extract module dependencies from module-info.java files. |
210 |
||
26548 | 211 |
MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk |
36506 | 212 |
|
213 |
MODULE_INFOS := $(call FindAllModuleInfos, *) |
|
214 |
||
215 |
$(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \ |
|
216 |
$(call DependOnVariable, MODULE_INFOS, $(MAKESUPPORT_OUTPUTDIR)/MODULE_INFOS.vardeps) |
|
217 |
$(MKDIR) -p $(@D) |
|
218 |
$(RM) $@ |
|
219 |
$(foreach m, $(MODULE_INFOS), \ |
|
220 |
( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) :=" && \ |
|
221 |
$(NAWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\ |
|
222 |
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \ |
|
223 |
/requires/ { sub(/;/, ""); \ |
|
224 |
sub(/requires/, ""); \ |
|
225 |
sub(/public/, ""); \ |
|
226 |
sub(/\/\/.*/, ""); \ |
|
227 |
sub(/\/\*.*\*\//, ""); \ |
|
228 |
gsub(/ /, ""); \ |
|
229 |
printf(" %s", $$0) } \ |
|
230 |
END { printf("\n") }' $m \ |
|
231 |
) >> $@ $(NEWLINE)) |
|
232 |
||
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
233 |
-include $(MODULE_DEPS_MAKEFILE) |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
234 |
|
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
235 |
# Param 1: Module to find deps for |
36506 | 236 |
FindDepsForModule = \ |
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
237 |
$(DEPS_$(strip $1)) |
36506 | 238 |
|
239 |
# Finds transitive dependencies in 3 levels. |
|
240 |
# Param 1: Module to find transitive deps for |
|
241 |
FindTransitiveDepsForModule = \ |
|
242 |
$(sort $(call FindDepsForModule, $1) \ |
|
243 |
$(foreach m, $(call FindDepsForModule, $1), \ |
|
244 |
$(call FindDepsForModule, $m) \ |
|
245 |
$(foreach n, $(call FindDepsForModule, $m), \ |
|
246 |
$(call FindDepsForModule, $n)))) |
|
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
247 |
|
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
248 |
################################################################################ |
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
249 |
|
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
250 |
# Param 1 - Name of module |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
251 |
define ReadSingleImportMetaData |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
252 |
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
|
253 |
classloader := |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
254 |
include_in_jre := |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
255 |
include_in_jdk := |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
256 |
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
|
257 |
ifeq ($$(include_in_jre), true) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
258 |
JRE_MODULES += $1 |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
259 |
endif |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
260 |
ifeq ($$(include_in_jdk), true) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
261 |
JDK_MODULES += $1 |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
262 |
endif |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
263 |
ifeq ($$(classloader), boot) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
264 |
BOOT_MODULES += $1 |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
265 |
else ifeq ($$(classloader), ext) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
266 |
PLATFORM_MODULES += $1 |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
267 |
endif |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
268 |
else |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
269 |
# Default to include in all |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
270 |
JRE_MODULES += $1 |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
271 |
JDK_MODULES += $1 |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
272 |
endif |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
273 |
endef |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
274 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
275 |
# 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
|
276 |
# 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
|
277 |
# 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
|
278 |
# * JRE_MODULES |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
279 |
# * JDK_MODULES |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
280 |
# * BOOT_MODULES |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
281 |
# * PLATFORM_MODULES |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
282 |
# * JRE_TOOL_MODULES |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
283 |
define ReadImportMetaData |
36725 | 284 |
IMPORTED_MODULES := $$(call FindImportedModules) |
285 |
$$(foreach m, $$(IMPORTED_MODULES), \ |
|
286 |
$$(eval $$(call ReadSingleImportMetaData, $$m))) |
|
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
287 |
endef |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
288 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
289 |
################################################################################ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
290 |
|
26116
f051bd253364
8055095: Improve "do nothing" incremental build performance after modularized source code integration
erikj
parents:
diff
changeset
|
291 |
endif # _MODULES_GMK |