author | avstepan |
Wed, 21 Dec 2016 17:34:41 +0300 | |
changeset 43074 | 7f676353195d |
parent 42293 | 934a28f5800a |
child 42524 | c741ed52f9a6 |
child 42505 | 11439b0c0792 |
permissions | -rw-r--r-- |
27560 | 1 |
# |
39954 | 2 |
# Copyright (c) 2014, 2016, 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 |
|
36725 | 44 |
$(eval $(call ReadImportMetaData)) |
27560 | 45 |
|
37978
2614022b9fa5
8157348: Build fails with certain source configurations
erikj
parents:
37865
diff
changeset
|
46 |
JRE_MODULES += $(filter $(ALL_MODULES), $(BOOT_MODULES) \ |
2614022b9fa5
8157348: Build fails with certain source configurations
erikj
parents:
37865
diff
changeset
|
47 |
$(PLATFORM_MODULES) $(JRE_TOOL_MODULES)) |
2614022b9fa5
8157348: Build fails with certain source configurations
erikj
parents:
37865
diff
changeset
|
48 |
JDK_MODULES += $(ALL_MODULES) |
36506 | 49 |
|
50 |
# Compact builds have additional modules |
|
42293
934a28f5800a
8168924: Add jdk.unsupported to the compact profile builds
erikj
parents:
42292
diff
changeset
|
51 |
COMPACT1_EXTRA_MODULES := jdk.localedata jdk.crypto.pkcs11 jdk.crypto.ec \ |
934a28f5800a
8168924: Add jdk.unsupported to the compact profile builds
erikj
parents:
42292
diff
changeset
|
52 |
jdk.unsupported |
36543
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
53 |
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
|
54 |
COMPACT3_EXTRA_MODULES := java.smartcardio jdk.management \ |
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
55 |
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
|
56 |
|
a8ce27ddc757
8152197: Single place to specify module-specific information for images build
mchung
parents:
36506
diff
changeset
|
57 |
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
|
58 |
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
|
59 |
JRE_COMPACT3_MODULES := $(JRE_COMPACT2_MODULES) java.compact3 $(COMPACT3_EXTRA_MODULES) |
27560 | 60 |
|
37770 | 61 |
JRE_MODULES_LIST := $(call CommaList, $(JRE_MODULES)) |
62 |
JDK_MODULES_LIST := $(call CommaList, $(JDK_MODULES)) |
|
63 |
JRE_COMPACT1_MODULES_LIST := $(call CommaList, $(JRE_COMPACT1_MODULES)) |
|
64 |
JRE_COMPACT2_MODULES_LIST := $(call CommaList, $(JRE_COMPACT2_MODULES)) |
|
65 |
JRE_COMPACT3_MODULES_LIST := $(call CommaList, $(JRE_COMPACT3_MODULES)) |
|
36506 | 66 |
|
67 |
################################################################################ |
|
68 |
||
69 |
BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release |
|
70 |
||
71 |
JMODS := $(wildcard $(IMAGES_OUTPUTDIR)/jmods/*.jmod) |
|
27560 | 72 |
|
73 |
# Use this file inside the image as target for make rule |
|
74 |
JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX) |
|
75 |
||
38845
6d03072cdab8
8158402: jlink: should use regex for all pattern operations (--order-resources or --exclude-resources)
jlaskey
parents:
38546
diff
changeset
|
76 |
JLINK_ORDER_RESOURCES := **module-info.class |
40612
cec3daf6324a
8164858: Enable build-time use of java.lang.invoke resolve tracing
redestad
parents:
40241
diff
changeset
|
77 |
JLINK_JLI_CLASSES := |
38546
91a5c3430d4f
8157336: Generation of classlists at build time should be configurable
erikj
parents:
37978
diff
changeset
|
78 |
ifeq ($(ENABLE_GENERATE_CLASSLIST), true) |
41874
07c3c4f1eb63
8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
41532
diff
changeset
|
79 |
JLINK_ORDER_RESOURCES += @$(SUPPORT_OUTPUTDIR)/link_opt/classlist |
07c3c4f1eb63
8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
41532
diff
changeset
|
80 |
JLINK_JLI_CLASSES := --generate-jli-classes=@$(SUPPORT_OUTPUTDIR)/link_opt/jli_trace.out |
38546
91a5c3430d4f
8157336: Generation of classlists at build time should be configurable
erikj
parents:
37978
diff
changeset
|
81 |
endif |
91a5c3430d4f
8157336: Generation of classlists at build time should be configurable
erikj
parents:
37978
diff
changeset
|
82 |
JLINK_ORDER_RESOURCES += \ |
38845
6d03072cdab8
8158402: jlink: should use regex for all pattern operations (--order-resources or --exclude-resources)
jlaskey
parents:
38546
diff
changeset
|
83 |
/java.base/java/** \ |
6d03072cdab8
8158402: jlink: should use regex for all pattern operations (--order-resources or --exclude-resources)
jlaskey
parents:
38546
diff
changeset
|
84 |
/java.base/jdk/** \ |
6d03072cdab8
8158402: jlink: should use regex for all pattern operations (--order-resources or --exclude-resources)
jlaskey
parents:
38546
diff
changeset
|
85 |
/java.base/sun/** \ |
6d03072cdab8
8158402: jlink: should use regex for all pattern operations (--order-resources or --exclude-resources)
jlaskey
parents:
38546
diff
changeset
|
86 |
/java.base/com/** \ |
6d03072cdab8
8158402: jlink: should use regex for all pattern operations (--order-resources or --exclude-resources)
jlaskey
parents:
38546
diff
changeset
|
87 |
/jdk.localedata/** \ |
37865
94ea10488f02
8156756: Enable build-time use of resource ordering plugin
redestad
parents:
37770
diff
changeset
|
88 |
# |
94ea10488f02
8156756: Enable build-time use of resource ordering plugin
redestad
parents:
37770
diff
changeset
|
89 |
|
42287
925cf8cf736c
8160359: Improve jlink logging for cases when a plugin throws exception
sundar
parents:
42286
diff
changeset
|
90 |
JLINK_TOOL := $(JLINK) -J-Djlink.debug=true \ |
925cf8cf736c
8160359: Improve jlink logging for cases when a plugin throws exception
sundar
parents:
42286
diff
changeset
|
91 |
--module-path $(IMAGES_OUTPUTDIR)/jmods \ |
38546
91a5c3430d4f
8157336: Generation of classlists at build time should be configurable
erikj
parents:
37978
diff
changeset
|
92 |
--endian $(OPENJDK_BUILD_CPU_ENDIAN) \ |
91a5c3430d4f
8157336: Generation of classlists at build time should be configurable
erikj
parents:
37978
diff
changeset
|
93 |
--release-info $(BASE_RELEASE_FILE) \ |
91a5c3430d4f
8157336: Generation of classlists at build time should be configurable
erikj
parents:
37978
diff
changeset
|
94 |
--order-resources=$(call CommaList, $(JLINK_ORDER_RESOURCES)) \ |
40612
cec3daf6324a
8164858: Enable build-time use of java.lang.invoke resolve tracing
redestad
parents:
40241
diff
changeset
|
95 |
$(JLINK_JLI_CLASSES) \ |
38546
91a5c3430d4f
8157336: Generation of classlists at build time should be configurable
erikj
parents:
37978
diff
changeset
|
96 |
# |
36506 | 97 |
|
42140
a2ea75dd99dc
8170280: Enable -g for all java compilation in the build
erikj
parents:
41875
diff
changeset
|
98 |
JLINK_JRE_EXTRA_OPTS := --no-man-pages --no-header-files --strip-debug |
41532
76dffc133464
8167558: Add new JMOD section for header files and man pages
mchung
parents:
41458
diff
changeset
|
99 |
|
36506 | 100 |
ifeq ($(JLINK_KEEP_PACKAGED_MODULES), true) |
41532
76dffc133464
8167558: Add new JMOD section for header files and man pages
mchung
parents:
41458
diff
changeset
|
101 |
JLINK_JDK_EXTRA_OPTS := --keep-packaged-modules $(JDK_IMAGE_DIR)/jmods |
36506 | 102 |
endif |
103 |
||
104 |
$(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \ |
|
105 |
$(call DependOnVariable, JDK_MODULES_LIST) $(BASE_RELEASE_FILE) |
|
27560 | 106 |
$(ECHO) Creating jdk jimage |
36506 | 107 |
$(RM) -r $(JDK_IMAGE_DIR) |
41532
76dffc133464
8167558: Add new JMOD section for header files and man pages
mchung
parents:
41458
diff
changeset
|
108 |
$(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \ |
41874
07c3c4f1eb63
8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
41532
diff
changeset
|
109 |
$(JLINK_JDK_EXTRA_OPTS) \ |
41532
76dffc133464
8167558: Add new JMOD section for header files and man pages
mchung
parents:
41458
diff
changeset
|
110 |
--output $(JDK_IMAGE_DIR) |
27560 | 111 |
$(TOUCH) $@ |
112 |
||
36506 | 113 |
$(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \ |
114 |
$(call DependOnVariable, JRE_MODULES_LIST) $(BASE_RELEASE_FILE) |
|
27560 | 115 |
$(ECHO) Creating jre jimage |
36506 | 116 |
$(RM) -r $(JRE_IMAGE_DIR) |
41532
76dffc133464
8167558: Add new JMOD section for header files and man pages
mchung
parents:
41458
diff
changeset
|
117 |
$(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \ |
76dffc133464
8167558: Add new JMOD section for header files and man pages
mchung
parents:
41458
diff
changeset
|
118 |
$(JLINK_JRE_EXTRA_OPTS) \ |
41874
07c3c4f1eb63
8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
41532
diff
changeset
|
119 |
--output $(JRE_IMAGE_DIR) |
27560 | 120 |
$(TOUCH) $@ |
121 |
||
122 |
JRE_COMPACT1_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact1 |
|
123 |
JRE_COMPACT2_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact2 |
|
124 |
JRE_COMPACT3_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact3 |
|
125 |
||
41532
76dffc133464
8167558: Add new JMOD section for header files and man pages
mchung
parents:
41458
diff
changeset
|
126 |
|
36506 | 127 |
$(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \ |
128 |
$(call DependOnVariable, JRE_COMPACT1_MODULES_LIST) $(BASE_RELEASE_FILE) |
|
27560 | 129 |
$(ECHO) Creating jre compact1 jimage |
36506 | 130 |
$(RM) -r $(JRE_COMPACT1_IMAGE_DIR) |
40241
59abac94e4f2
8136930: Simplify use of module-system options by custom launchers
mchung
parents:
39954
diff
changeset
|
131 |
$(JLINK_TOOL) --add-modules $(JRE_COMPACT1_MODULES_LIST) \ |
41532
76dffc133464
8167558: Add new JMOD section for header files and man pages
mchung
parents:
41458
diff
changeset
|
132 |
$(JLINK_JRE_EXTRA_OPTS) \ |
36506 | 133 |
--output $(JRE_COMPACT1_IMAGE_DIR) |
27560 | 134 |
$(TOUCH) $@ |
135 |
||
36506 | 136 |
$(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \ |
137 |
$(call DependOnVariable, JRE_COMPACT2_MODULES_LIST) $(BASE_RELEASE_FILE) |
|
27560 | 138 |
$(ECHO) Creating jre compact2 jimage |
36506 | 139 |
$(RM) -r $(JRE_COMPACT2_IMAGE_DIR) |
40241
59abac94e4f2
8136930: Simplify use of module-system options by custom launchers
mchung
parents:
39954
diff
changeset
|
140 |
$(JLINK_TOOL) --add-modules $(JRE_COMPACT2_MODULES_LIST) \ |
41532
76dffc133464
8167558: Add new JMOD section for header files and man pages
mchung
parents:
41458
diff
changeset
|
141 |
$(JLINK_JRE_EXTRA_OPTS) \ |
36506 | 142 |
--output $(JRE_COMPACT2_IMAGE_DIR) |
27560 | 143 |
$(TOUCH) $@ |
144 |
||
36506 | 145 |
$(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \ |
146 |
$(call DependOnVariable, JRE_COMPACT3_MODULES_LIST) $(BASE_RELEASE_FILE) |
|
27560 | 147 |
$(ECHO) Creating jre compact3 jimage |
36506 | 148 |
$(RM) -r $(JRE_COMPACT3_IMAGE_DIR) |
40241
59abac94e4f2
8136930: Simplify use of module-system options by custom launchers
mchung
parents:
39954
diff
changeset
|
149 |
$(JLINK_TOOL) --add-modules $(JRE_COMPACT3_MODULES_LIST) \ |
41532
76dffc133464
8167558: Add new JMOD section for header files and man pages
mchung
parents:
41458
diff
changeset
|
150 |
$(JLINK_JRE_EXTRA_OPTS) \ |
36506 | 151 |
--output $(JRE_COMPACT3_IMAGE_DIR) |
27560 | 152 |
$(TOUCH) $@ |
153 |
||
154 |
TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
155 |
TOOL_JDK_TARGETS := $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
156 |
TOOL_JRE_COMPACT1_TARGETS := $(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
157 |
TOOL_JRE_COMPACT2_TARGETS := $(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
158 |
TOOL_JRE_COMPACT3_TARGETS := $(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
159 |
||
160 |
################################################################################ |
|
161 |
# /man dir |
|
162 |
# |
|
163 |
# All variables in this section are assigned with simple =, without :, to enable |
|
164 |
# more selective overriding from the custom version of this file. |
|
165 |
# |
|
166 |
# Avoid evaluating this whole section on windows for speed and stability |
|
167 |
ifneq ($(OPENJDK_TARGET_OS), windows) |
|
168 |
JRE_MAN_PAGES += \ |
|
169 |
java.1 \ |
|
170 |
jjs.1 \ |
|
171 |
keytool.1 \ |
|
172 |
orbd.1 \ |
|
173 |
pack200.1 \ |
|
174 |
rmid.1 \ |
|
175 |
rmiregistry.1 \ |
|
176 |
servertool.1 \ |
|
177 |
tnameserv.1 \ |
|
178 |
unpack200.1 |
|
179 |
||
180 |
JDK_MAN_PAGES += \ |
|
181 |
$(JRE_MAN_PAGES) \ |
|
182 |
appletviewer.1 \ |
|
183 |
idlj.1 \ |
|
184 |
jar.1 \ |
|
185 |
jarsigner.1 \ |
|
186 |
javac.1 \ |
|
187 |
javadoc.1 \ |
|
188 |
javah.1 \ |
|
189 |
javap.1 \ |
|
190 |
jconsole.1 \ |
|
191 |
jcmd.1 \ |
|
192 |
jdb.1 \ |
|
193 |
jdeps.1 \ |
|
194 |
jinfo.1 \ |
|
195 |
jmap.1 \ |
|
196 |
jps.1 \ |
|
197 |
jrunscript.1 \ |
|
198 |
jstack.1 \ |
|
199 |
jstat.1 \ |
|
200 |
jstatd.1 \ |
|
28898 | 201 |
policytool.1 \ |
27560 | 202 |
rmic.1 \ |
203 |
schemagen.1 \ |
|
204 |
serialver.1 \ |
|
205 |
wsgen.1 \ |
|
206 |
wsimport.1 \ |
|
207 |
xjc.1 |
|
208 |
||
209 |
# This variable is potentially overridden in the closed makefile. |
|
210 |
MAN_SRC_BASEDIR ?= $(JDK_TOPDIR)/src |
|
211 |
||
212 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
213 |
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/linux/doc |
|
214 |
MAN1_SUBDIR = man |
|
215 |
endif |
|
216 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
217 |
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/solaris/doc |
|
218 |
MAN1_SUBDIR = sun/man/man1 |
|
219 |
endif |
|
220 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
221 |
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/bsd/doc |
|
222 |
MAN1_SUBDIR = man |
|
223 |
endif |
|
224 |
||
225 |
$(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/% |
|
35008 | 226 |
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 227 |
$(install-file) |
228 |
||
229 |
$(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/% |
|
35008 | 230 |
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 231 |
$(install-file) |
232 |
||
233 |
$(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
35008 | 234 |
$(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
|
235 |
$(install-file) |
27560 | 236 |
|
237 |
$(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
35008 | 238 |
$(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
|
239 |
$(install-file) |
27560 | 240 |
|
241 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
242 |
$(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
35008 | 243 |
$(call LogInfo, Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 244 |
$(install-file) |
245 |
||
246 |
$(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
35008 | 247 |
$(call LogInfo, Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 248 |
$(install-file) |
249 |
endif |
|
250 |
||
251 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux macosx), ) |
|
252 |
$(JRE_IMAGE_DIR)/man/ja: |
|
35008 | 253 |
$(call LogInfo, Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 254 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
255 |
||
256 |
$(JDK_IMAGE_DIR)/man/ja: |
|
35008 | 257 |
$(call LogInfo, Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 258 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
259 |
endif |
|
260 |
||
261 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
262 |
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
|
263 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/, $(JRE_MAN_PAGES)) \ |
|
264 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
|
265 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JRE_MAN_PAGES)) |
|
266 |
||
267 |
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
|
268 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/, $(JDK_MAN_PAGES)) \ |
|
269 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
|
270 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES)) |
|
271 |
endif |
|
272 |
||
273 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux macosx), ) |
|
274 |
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
|
275 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
|
276 |
$(JRE_IMAGE_DIR)/man/ja |
|
277 |
||
278 |
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
|
279 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
|
280 |
$(JDK_IMAGE_DIR)/man/ja |
|
281 |
endif |
|
282 |
||
283 |
JRE_TARGETS += $(JRE_MAN_PAGE_LIST) |
|
284 |
JDK_TARGETS += $(JDK_MAN_PAGE_LIST) |
|
285 |
endif # Windows |
|
286 |
||
287 |
################################################################################ |
|
288 |
# doc files |
|
289 |
||
290 |
JRE_DOC_FILES ?= LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
|
291 |
JDK_DOC_FILES ?= LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
|
292 |
JRE_DOC_LOCATION ?= $(JDK_TOPDIR) |
|
293 |
JDK_DOC_LOCATION ?= $(JDK_TOPDIR) |
|
294 |
||
295 |
JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/, $(JRE_DOC_FILES)) |
|
296 |
JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/, $(JDK_DOC_FILES)) |
|
297 |
||
298 |
# Processing license files from source area to image area |
|
299 |
# These are modified to have the platform specific EOL chars. |
|
300 |
define process-doc-file |
|
35008 | 301 |
$(call LogInfo, Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 302 |
$(MKDIR) -p $(@D) |
303 |
$(RM) $@ |
|
304 |
LC_ALL=C $(SED) 's/$$//g' $< > $@ |
|
305 |
$(CHMOD) 444 $@ |
|
306 |
endef |
|
307 |
||
308 |
$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/% |
|
309 |
$(process-doc-file) |
|
310 |
||
311 |
$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/% |
|
312 |
$(process-doc-file) |
|
313 |
||
314 |
JRE_TARGETS += $(JRE_DOC_TARGETS) |
|
315 |
JDK_TARGETS += $(JDK_DOC_TARGETS) |
|
316 |
||
317 |
################################################################################ |
|
318 |
# src.zip |
|
319 |
||
42286 | 320 |
$(JDK_IMAGE_DIR)/src.zip: $(SUPPORT_OUTPUTDIR)/src.zip |
35008 | 321 |
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 322 |
$(install-file) |
323 |
||
42286 | 324 |
JDK_TARGETS += $(JDK_IMAGE_DIR)/src.zip |
27560 | 325 |
|
326 |
################################################################################ |
|
327 |
# /demo dir |
|
41260 | 328 |
# Avoid doing the expensive find unless called with "jdk" as target. |
329 |
ifneq ($(filter jdk, $(MAKECMDGOALS)), ) |
|
330 |
||
331 |
DEMO_FILES := \ |
|
332 |
$(if $(wildcard $(SUPPORT_OUTPUTDIR)/demos/image), \ |
|
41875 | 333 |
$(call DoubleDollar, \ |
41260 | 334 |
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demos/image \ |
41875 | 335 |
-type f -a ! \( -name "_the*" -o -name "javac_state" \) )) \ |
41260 | 336 |
) |
337 |
||
338 |
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true) |
|
339 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
340 |
DEMO_FILES := $(call not-containing, .dSYM, $(DEMO_FILES)) |
|
341 |
else |
|
342 |
DEMO_FILES := $(filter-out %.debuginfo %.pdb %.map, $(DEMO_FILES)) |
|
343 |
endif |
|
344 |
endif |
|
345 |
||
35008 | 346 |
$(eval $(call SetupCopyFiles, JDK_COPY_DEMOS, \ |
347 |
SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \ |
|
348 |
DEST := $(JDK_IMAGE_DIR)/demo, \ |
|
41260 | 349 |
FILES := $(DEMO_FILES), \ |
35008 | 350 |
)) |
27560 | 351 |
|
35008 | 352 |
JDK_TARGETS += $(JDK_COPY_DEMOS) |
27560 | 353 |
endif |
354 |
||
355 |
################################################################################ |
|
356 |
# /sample dir |
|
357 |
||
41458 | 358 |
$(eval $(call SetupCopyFiles, COPY_SAMPLES, \ |
31310 | 359 |
SRC := $(SUPPORT_OUTPUTDIR)/sample/image, \ |
27560 | 360 |
DEST := $(JDK_IMAGE_DIR)/sample, \ |
31310 | 361 |
FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample/image), \ |
362 |
$(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample/image)))) |
|
27560 | 363 |
|
364 |
JDK_TARGETS += $(COPY_SAMPLES) |
|
365 |
||
366 |
################################################################################ |
|
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
367 |
# Code coverage data files |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
368 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
369 |
ifeq ($(GCOV_ENABLED), true) |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
370 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
371 |
GCOV_FIND_EXPR := -type f -name "*.gcno" |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
372 |
|
29444
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
373 |
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_GCOV_GCNO, \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
374 |
SRC := $(OUTPUT_ROOT), \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
375 |
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
376 |
FILES := $(shell $(FIND) $(HOTSPOT_OUTPUTDIR) $(GCOV_FIND_EXPR)))) |
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
377 |
|
29444
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
378 |
SYMBOLS_TARGETS += $(COPY_HOTSPOT_GCOV_GCNO) |
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
379 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
380 |
$(eval $(call SetupCopyFiles,COPY_JDK_GCOV_GCNO, \ |
29444
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
381 |
SRC := $(OUTPUT_ROOT), \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
382 |
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \ |
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
383 |
FILES := $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/native $(GCOV_FIND_EXPR)))) |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
384 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
385 |
SYMBOLS_TARGETS += $(COPY_JDK_GCOV_GCNO) |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
386 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
387 |
endif |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
388 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
389 |
################################################################################ |
37653 | 390 |
# Debug symbols |
391 |
# Since debug symbols are not included in the jmod files, they need to be copied |
|
392 |
# in manually after generating the images. |
|
393 |
||
394 |
ALL_JDK_MODULES := $(JDK_MODULES) |
|
395 |
ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \ |
|
396 |
$(call FindTransitiveDepsForModule, $m))) |
|
397 |
||
398 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
399 |
LIBS_TARGET_SUBDIR := bin |
|
400 |
else |
|
401 |
LIBS_TARGET_SUBDIR := lib |
|
402 |
endif |
|
403 |
||
404 |
# Param 1 - dir to find debuginfo files in |
|
405 |
FindDebuginfoFiles = \ |
|
406 |
$(wildcard $(addprefix $1/*, $(DEBUGINFO_SUFFIXES)) \ |
|
407 |
$(addprefix $1/*/*, $(DEBUGINFO_SUFFIXES)) \ |
|
408 |
$(addprefix $1/*/*/*, $(DEBUGINFO_SUFFIXES))) |
|
409 |
||
41260 | 410 |
# Pick the correct debug info files to copy, either zipped or not. |
411 |
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true) |
|
412 |
DEBUGINFO_SUFFIXES += .diz |
|
413 |
else |
|
414 |
DEBUGINFO_SUFFIXES := .debuginfo .pdb .map |
|
415 |
# On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM |
|
416 |
# dirs. |
|
417 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
418 |
$(eval $(call FillCacheFind, \ |
|
419 |
$(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs)) |
|
420 |
FindDebuginfoFiles = \ |
|
421 |
$(if $(wildcard $1), $(call containing, .dSYM/, $(call CacheFind, $1))) |
|
422 |
endif |
|
37653 | 423 |
endif |
424 |
||
425 |
# Param 1 - either JDK or JRE |
|
426 |
SetupCopyDebuginfo = \ |
|
427 |
$(foreach m, $(ALL_$1_MODULES), \ |
|
428 |
$(eval $(call SetupCopyFiles, COPY_$1_LIBS_DEBUGINFO_$m, \ |
|
429 |
SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$m, \ |
|
430 |
DEST := $($1_IMAGE_DIR)/$(LIBS_TARGET_SUBDIR), \ |
|
431 |
FILES := $(call FindDebuginfoFiles, \ |
|
432 |
$(SUPPORT_OUTPUTDIR)/modules_libs/$m), \ |
|
433 |
)) \ |
|
434 |
$(eval $1_TARGETS += $$(COPY_$1_LIBS_DEBUGINFO_$m)) \ |
|
435 |
) |
|
436 |
||
437 |
# No space before argument to avoid having to put $(strip ) everywhere in |
|
438 |
# implementation above. |
|
439 |
$(call SetupCopyDebuginfo,JDK) |
|
440 |
$(call SetupCopyDebuginfo,JRE) |
|
441 |
||
442 |
################################################################################ |
|
27560 | 443 |
|
444 |
# Include custom post hook here to make it possible to augment the target lists |
|
445 |
# before actual target prerequisites are declared. |
|
446 |
$(eval $(call IncludeCustomExtension, , Images-post.gmk)) |
|
447 |
||
448 |
################################################################################ |
|
449 |
||
450 |
$(JRE_TARGETS): $(TOOL_JRE_TARGETS) |
|
451 |
$(JDK_TARGETS): $(TOOL_JDK_TARGETS) |
|
452 |
||
41260 | 453 |
jdk: $(JDK_TARGETS) |
454 |
jre: $(JRE_TARGETS) |
|
455 |
symbols: $(SYMBOLS_TARGETS) |
|
456 |
||
457 |
all: jdk jre symbols |
|
27560 | 458 |
|
459 |
$(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS) |
|
460 |
$(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS) |
|
461 |
$(JRE_COMPACT3_TARGETS): $(TOOL_JRE_COMPACT3_TARGETS) |
|
462 |
||
463 |
profiles: $(TOOL_JRE_COMPACT1_TARGETS) \ |
|
464 |
$(TOOL_JRE_COMPACT2_TARGETS) \ |
|
465 |
$(TOOL_JRE_COMPACT3_TARGETS) \ |
|
466 |
$(JRE_COMPACT1_TARGETS) \ |
|
467 |
$(JRE_COMPACT2_TARGETS) \ |
|
468 |
$(JRE_COMPACT3_TARGETS) |
|
469 |
||
41260 | 470 |
.PHONY: default all jdk jre symbols profiles |