author | mlarsson |
Mon, 04 Apr 2016 09:59:57 +0200 | |
changeset 37240 | ddd59c67dc03 |
parent 36543 | a8ce27ddc757 |
child 36723 | 295e7ec5d8f9 |
permissions | -rw-r--r-- |
27560 | 1 |
# |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
30742
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 |
|
34116
b746e382da18
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
33437
diff
changeset
|
30 |
include Modules.gmk |
27560 | 31 |
|
32 |
TOOL_TARGETS := |
|
28356 | 33 |
JDK_TARGETS := |
27560 | 34 |
JRE_TARGETS := |
35 |
||
36 |
# Hook to include the corresponding custom file, if present. |
|
37 |
$(eval $(call IncludeCustomExtension, , Images-pre.gmk)) |
|
38 |
||
39 |
############################################################################ |
|
40 |
||
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
41 |
# All modules for the current target platform. |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
42 |
ALL_MODULES := $(call FindAllModules) |
27560 | 43 |
|
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
44 |
$(eval $(call ReadImportMetaData)) |
27560 | 45 |
|
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
46 |
JRE_MODULES += $(filter-out $(MODULES_FILTER), $(BOOT_MODULES) $(PLATFORM_MODULES) $(JRE_TOOL_MODULES)) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
47 |
JDK_MODULES += $(filter-out $(MODULES_FILTER), $(ALL_MODULES)) |
36506 | 48 |
|
49 |
# Compact builds have additional modules |
|
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
50 |
COMPACT1_EXTRA_MODULES := jdk.localedata jdk.crypto.pkcs11 jdk.crypto.ec |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
51 |
COMPACT2_EXTRA_MODULES := jdk.xml.dom jdk.httpserver |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
52 |
COMPACT3_EXTRA_MODULES := java.smartcardio jdk.management \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
53 |
jdk.naming.dns jdk.naming.rmi jdk.sctp jdk.security.auth |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
54 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
55 |
JRE_COMPACT1_MODULES := java.compact1 $(COMPACT1_EXTRA_MODULES) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
56 |
JRE_COMPACT2_MODULES := $(JRE_COMPACT1_MODULES) java.compact2 $(COMPACT2_EXTRA_MODULES) |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
57 |
JRE_COMPACT3_MODULES := $(JRE_COMPACT2_MODULES) java.compact3 $(COMPACT3_EXTRA_MODULES) |
27560 | 58 |
|
59 |
# Replacing double-comma with a single comma is to workaround the issue |
|
28356 | 60 |
# with some version of make on windows that doesn't substitute spaces |
27560 | 61 |
# with one comma properly as with make 4.0 |
36506 | 62 |
SubstComma = \ |
63 |
$(strip \ |
|
64 |
$(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) \ |
|
65 |
) |
|
66 |
||
27560 | 67 |
JRE_MODULES_LIST := $(call SubstComma, $(JRE_MODULES)) |
68 |
JDK_MODULES_LIST := $(call SubstComma, $(JDK_MODULES)) |
|
36506 | 69 |
JRE_COMPACT1_MODULES_LIST := $(call SubstComma, $(JRE_COMPACT1_MODULES)) |
70 |
JRE_COMPACT2_MODULES_LIST := $(call SubstComma, $(JRE_COMPACT2_MODULES)) |
|
71 |
JRE_COMPACT3_MODULES_LIST := $(call SubstComma, $(JRE_COMPACT3_MODULES)) |
|
72 |
||
73 |
################################################################################ |
|
74 |
# Release file |
|
75 |
||
76 |
BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release |
|
77 |
||
78 |
# Common way to emit a line into the release or info file |
|
79 |
define info-file-item # name value |
|
80 |
$(PRINTF) '%s="%s"\n' $1 $2 >> $@ |
|
81 |
endef |
|
82 |
||
83 |
# Param 1 - The file containing the MODULES list |
|
84 |
define create-info-file |
|
85 |
$(call info-file-item, "JAVA_VERSION", "$(VERSION_NUMBER)") |
|
86 |
$(call info-file-item, "JAVA_FULL_VERSION", "$(VERSION_STRING)") |
|
87 |
$(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)") |
|
88 |
$(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)") |
|
89 |
$(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)") |
|
90 |
$(if $(JDK_ARCH_ABI_PROP_NAME), \ |
|
91 |
$(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)")) |
|
92 |
$(call info-file-item, "SOURCE", "$(strip $(ALL_SOURCE_TIPS))") |
|
93 |
endef |
|
94 |
||
95 |
# Param 1 - The file containing the MODULES list |
|
96 |
define prepare-info-file |
|
97 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
98 |
$(MKDIR) -p $(@D) |
|
99 |
$(RM) $@ |
|
100 |
endef |
|
101 |
||
102 |
define info-file |
|
103 |
$(call prepare-info-file) |
|
104 |
$(call create-info-file) |
|
105 |
endef |
|
106 |
||
107 |
# Create a variable dependency file common for all release info files. |
|
108 |
INFO_FILE_VARDEPS := $(call DependOnVariable, create-info-file) |
|
109 |
||
110 |
ALL_SOURCE_TIPS = $(shell \ |
|
111 |
if [ -f $(SUPPORT_OUTPUTDIR)/source_tips ] ; then \ |
|
112 |
$(CAT) $(SUPPORT_OUTPUTDIR)/source_tips ; \ |
|
113 |
fi) |
|
114 |
||
115 |
$(BASE_RELEASE_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips |
|
116 |
$(info-file) |
|
27560 | 117 |
|
118 |
################################################################################ |
|
119 |
||
36506 | 120 |
JMODS := $(wildcard $(IMAGES_OUTPUTDIR)/jmods/*.jmod) |
27560 | 121 |
|
122 |
# Use this file inside the image as target for make rule |
|
123 |
JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX) |
|
124 |
||
36506 | 125 |
JLINK_TOOL := $(JLINK) --modulepath $(IMAGES_OUTPUTDIR)/jmods \ |
126 |
--endian $(OPENJDK_BUILD_CPU_ENDIAN) \ |
|
127 |
--release-info $(BASE_RELEASE_FILE) |
|
128 |
||
129 |
ifeq ($(JLINK_KEEP_PACKAGED_MODULES), true) |
|
130 |
JLINK_EXTRA_OPTS := --keep-packaged-modules $(JDK_IMAGE_DIR)/jmods |
|
131 |
endif |
|
132 |
||
133 |
$(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \ |
|
134 |
$(call DependOnVariable, JDK_MODULES_LIST) $(BASE_RELEASE_FILE) |
|
27560 | 135 |
$(ECHO) Creating jdk jimage |
36506 | 136 |
$(RM) -r $(JDK_IMAGE_DIR) |
137 |
$(JLINK_TOOL) --output $(JDK_IMAGE_DIR) \ |
|
138 |
--addmods $(JDK_MODULES_LIST) $(JLINK_EXTRA_OPTS) |
|
27560 | 139 |
$(TOUCH) $@ |
140 |
||
36506 | 141 |
$(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \ |
142 |
$(call DependOnVariable, JRE_MODULES_LIST) $(BASE_RELEASE_FILE) |
|
27560 | 143 |
$(ECHO) Creating jre jimage |
36506 | 144 |
$(RM) -r $(JRE_IMAGE_DIR) |
145 |
$(JLINK_TOOL) --output $(JRE_IMAGE_DIR) \ |
|
146 |
--addmods $(JRE_MODULES_LIST) |
|
27560 | 147 |
$(TOUCH) $@ |
148 |
||
149 |
JRE_COMPACT1_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact1 |
|
150 |
JRE_COMPACT2_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact2 |
|
151 |
JRE_COMPACT3_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact3 |
|
152 |
||
36506 | 153 |
$(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \ |
154 |
$(call DependOnVariable, JRE_COMPACT1_MODULES_LIST) $(BASE_RELEASE_FILE) |
|
27560 | 155 |
$(ECHO) Creating jre compact1 jimage |
36506 | 156 |
$(RM) -r $(JRE_COMPACT1_IMAGE_DIR) |
157 |
$(JLINK_TOOL) --addmods $(JRE_COMPACT1_MODULES_LIST) \ |
|
158 |
--output $(JRE_COMPACT1_IMAGE_DIR) |
|
27560 | 159 |
$(TOUCH) $@ |
160 |
||
36506 | 161 |
$(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \ |
162 |
$(call DependOnVariable, JRE_COMPACT2_MODULES_LIST) $(BASE_RELEASE_FILE) |
|
27560 | 163 |
$(ECHO) Creating jre compact2 jimage |
36506 | 164 |
$(RM) -r $(JRE_COMPACT2_IMAGE_DIR) |
165 |
$(JLINK_TOOL) --addmods $(JRE_COMPACT2_MODULES_LIST) \ |
|
166 |
--output $(JRE_COMPACT2_IMAGE_DIR) |
|
27560 | 167 |
$(TOUCH) $@ |
168 |
||
36506 | 169 |
$(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \ |
170 |
$(call DependOnVariable, JRE_COMPACT3_MODULES_LIST) $(BASE_RELEASE_FILE) |
|
27560 | 171 |
$(ECHO) Creating jre compact3 jimage |
36506 | 172 |
$(RM) -r $(JRE_COMPACT3_IMAGE_DIR) |
173 |
$(JLINK_TOOL) --addmods $(JRE_COMPACT3_MODULES_LIST) \ |
|
174 |
--output $(JRE_COMPACT3_IMAGE_DIR) |
|
27560 | 175 |
$(TOUCH) $@ |
176 |
||
177 |
TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
178 |
TOOL_JDK_TARGETS := $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
179 |
TOOL_JRE_COMPACT1_TARGETS := $(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
180 |
TOOL_JRE_COMPACT2_TARGETS := $(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
181 |
TOOL_JRE_COMPACT3_TARGETS := $(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
182 |
||
183 |
################################################################################ |
|
184 |
# /man dir |
|
185 |
# |
|
186 |
# All variables in this section are assigned with simple =, without :, to enable |
|
187 |
# more selective overriding from the custom version of this file. |
|
188 |
# |
|
189 |
# Avoid evaluating this whole section on windows for speed and stability |
|
190 |
ifneq ($(OPENJDK_TARGET_OS), windows) |
|
191 |
JRE_MAN_PAGES += \ |
|
192 |
java.1 \ |
|
193 |
jjs.1 \ |
|
194 |
keytool.1 \ |
|
195 |
orbd.1 \ |
|
196 |
pack200.1 \ |
|
197 |
rmid.1 \ |
|
198 |
rmiregistry.1 \ |
|
199 |
servertool.1 \ |
|
200 |
tnameserv.1 \ |
|
201 |
unpack200.1 |
|
202 |
||
203 |
ifndef OPENJDK |
|
204 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
|
205 |
JRE_MAN_PAGES += javaws.1 |
|
206 |
endif |
|
207 |
endif |
|
208 |
||
209 |
JDK_MAN_PAGES += \ |
|
210 |
$(JRE_MAN_PAGES) \ |
|
211 |
appletviewer.1 \ |
|
212 |
idlj.1 \ |
|
213 |
jar.1 \ |
|
214 |
jarsigner.1 \ |
|
215 |
javac.1 \ |
|
216 |
javadoc.1 \ |
|
217 |
javah.1 \ |
|
218 |
javap.1 \ |
|
219 |
jconsole.1 \ |
|
220 |
jcmd.1 \ |
|
221 |
jdb.1 \ |
|
222 |
jdeps.1 \ |
|
223 |
jinfo.1 \ |
|
224 |
jmap.1 \ |
|
225 |
jps.1 \ |
|
226 |
jrunscript.1 \ |
|
227 |
jsadebugd.1 \ |
|
228 |
jstack.1 \ |
|
229 |
jstat.1 \ |
|
230 |
jstatd.1 \ |
|
28898 | 231 |
policytool.1 \ |
27560 | 232 |
rmic.1 \ |
233 |
schemagen.1 \ |
|
234 |
serialver.1 \ |
|
235 |
wsgen.1 \ |
|
236 |
wsimport.1 \ |
|
237 |
xjc.1 |
|
238 |
||
239 |
# This variable is potentially overridden in the closed makefile. |
|
240 |
MAN_SRC_BASEDIR ?= $(JDK_TOPDIR)/src |
|
241 |
||
242 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
243 |
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/linux/doc |
|
244 |
MAN1_SUBDIR = man |
|
245 |
endif |
|
246 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
247 |
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/solaris/doc |
|
248 |
MAN1_SUBDIR = sun/man/man1 |
|
249 |
endif |
|
250 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
251 |
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/bsd/doc |
|
252 |
MAN1_SUBDIR = man |
|
253 |
endif |
|
254 |
||
255 |
$(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/% |
|
35008 | 256 |
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 257 |
$(install-file) |
258 |
||
259 |
$(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/% |
|
35008 | 260 |
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 261 |
$(install-file) |
262 |
||
263 |
$(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
35008 | 264 |
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
30093
c8c926543552
8077992: Eliminate JDK build dependency of native2ascii and update Japanese nroff man pages to UTF-8 encoding
ihse
parents:
30091
diff
changeset
|
265 |
$(install-file) |
27560 | 266 |
|
267 |
$(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
35008 | 268 |
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
30093
c8c926543552
8077992: Eliminate JDK build dependency of native2ascii and update Japanese nroff man pages to UTF-8 encoding
ihse
parents:
30091
diff
changeset
|
269 |
$(install-file) |
27560 | 270 |
|
271 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
272 |
$(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
35008 | 273 |
$(call LogInfo, Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 274 |
$(install-file) |
275 |
||
276 |
$(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
35008 | 277 |
$(call LogInfo, Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 278 |
$(install-file) |
279 |
endif |
|
280 |
||
281 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux macosx), ) |
|
282 |
$(JRE_IMAGE_DIR)/man/ja: |
|
35008 | 283 |
$(call LogInfo, Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 284 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
285 |
||
286 |
$(JDK_IMAGE_DIR)/man/ja: |
|
35008 | 287 |
$(call LogInfo, Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 288 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
289 |
endif |
|
290 |
||
291 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
292 |
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
|
293 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/, $(JRE_MAN_PAGES)) \ |
|
294 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
|
295 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JRE_MAN_PAGES)) |
|
296 |
||
297 |
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
|
298 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/, $(JDK_MAN_PAGES)) \ |
|
299 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
|
300 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES)) |
|
301 |
endif |
|
302 |
||
303 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux macosx), ) |
|
304 |
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
|
305 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
|
306 |
$(JRE_IMAGE_DIR)/man/ja |
|
307 |
||
308 |
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
|
309 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
|
310 |
$(JDK_IMAGE_DIR)/man/ja |
|
311 |
endif |
|
312 |
||
313 |
JRE_TARGETS += $(JRE_MAN_PAGE_LIST) |
|
314 |
JDK_TARGETS += $(JDK_MAN_PAGE_LIST) |
|
315 |
endif # Windows |
|
316 |
||
317 |
################################################################################ |
|
318 |
# /include dir |
|
319 |
||
320 |
$(eval $(call SetupCopyFiles,COPY_INCLUDES, \ |
|
321 |
SRC := $(JDK_OUTPUTDIR)/include, \ |
|
322 |
DEST := $(JDK_IMAGE_DIR)/include, \ |
|
323 |
FILES := $(call CacheFind,$(JDK_OUTPUTDIR)/include))) |
|
324 |
||
325 |
JDK_TARGETS += $(COPY_INCLUDES) |
|
326 |
||
327 |
################################################################################ |
|
328 |
# doc files |
|
329 |
||
330 |
JRE_DOC_FILES ?= LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
|
331 |
JDK_DOC_FILES ?= LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
|
332 |
JRE_DOC_LOCATION ?= $(JDK_TOPDIR) |
|
333 |
JDK_DOC_LOCATION ?= $(JDK_TOPDIR) |
|
334 |
||
335 |
JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/, $(JRE_DOC_FILES)) |
|
336 |
JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/, $(JDK_DOC_FILES)) |
|
337 |
||
338 |
# Processing license files from source area to image area |
|
339 |
# These are modified to have the platform specific EOL chars. |
|
340 |
define process-doc-file |
|
35008 | 341 |
$(call LogInfo, Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 342 |
$(MKDIR) -p $(@D) |
343 |
$(RM) $@ |
|
344 |
LC_ALL=C $(SED) 's/$$//g' $< > $@ |
|
345 |
$(CHMOD) 444 $@ |
|
346 |
endef |
|
347 |
||
348 |
$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/% |
|
349 |
$(process-doc-file) |
|
350 |
||
351 |
$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/% |
|
352 |
$(process-doc-file) |
|
353 |
||
354 |
JRE_TARGETS += $(JRE_DOC_TARGETS) |
|
355 |
JDK_TARGETS += $(JDK_DOC_TARGETS) |
|
356 |
||
357 |
################################################################################ |
|
358 |
# src.zip |
|
359 |
||
360 |
$(JDK_IMAGE_DIR)/src.zip: $(SUPPORT_OUTPUTDIR)/src.zip |
|
35008 | 361 |
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 362 |
$(install-file) |
363 |
||
364 |
JDK_TARGETS += $(JDK_IMAGE_DIR)/src.zip |
|
365 |
||
366 |
################################################################################ |
|
367 |
# /demo dir |
|
35008 | 368 |
ifneq ($(findstring images, $(MAKECMDGOALS)), ) |
369 |
$(eval $(call SetupCopyFiles, JDK_COPY_DEMOS, \ |
|
370 |
SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \ |
|
371 |
DEST := $(JDK_IMAGE_DIR)/demo, \ |
|
372 |
FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/demos/image), \ |
|
373 |
$(call DoubleDollar, $(call DoubleDollar, \ |
|
36506 | 374 |
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demos/image \ |
35008 | 375 |
-type f -a ! \( -name "_the*" -o -name "javac_state" \) )))), \ |
376 |
)) |
|
27560 | 377 |
|
35008 | 378 |
JDK_TARGETS += $(JDK_COPY_DEMOS) |
27560 | 379 |
endif |
380 |
||
381 |
################################################################################ |
|
382 |
# /sample dir |
|
383 |
||
36506 | 384 |
$(eval $(call SetupCopyFiles,COPY_SAMPLES, \ |
31310 | 385 |
SRC := $(SUPPORT_OUTPUTDIR)/sample/image, \ |
27560 | 386 |
DEST := $(JDK_IMAGE_DIR)/sample, \ |
31310 | 387 |
FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample/image), \ |
388 |
$(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample/image)))) |
|
27560 | 389 |
|
390 |
JDK_TARGETS += $(COPY_SAMPLES) |
|
391 |
||
392 |
################################################################################ |
|
393 |
# jrt-fs.jar |
|
394 |
||
395 |
$(eval $(call SetupCopyFiles,COPY_JRTFS_JAR, \ |
|
396 |
SRC := $(SUPPORT_OUTPUTDIR), \ |
|
397 |
DEST := $(JDK_IMAGE_DIR), \ |
|
398 |
FILES := $(SUPPORT_OUTPUTDIR)/jrt-fs.jar)) |
|
399 |
||
400 |
JDK_TARGETS += $(COPY_JRTFS_JAR) |
|
401 |
||
402 |
################################################################################ |
|
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
403 |
# Code coverage data files |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
404 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
405 |
ifeq ($(GCOV_ENABLED), true) |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
406 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
407 |
GCOV_FIND_EXPR := -type f -name "*.gcno" |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
408 |
|
29444
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
409 |
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_GCOV_GCNO, \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
410 |
SRC := $(OUTPUT_ROOT), \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
411 |
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
412 |
FILES := $(shell $(FIND) $(HOTSPOT_OUTPUTDIR) $(GCOV_FIND_EXPR)))) |
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
413 |
|
29444
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
414 |
SYMBOLS_TARGETS += $(COPY_HOTSPOT_GCOV_GCNO) |
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
415 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
416 |
$(eval $(call SetupCopyFiles,COPY_JDK_GCOV_GCNO, \ |
29444
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
417 |
SRC := $(OUTPUT_ROOT), \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
418 |
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \ |
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
419 |
FILES := $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/native $(GCOV_FIND_EXPR)))) |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
420 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
421 |
SYMBOLS_TARGETS += $(COPY_JDK_GCOV_GCNO) |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
422 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
423 |
endif |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
424 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
425 |
################################################################################ |
27560 | 426 |
|
427 |
# Include custom post hook here to make it possible to augment the target lists |
|
428 |
# before actual target prerequisites are declared. |
|
429 |
$(eval $(call IncludeCustomExtension, , Images-post.gmk)) |
|
430 |
||
431 |
################################################################################ |
|
432 |
||
433 |
$(JRE_TARGETS): $(TOOL_JRE_TARGETS) |
|
434 |
$(JDK_TARGETS): $(TOOL_JDK_TARGETS) |
|
435 |
||
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
436 |
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
|
437 |
$(SYMBOLS_TARGETS) |
27560 | 438 |
|
439 |
$(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS) |
|
440 |
$(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS) |
|
441 |
$(JRE_COMPACT3_TARGETS): $(TOOL_JRE_COMPACT3_TARGETS) |
|
442 |
||
443 |
profiles: $(TOOL_JRE_COMPACT1_TARGETS) \ |
|
444 |
$(TOOL_JRE_COMPACT2_TARGETS) \ |
|
445 |
$(TOOL_JRE_COMPACT3_TARGETS) \ |
|
446 |
$(JRE_COMPACT1_TARGETS) \ |
|
447 |
$(JRE_COMPACT2_TARGETS) \ |
|
448 |
$(JRE_COMPACT3_TARGETS) |
|
449 |
||
450 |
.PHONY: default all jimages profiles |