author | sla |
Fri, 28 Aug 2015 13:40:43 -0700 | |
changeset 32412 | b6d789b614fb |
parent 32261 | f9a63dc7cb4f |
child 33045 | 00f484891bcf |
child 33028 | 5520ed52f1c7 |
child 33940 | 5b88c1ce8c97 |
permissions | -rw-r--r-- |
27560 | 1 |
# |
29851
81a61a04e2fe
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
29444
diff
changeset
|
2 |
# Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved. |
27560 | 3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
# |
|
5 |
# This code is free software; you can redistribute it and/or modify it |
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
|
7 |
# published by the Free Software Foundation. Oracle designates this |
|
8 |
# particular file as subject to the "Classpath" exception as provided |
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
|
10 |
# |
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
24 |
# |
|
25 |
||
26 |
default: all |
|
27 |
||
28 |
include $(SPEC) |
|
29 |
include MakeBase.gmk |
|
30 |
||
31 |
TOOL_TARGETS := |
|
28356 | 32 |
JDK_TARGETS := |
27560 | 33 |
JRE_TARGETS := |
34 |
||
35 |
# Hook to include the corresponding custom file, if present. |
|
36 |
$(eval $(call IncludeCustomExtension, , Images-pre.gmk)) |
|
37 |
||
38 |
############################################################################ |
|
39 |
||
40 |
MAIN_MODULES += java.se java.smartcardio jdk.httpserver jdk.sctp \ |
|
31308
97ab382f3311
8078335: Re-examine jdk.accessibility/share/classes/com/sun/java/accessibility/util location
ptbrunet
parents:
30742
diff
changeset
|
41 |
jdk.security.auth jdk.security.jgss jdk.pack200 jdk.xml.dom \ |
32261
f9a63dc7cb4f
8134260: jjs in jre directory fails with "Could not find or load main class jdk.nashorn.tools.jjs.Main"
sundar
parents:
32173
diff
changeset
|
42 |
jdk.accessibility jdk.internal.le jdk.scripting.nashorn.shell |
27560 | 43 |
|
44 |
# providers |
|
45 |
PROVIDER_MODULES += jdk.charsets jdk.crypto.ec jdk.crypto.pkcs11 jdk.jvmstat jdk.localedata \ |
|
46 |
jdk.naming.dns jdk.naming.rmi jdk.scripting.nashorn jdk.zipfs |
|
47 |
||
48 |
# tools |
|
32261
f9a63dc7cb4f
8134260: jjs in jre directory fails with "Could not find or load main class jdk.nashorn.tools.jjs.Main"
sundar
parents:
32173
diff
changeset
|
49 |
TOOLS_MODULES += jdk.attach jdk.compiler jdk.dev \ |
32173 | 50 |
jdk.javadoc jdk.jcmd jdk.jconsole jdk.hotspot.agent jdk.jartool \ |
32067
ab09cdb2ccb8
8133347: Add makefiles support and basic session, persistence history navigation with jline
sundar
parents:
31512
diff
changeset
|
51 |
jdk.jdeps jdk.jdi jdk.jdwp.agent jdk.policytool jdk.rmic jdk.xml.bind jdk.xml.ws |
27560 | 52 |
|
53 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
54 |
PROVIDER_MODULES += jdk.crypto.mscapi |
|
55 |
endif |
|
56 |
||
57 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
58 |
PROVIDER_MODULES += jdk.crypto.ucrypto |
|
59 |
endif |
|
60 |
||
61 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
62 |
MAIN_MODULES += jdk.deploy.osx |
|
63 |
endif |
|
64 |
||
65 |
JRE_MODULES := $(MAIN_MODULES) $(PROVIDER_MODULES) |
|
66 |
JDK_MODULES := $(JRE_MODULES) $(TOOLS_MODULES) |
|
67 |
||
68 |
# compact3 builds have additional modules |
|
69 |
JDK_COMPACT3_MODULES := java.compact3 java.smartcardio jdk.httpserver jdk.naming.dns \ |
|
30085
936b85480edb
8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents:
29444
diff
changeset
|
70 |
jdk.naming.rmi jdk.sctp jdk.security.auth jdk.management |
27560 | 71 |
|
72 |
# Replacing double-comma with a single comma is to workaround the issue |
|
28356 | 73 |
# with some version of make on windows that doesn't substitute spaces |
27560 | 74 |
# with one comma properly as with make 4.0 |
75 |
define SubstComma |
|
76 |
$(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) |
|
77 |
endef |
|
78 |
JRE_MODULES_LIST := $(call SubstComma, $(JRE_MODULES)) |
|
79 |
JDK_MODULES_LIST := $(call SubstComma, $(JDK_MODULES)) |
|
80 |
||
81 |
################################################################################ |
|
82 |
||
83 |
JRE_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/jre-sorted-modules |
|
84 |
JDK_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/jdk-sorted-modules |
|
85 |
JRE_COMPACT1_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact1-sorted-modules |
|
86 |
JRE_COMPACT2_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact2-sorted-modules |
|
87 |
JRE_COMPACT3_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact3-sorted-modules |
|
88 |
||
89 |
||
90 |
MODULES_CMDS := $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped |
|
91 |
MODULES_LIBS := $(SUPPORT_OUTPUTDIR)/modules_libs-stripped |
|
92 |
MODULES_CONF := $(SUPPORT_OUTPUTDIR)/modules_conf |
|
93 |
||
94 |
JIMAGE_TOOL := $(JAVA_SMALL) \ |
|
95 |
-Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes \ |
|
96 |
-cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.tools.module.ImageBuilder \ |
|
97 |
--cmds $(MODULES_CMDS) \ |
|
98 |
--libs $(MODULES_LIBS) \ |
|
99 |
--configs $(MODULES_CONF) \ |
|
100 |
--classes $(JDK_OUTPUTDIR)/modules \ |
|
101 |
--endian $(OPENJDK_TARGET_CPU_ENDIAN) \ |
|
102 |
# |
|
103 |
||
104 |
MODULES_XML += $(SRC_ROOT)/modules.xml |
|
105 |
DEPENDENCIES := $(call CacheFind, \ |
|
106 |
$(SUPPORT_OUTPUTDIR)/modules_cmds \ |
|
31310 | 107 |
$(SUPPORT_OUTPUTDIR)/modules_conf \ |
27560 | 108 |
$(SUPPORT_OUTPUTDIR)/modules_libs) \ |
109 |
$(wildcard $(JDK_OUTPUTDIR)/modules/*/_*) \ |
|
110 |
$(MODULES_XML) |
|
111 |
# |
|
112 |
||
113 |
# Use this file inside the image as target for make rule |
|
114 |
JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX) |
|
115 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
116 |
$(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \ |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
117 |
$(call DependOnVariable, JDK_MODULES_LIST) |
27560 | 118 |
$(ECHO) Creating jdk jimage |
119 |
$(RM) -r $(JDK_IMAGE_DIR) $(JDK_SORTED_MODULES) |
|
120 |
$(JIMAGE_TOOL) --mods $(JDK_MODULES_LIST) --output $(JDK_IMAGE_DIR) \ |
|
121 |
$(MODULES_XML) > $(JDK_SORTED_MODULES) |
|
122 |
$(TOUCH) $@ |
|
123 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
124 |
$(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \ |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
125 |
$(call DependOnVariable, JRE_MODULES_LIST) |
27560 | 126 |
$(ECHO) Creating jre jimage |
127 |
$(RM) -r $(JRE_IMAGE_DIR) $(JRE_SORTED_MODULES) |
|
128 |
$(JIMAGE_TOOL) --mods $(JRE_MODULES_LIST) --output $(JRE_IMAGE_DIR) \ |
|
129 |
$(MODULES_XML) > $(JRE_SORTED_MODULES) |
|
130 |
$(TOUCH) $@ |
|
131 |
||
132 |
JRE_COMPACT1_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact1 |
|
133 |
JRE_COMPACT2_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact2 |
|
134 |
JRE_COMPACT3_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact3 |
|
135 |
||
136 |
COMPACT_EXTRA_MODULES := jdk.localedata jdk.crypto.pkcs11 jdk.crypto.ec |
|
137 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
138 |
$(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \ |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
139 |
$(call DependOnVariable, JRE_COMPACT1_MODULES_LIST) |
27560 | 140 |
$(ECHO) Creating jre compact1 jimage |
141 |
$(RM) -r $(JRE_COMPACT1_IMAGE_DIR) $(JRE_COMPACT1_SORTED_MODULES) |
|
142 |
$(JIMAGE_TOOL) \ |
|
143 |
--mods $(call SubstComma, java.compact1 $(COMPACT_EXTRA_MODULES)) \ |
|
144 |
--output $(JRE_COMPACT1_IMAGE_DIR) \ |
|
145 |
$(MODULES_XML) > $(JRE_COMPACT1_SORTED_MODULES) |
|
146 |
$(TOUCH) $@ |
|
147 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
148 |
$(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \ |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
149 |
$(call DependOnVariable, JRE_COMPACT2_MODULES_LIST) |
27560 | 150 |
$(ECHO) Creating jre compact2 jimage |
151 |
$(RM) -r $(JRE_COMPACT2_IMAGE_DIR) $(JRE_COMPACT2_SORTED_MODULES) |
|
152 |
$(JIMAGE_TOOL) \ |
|
153 |
--mods $(call SubstComma, java.compact2 $(COMPACT_EXTRA_MODULES)) \ |
|
154 |
--output $(JRE_COMPACT2_IMAGE_DIR) \ |
|
155 |
$(MODULES_XML) > $(JRE_COMPACT2_SORTED_MODULES) |
|
156 |
$(TOUCH) $@ |
|
157 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
158 |
$(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \ |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
159 |
$(call DependOnVariable, JRE_COMPACT3_MODULES_LIST) |
27560 | 160 |
$(ECHO) Creating jre compact3 jimage |
161 |
$(RM) -r $(JRE_COMPACT3_IMAGE_DIR) $(JRE_COMPACT3_SORTED_MODULES) |
|
162 |
$(JIMAGE_TOOL) \ |
|
163 |
--mods $(call SubstComma, $(JDK_COMPACT3_MODULES) $(COMPACT_EXTRA_MODULES)) \ |
|
164 |
--output $(JRE_COMPACT3_IMAGE_DIR) \ |
|
165 |
$(MODULES_XML) > $(JRE_COMPACT3_SORTED_MODULES) |
|
166 |
$(TOUCH) $@ |
|
167 |
||
168 |
TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
169 |
TOOL_JDK_TARGETS := $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
170 |
TOOL_JRE_COMPACT1_TARGETS := $(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
171 |
TOOL_JRE_COMPACT2_TARGETS := $(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
172 |
TOOL_JRE_COMPACT3_TARGETS := $(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
173 |
||
174 |
################################################################################ |
|
175 |
# /man dir |
|
176 |
# |
|
177 |
# All variables in this section are assigned with simple =, without :, to enable |
|
178 |
# more selective overriding from the custom version of this file. |
|
179 |
# |
|
180 |
# Avoid evaluating this whole section on windows for speed and stability |
|
181 |
ifneq ($(OPENJDK_TARGET_OS), windows) |
|
182 |
JRE_MAN_PAGES += \ |
|
183 |
java.1 \ |
|
184 |
jjs.1 \ |
|
185 |
keytool.1 \ |
|
186 |
orbd.1 \ |
|
187 |
pack200.1 \ |
|
188 |
rmid.1 \ |
|
189 |
rmiregistry.1 \ |
|
190 |
servertool.1 \ |
|
191 |
tnameserv.1 \ |
|
192 |
unpack200.1 |
|
193 |
||
194 |
ifndef OPENJDK |
|
195 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
|
196 |
JRE_MAN_PAGES += javaws.1 |
|
197 |
endif |
|
198 |
endif |
|
199 |
||
200 |
JDK_MAN_PAGES += \ |
|
201 |
$(JRE_MAN_PAGES) \ |
|
202 |
appletviewer.1 \ |
|
203 |
idlj.1 \ |
|
204 |
jar.1 \ |
|
205 |
jarsigner.1 \ |
|
206 |
javac.1 \ |
|
207 |
javadoc.1 \ |
|
208 |
javah.1 \ |
|
209 |
javap.1 \ |
|
210 |
jconsole.1 \ |
|
211 |
jcmd.1 \ |
|
212 |
jdb.1 \ |
|
213 |
jdeps.1 \ |
|
214 |
jinfo.1 \ |
|
215 |
jmap.1 \ |
|
216 |
jps.1 \ |
|
217 |
jrunscript.1 \ |
|
218 |
jsadebugd.1 \ |
|
219 |
jstack.1 \ |
|
220 |
jstat.1 \ |
|
221 |
jstatd.1 \ |
|
28898 | 222 |
policytool.1 \ |
27560 | 223 |
rmic.1 \ |
224 |
schemagen.1 \ |
|
225 |
serialver.1 \ |
|
226 |
wsgen.1 \ |
|
227 |
wsimport.1 \ |
|
228 |
xjc.1 |
|
229 |
||
230 |
# This variable is potentially overridden in the closed makefile. |
|
231 |
MAN_SRC_BASEDIR ?= $(JDK_TOPDIR)/src |
|
232 |
||
233 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
234 |
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/linux/doc |
|
235 |
MAN1_SUBDIR = man |
|
236 |
endif |
|
237 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
238 |
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/solaris/doc |
|
239 |
MAN1_SUBDIR = sun/man/man1 |
|
240 |
endif |
|
241 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
242 |
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/bsd/doc |
|
243 |
MAN1_SUBDIR = man |
|
244 |
endif |
|
245 |
||
246 |
$(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/% |
|
247 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
248 |
$(install-file) |
|
249 |
||
250 |
$(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/% |
|
251 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
252 |
$(install-file) |
|
253 |
||
254 |
$(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
30093
c8c926543552
8077992: Eliminate JDK build dependency of native2ascii and update Japanese nroff man pages to UTF-8 encoding
ihse
parents:
30091
diff
changeset
|
255 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
c8c926543552
8077992: Eliminate JDK build dependency of native2ascii and update Japanese nroff man pages to UTF-8 encoding
ihse
parents:
30091
diff
changeset
|
256 |
$(install-file) |
27560 | 257 |
|
258 |
$(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
30093
c8c926543552
8077992: Eliminate JDK build dependency of native2ascii and update Japanese nroff man pages to UTF-8 encoding
ihse
parents:
30091
diff
changeset
|
259 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
c8c926543552
8077992: Eliminate JDK build dependency of native2ascii and update Japanese nroff man pages to UTF-8 encoding
ihse
parents:
30091
diff
changeset
|
260 |
$(install-file) |
27560 | 261 |
|
262 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
263 |
$(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
264 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
265 |
$(install-file) |
|
266 |
||
267 |
$(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
268 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
269 |
$(install-file) |
|
270 |
endif |
|
271 |
||
272 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux macosx), ) |
|
273 |
$(JRE_IMAGE_DIR)/man/ja: |
|
274 |
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
275 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
|
276 |
||
277 |
$(JDK_IMAGE_DIR)/man/ja: |
|
278 |
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
279 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
|
280 |
endif |
|
281 |
||
282 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
283 |
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
|
284 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/, $(JRE_MAN_PAGES)) \ |
|
285 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
|
286 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JRE_MAN_PAGES)) |
|
287 |
||
288 |
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
|
289 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/, $(JDK_MAN_PAGES)) \ |
|
290 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
|
291 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES)) |
|
292 |
endif |
|
293 |
||
294 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux macosx), ) |
|
295 |
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
|
296 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
|
297 |
$(JRE_IMAGE_DIR)/man/ja |
|
298 |
||
299 |
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
|
300 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
|
301 |
$(JDK_IMAGE_DIR)/man/ja |
|
302 |
endif |
|
303 |
||
304 |
JRE_TARGETS += $(JRE_MAN_PAGE_LIST) |
|
305 |
JDK_TARGETS += $(JDK_MAN_PAGE_LIST) |
|
306 |
endif # Windows |
|
307 |
||
308 |
################################################################################ |
|
309 |
# /include dir |
|
310 |
||
311 |
$(eval $(call SetupCopyFiles,COPY_INCLUDES, \ |
|
312 |
SRC := $(JDK_OUTPUTDIR)/include, \ |
|
313 |
DEST := $(JDK_IMAGE_DIR)/include, \ |
|
314 |
FILES := $(call CacheFind,$(JDK_OUTPUTDIR)/include))) |
|
315 |
||
316 |
JDK_TARGETS += $(COPY_INCLUDES) |
|
317 |
||
318 |
################################################################################ |
|
319 |
# doc files |
|
320 |
||
321 |
JRE_DOC_FILES ?= LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
|
322 |
JDK_DOC_FILES ?= LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
|
323 |
JRE_DOC_LOCATION ?= $(JDK_TOPDIR) |
|
324 |
JDK_DOC_LOCATION ?= $(JDK_TOPDIR) |
|
325 |
||
326 |
JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/, $(JRE_DOC_FILES)) |
|
327 |
JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/, $(JDK_DOC_FILES)) |
|
328 |
||
329 |
# Processing license files from source area to image area |
|
330 |
# These are modified to have the platform specific EOL chars. |
|
331 |
define process-doc-file |
|
332 |
$(ECHO) $(LOG_INFO) Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
333 |
$(MKDIR) -p $(@D) |
|
334 |
$(RM) $@ |
|
335 |
LC_ALL=C $(SED) 's/$$//g' $< > $@ |
|
336 |
$(CHMOD) 444 $@ |
|
337 |
endef |
|
338 |
||
339 |
$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/% |
|
340 |
$(process-doc-file) |
|
341 |
||
342 |
$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/% |
|
343 |
$(process-doc-file) |
|
344 |
||
345 |
JRE_TARGETS += $(JRE_DOC_TARGETS) |
|
346 |
JDK_TARGETS += $(JDK_DOC_TARGETS) |
|
347 |
||
348 |
################################################################################ |
|
349 |
# Release file |
|
350 |
||
351 |
JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release |
|
352 |
JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release |
|
353 |
JRE_COMPACT1_INFO_FILE := $(JRE_COMPACT1_IMAGE_DIR)/release |
|
354 |
JRE_COMPACT2_INFO_FILE := $(JRE_COMPACT2_IMAGE_DIR)/release |
|
355 |
JRE_COMPACT3_INFO_FILE := $(JRE_COMPACT3_IMAGE_DIR)/release |
|
356 |
||
357 |
# Common way to emit a line into the release or info file |
|
358 |
define info-file-item # name value |
|
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
359 |
$(PRINTF) '%s="%s"\n' $1 $2 >> $@ |
27560 | 360 |
endef |
361 |
||
362 |
# Param 1 - The file containing the MODULES list |
|
363 |
define create-info-file |
|
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
364 |
$(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)") |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
365 |
$(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)") |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
366 |
$(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)") |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
367 |
$(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)") |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
368 |
$(if $(JDK_ARCH_ABI_PROP_NAME), \ |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
369 |
$(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)")) |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
370 |
$(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)") |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
371 |
$(call info-file-item, "MODULES", "`$(CAT) $1`") |
27560 | 372 |
endef |
373 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
374 |
# Param 1 - The file containing the MODULES list |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
375 |
define prepare-info-file |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
376 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
377 |
$(MKDIR) -p $(@D) |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
378 |
$(RM) $@ |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
379 |
endef |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
380 |
|
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
381 |
define info-file |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
382 |
$(call prepare-info-file, $1) |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
383 |
$(call create-info-file, $1) |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
384 |
endef |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
385 |
|
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
386 |
# Create a variable dependency file common for all release info files. The |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
387 |
# sorted module list will only change if the image is regenerated, which will |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
388 |
# trigger a rebuild of these files anyway. |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
389 |
INFO_FILE_VARDEPS := $(call DependOnVariable, create-info-file) |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
390 |
|
27560 | 391 |
ALL_SOURCE_TIPS = $(shell \ |
392 |
if [ -f $(SUPPORT_OUTPUTDIR)/source_tips ] ; then \ |
|
393 |
$(CAT) $(SUPPORT_OUTPUTDIR)/source_tips ; \ |
|
394 |
fi) |
|
395 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
396 |
$(JRE_INFO_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
397 |
$(call info-file, $(JRE_SORTED_MODULES)) |
27560 | 398 |
|
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
399 |
$(JDK_INFO_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
400 |
$(call info-file, $(JDK_SORTED_MODULES)) |
27560 | 401 |
|
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
402 |
$(JRE_COMPACT1_INFO_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
403 |
$(call info-file, $(JRE_COMPACT1_SORTED_MODULES)) |
27560 | 404 |
$(call info-file-item, "JAVA_PROFILE", "compact1") |
405 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
406 |
$(JRE_COMPACT2_INFO_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
407 |
$(call info-file, $(JRE_COMPACT2_SORTED_MODULES)) |
27560 | 408 |
$(call info-file-item, "JAVA_PROFILE", "compact2") |
409 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
410 |
$(JRE_COMPACT3_INFO_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
411 |
$(call info-file, $(JRE_COMPACT3_SORTED_MODULES)) |
27560 | 412 |
$(call info-file-item, "JAVA_PROFILE", "compact3") |
413 |
||
414 |
JRE_TARGETS += $(JRE_INFO_FILE) |
|
415 |
JDK_TARGETS += $(JDK_INFO_FILE) |
|
416 |
JRE_COMPACT1_TARGETS += $(JRE_COMPACT1_INFO_FILE) |
|
417 |
JRE_COMPACT2_TARGETS += $(JRE_COMPACT2_INFO_FILE) |
|
418 |
JRE_COMPACT3_TARGETS += $(JRE_COMPACT3_INFO_FILE) |
|
419 |
||
420 |
################################################################################ |
|
421 |
# src.zip |
|
422 |
||
423 |
$(JDK_IMAGE_DIR)/src.zip: $(SUPPORT_OUTPUTDIR)/src.zip |
|
424 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
425 |
$(install-file) |
|
426 |
||
427 |
JDK_TARGETS += $(JDK_IMAGE_DIR)/src.zip |
|
428 |
||
429 |
################################################################################ |
|
430 |
# /demo dir |
|
431 |
||
432 |
# The db demo contains an empty dir that needs to be copied. The other |
|
433 |
# directories will always trigger the rule for recompile since |
|
434 |
# _the.list_of_packages files are touched. |
|
435 |
ifneq ($(findstring images, $(MAKECMDGOALS)), ) |
|
436 |
$(JDK_IMAGE_DIR)/demo/%: $(SUPPORT_OUTPUTDIR)/demo/image/% |
|
437 |
if [ ! -d "$@" ]; then \ |
|
438 |
$(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \ |
|
439 |
$(MKDIR) -p $(@D); \ |
|
440 |
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) '$<' '$@'; fi \ |
|
441 |
fi |
|
442 |
||
443 |
# Find all files including directories |
|
444 |
JDK_DEMO_TARGETS := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/demo/image), \ |
|
445 |
$(patsubst $(SUPPORT_OUTPUTDIR)/demo/image/%, $(JDK_IMAGE_DIR)/demo/%, \ |
|
446 |
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demo/image \ |
|
447 |
! \( -name "_the*" -o -name "javac_state" \) ))) |
|
448 |
||
449 |
JDK_TARGETS += $(JDK_DEMO_TARGETS) |
|
450 |
endif |
|
451 |
||
452 |
################################################################################ |
|
453 |
# /sample dir |
|
454 |
||
455 |
$(eval $(call SetupCopyFiles,COPY_SAMPLES, \ |
|
31310 | 456 |
SRC := $(SUPPORT_OUTPUTDIR)/sample/image, \ |
27560 | 457 |
DEST := $(JDK_IMAGE_DIR)/sample, \ |
31310 | 458 |
FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample/image), \ |
459 |
$(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample/image)))) |
|
27560 | 460 |
|
461 |
JDK_TARGETS += $(COPY_SAMPLES) |
|
462 |
||
463 |
################################################################################ |
|
464 |
# jrt-fs.jar |
|
465 |
||
466 |
$(eval $(call SetupCopyFiles,COPY_JRTFS_JAR, \ |
|
467 |
SRC := $(SUPPORT_OUTPUTDIR), \ |
|
468 |
DEST := $(JDK_IMAGE_DIR), \ |
|
469 |
FILES := $(SUPPORT_OUTPUTDIR)/jrt-fs.jar)) |
|
470 |
||
471 |
JDK_TARGETS += $(COPY_JRTFS_JAR) |
|
472 |
||
473 |
################################################################################ |
|
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
474 |
# Code coverage data files |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
475 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
476 |
ifeq ($(GCOV_ENABLED), true) |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
477 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
478 |
GCOV_FIND_EXPR := -type f -name "*.gcno" |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
479 |
|
29444
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
480 |
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_GCOV_GCNO, \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
481 |
SRC := $(OUTPUT_ROOT), \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
482 |
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
483 |
FILES := $(shell $(FIND) $(HOTSPOT_OUTPUTDIR) $(GCOV_FIND_EXPR)))) |
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
484 |
|
29444
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
485 |
SYMBOLS_TARGETS += $(COPY_HOTSPOT_GCOV_GCNO) |
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
486 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
487 |
$(eval $(call SetupCopyFiles,COPY_JDK_GCOV_GCNO, \ |
29444
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
488 |
SRC := $(OUTPUT_ROOT), \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
489 |
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \ |
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
490 |
FILES := $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/native $(GCOV_FIND_EXPR)))) |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
491 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
492 |
SYMBOLS_TARGETS += $(COPY_JDK_GCOV_GCNO) |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
493 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
494 |
endif |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
495 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
496 |
################################################################################ |
27560 | 497 |
|
498 |
# Include custom post hook here to make it possible to augment the target lists |
|
499 |
# before actual target prerequisites are declared. |
|
500 |
$(eval $(call IncludeCustomExtension, , Images-post.gmk)) |
|
501 |
||
502 |
################################################################################ |
|
503 |
||
504 |
$(JRE_TARGETS): $(TOOL_JRE_TARGETS) |
|
505 |
$(JDK_TARGETS): $(TOOL_JDK_TARGETS) |
|
506 |
||
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
507 |
jimages: $(TOOL_JRE_TARGETS) $(TOOL_JDK_TARGETS) $(JRE_TARGETS) $(JDK_TARGETS) \ |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
508 |
$(SYMBOLS_TARGETS) |
27560 | 509 |
|
510 |
||
511 |
$(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS) |
|
512 |
$(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS) |
|
513 |
$(JRE_COMPACT3_TARGETS): $(TOOL_JRE_COMPACT3_TARGETS) |
|
514 |
||
515 |
profiles: $(TOOL_JRE_COMPACT1_TARGETS) \ |
|
516 |
$(TOOL_JRE_COMPACT2_TARGETS) \ |
|
517 |
$(TOOL_JRE_COMPACT3_TARGETS) \ |
|
518 |
$(JRE_COMPACT1_TARGETS) \ |
|
519 |
$(JRE_COMPACT2_TARGETS) \ |
|
520 |
$(JRE_COMPACT3_TARGETS) |
|
521 |
||
522 |
.PHONY: default all jimages profiles |