author | ctornqvi |
Wed, 22 Apr 2015 13:58:28 -0700 | |
changeset 30536 | 8eafd36e9a8d |
parent 29444 | b6186ae3a799 |
child 30085 | 936b85480edb |
child 29851 | 81a61a04e2fe |
permissions | -rw-r--r-- |
27560 | 1 |
# |
2 |
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
|
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 \ |
|
29301
c9f67d9201cc
8074428: Move pack200, unpack200, libpack200 to jdk.pack200
mchung
parents:
28898
diff
changeset
|
41 |
jdk.security.auth jdk.security.jgss jdk.pack200 |
27560 | 42 |
|
43 |
# providers |
|
44 |
PROVIDER_MODULES += jdk.charsets jdk.crypto.ec jdk.crypto.pkcs11 jdk.jvmstat jdk.localedata \ |
|
45 |
jdk.naming.dns jdk.naming.rmi jdk.scripting.nashorn jdk.zipfs |
|
46 |
||
47 |
# tools |
|
48 |
TOOLS_MODULES += jdk.attach jdk.compiler jdk.dev jdk.javadoc jdk.jcmd jdk.jconsole \ |
|
29302
d128457628fc
8074429: Move jar, jarsigner tool to jdk.jartool module
mchung
parents:
29301
diff
changeset
|
49 |
jdk.hotspot.agent jdk.hprof.agent jdk.jartool jdk.jdi jdk.jdwp.agent \ |
29303 | 50 |
jdk.policytool jdk.rmic jdk.xml.bind jdk.xml.ws |
27560 | 51 |
|
52 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
53 |
PROVIDER_MODULES += jdk.crypto.mscapi |
|
54 |
endif |
|
55 |
||
56 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
57 |
PROVIDER_MODULES += jdk.crypto.ucrypto |
|
58 |
endif |
|
59 |
||
60 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
61 |
MAIN_MODULES += jdk.deploy.osx |
|
62 |
endif |
|
63 |
||
64 |
JRE_MODULES := $(MAIN_MODULES) $(PROVIDER_MODULES) |
|
65 |
JDK_MODULES := $(JRE_MODULES) $(TOOLS_MODULES) |
|
66 |
||
67 |
# compact3 builds have additional modules |
|
68 |
JDK_COMPACT3_MODULES := java.compact3 java.smartcardio jdk.httpserver jdk.naming.dns \ |
|
69 |
jdk.naming.rmi jdk.sctp jdk.security.auth |
|
70 |
||
71 |
# Replacing double-comma with a single comma is to workaround the issue |
|
28356 | 72 |
# with some version of make on windows that doesn't substitute spaces |
27560 | 73 |
# with one comma properly as with make 4.0 |
74 |
define SubstComma |
|
75 |
$(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) |
|
76 |
endef |
|
77 |
JRE_MODULES_LIST := $(call SubstComma, $(JRE_MODULES)) |
|
78 |
JDK_MODULES_LIST := $(call SubstComma, $(JDK_MODULES)) |
|
79 |
||
80 |
################################################################################ |
|
81 |
||
82 |
JRE_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/jre-sorted-modules |
|
83 |
JDK_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/jdk-sorted-modules |
|
84 |
JRE_COMPACT1_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact1-sorted-modules |
|
85 |
JRE_COMPACT2_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact2-sorted-modules |
|
86 |
JRE_COMPACT3_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact3-sorted-modules |
|
87 |
||
88 |
||
89 |
MODULES_CMDS := $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped |
|
90 |
MODULES_LIBS := $(SUPPORT_OUTPUTDIR)/modules_libs-stripped |
|
91 |
MODULES_CONF := $(SUPPORT_OUTPUTDIR)/modules_conf |
|
92 |
||
93 |
JIMAGE_TOOL := $(JAVA_SMALL) \ |
|
94 |
-Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes \ |
|
95 |
-cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.tools.module.ImageBuilder \ |
|
96 |
--cmds $(MODULES_CMDS) \ |
|
97 |
--libs $(MODULES_LIBS) \ |
|
98 |
--configs $(MODULES_CONF) \ |
|
99 |
--classes $(JDK_OUTPUTDIR)/modules \ |
|
100 |
--endian $(OPENJDK_TARGET_CPU_ENDIAN) \ |
|
101 |
# |
|
102 |
||
103 |
MODULES_XML += $(SRC_ROOT)/modules.xml |
|
104 |
DEPENDENCIES := $(call CacheFind, \ |
|
105 |
$(SUPPORT_OUTPUTDIR)/modules_cmds \ |
|
106 |
$(SUPPORT_OUTPUTDIR)/modules_libs) \ |
|
107 |
$(wildcard $(JDK_OUTPUTDIR)/modules/*/_*) \ |
|
108 |
$(MODULES_XML) |
|
109 |
# |
|
110 |
||
111 |
# Use this file inside the image as target for make rule |
|
112 |
JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX) |
|
113 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
114 |
$(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \ |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
115 |
$(call DependOnVariable, JDK_MODULES_LIST) |
27560 | 116 |
$(ECHO) Creating jdk jimage |
117 |
$(RM) -r $(JDK_IMAGE_DIR) $(JDK_SORTED_MODULES) |
|
118 |
$(JIMAGE_TOOL) --mods $(JDK_MODULES_LIST) --output $(JDK_IMAGE_DIR) \ |
|
119 |
$(MODULES_XML) > $(JDK_SORTED_MODULES) |
|
120 |
$(TOUCH) $@ |
|
121 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
122 |
$(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \ |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
123 |
$(call DependOnVariable, JRE_MODULES_LIST) |
27560 | 124 |
$(ECHO) Creating jre jimage |
125 |
$(RM) -r $(JRE_IMAGE_DIR) $(JRE_SORTED_MODULES) |
|
126 |
$(JIMAGE_TOOL) --mods $(JRE_MODULES_LIST) --output $(JRE_IMAGE_DIR) \ |
|
127 |
$(MODULES_XML) > $(JRE_SORTED_MODULES) |
|
128 |
$(TOUCH) $@ |
|
129 |
||
130 |
JRE_COMPACT1_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact1 |
|
131 |
JRE_COMPACT2_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact2 |
|
132 |
JRE_COMPACT3_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact3 |
|
133 |
||
134 |
COMPACT_EXTRA_MODULES := jdk.localedata jdk.crypto.pkcs11 jdk.crypto.ec |
|
135 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
136 |
$(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \ |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
137 |
$(call DependOnVariable, JRE_COMPACT1_MODULES_LIST) |
27560 | 138 |
$(ECHO) Creating jre compact1 jimage |
139 |
$(RM) -r $(JRE_COMPACT1_IMAGE_DIR) $(JRE_COMPACT1_SORTED_MODULES) |
|
140 |
$(JIMAGE_TOOL) \ |
|
141 |
--mods $(call SubstComma, java.compact1 $(COMPACT_EXTRA_MODULES)) \ |
|
142 |
--output $(JRE_COMPACT1_IMAGE_DIR) \ |
|
143 |
$(MODULES_XML) > $(JRE_COMPACT1_SORTED_MODULES) |
|
144 |
$(TOUCH) $@ |
|
145 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
146 |
$(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \ |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
147 |
$(call DependOnVariable, JRE_COMPACT2_MODULES_LIST) |
27560 | 148 |
$(ECHO) Creating jre compact2 jimage |
149 |
$(RM) -r $(JRE_COMPACT2_IMAGE_DIR) $(JRE_COMPACT2_SORTED_MODULES) |
|
150 |
$(JIMAGE_TOOL) \ |
|
151 |
--mods $(call SubstComma, java.compact2 $(COMPACT_EXTRA_MODULES)) \ |
|
152 |
--output $(JRE_COMPACT2_IMAGE_DIR) \ |
|
153 |
$(MODULES_XML) > $(JRE_COMPACT2_SORTED_MODULES) |
|
154 |
$(TOUCH) $@ |
|
155 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
156 |
$(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \ |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
157 |
$(call DependOnVariable, JRE_COMPACT3_MODULES_LIST) |
27560 | 158 |
$(ECHO) Creating jre compact3 jimage |
159 |
$(RM) -r $(JRE_COMPACT3_IMAGE_DIR) $(JRE_COMPACT3_SORTED_MODULES) |
|
160 |
$(JIMAGE_TOOL) \ |
|
161 |
--mods $(call SubstComma, $(JDK_COMPACT3_MODULES) $(COMPACT_EXTRA_MODULES)) \ |
|
162 |
--output $(JRE_COMPACT3_IMAGE_DIR) \ |
|
163 |
$(MODULES_XML) > $(JRE_COMPACT3_SORTED_MODULES) |
|
164 |
$(TOUCH) $@ |
|
165 |
||
166 |
TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
167 |
TOOL_JDK_TARGETS := $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
168 |
TOOL_JRE_COMPACT1_TARGETS := $(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
169 |
TOOL_JRE_COMPACT2_TARGETS := $(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
170 |
TOOL_JRE_COMPACT3_TARGETS := $(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) |
|
171 |
||
172 |
################################################################################ |
|
173 |
# /man dir |
|
174 |
# |
|
175 |
# All variables in this section are assigned with simple =, without :, to enable |
|
176 |
# more selective overriding from the custom version of this file. |
|
177 |
# |
|
178 |
# Avoid evaluating this whole section on windows for speed and stability |
|
179 |
ifneq ($(OPENJDK_TARGET_OS), windows) |
|
180 |
JRE_MAN_PAGES += \ |
|
181 |
java.1 \ |
|
182 |
jjs.1 \ |
|
183 |
keytool.1 \ |
|
184 |
orbd.1 \ |
|
185 |
pack200.1 \ |
|
186 |
rmid.1 \ |
|
187 |
rmiregistry.1 \ |
|
188 |
servertool.1 \ |
|
189 |
tnameserv.1 \ |
|
190 |
unpack200.1 |
|
191 |
||
192 |
ifndef OPENJDK |
|
193 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
|
194 |
JRE_MAN_PAGES += javaws.1 |
|
195 |
endif |
|
196 |
endif |
|
197 |
||
198 |
JDK_MAN_PAGES += \ |
|
199 |
$(JRE_MAN_PAGES) \ |
|
200 |
appletviewer.1 \ |
|
201 |
idlj.1 \ |
|
202 |
jar.1 \ |
|
203 |
jarsigner.1 \ |
|
204 |
javac.1 \ |
|
205 |
javadoc.1 \ |
|
206 |
javah.1 \ |
|
207 |
javap.1 \ |
|
208 |
jconsole.1 \ |
|
209 |
jcmd.1 \ |
|
210 |
jdb.1 \ |
|
211 |
jdeps.1 \ |
|
212 |
jhat.1 \ |
|
213 |
jinfo.1 \ |
|
214 |
jmap.1 \ |
|
215 |
jps.1 \ |
|
216 |
jrunscript.1 \ |
|
217 |
jsadebugd.1 \ |
|
218 |
jstack.1 \ |
|
219 |
jstat.1 \ |
|
220 |
jstatd.1 \ |
|
221 |
native2ascii.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 |
define install-ja-manpage |
|
255 |
$(MKDIR) -p $(@D) |
|
256 |
$(CAT) $< \ |
|
257 |
| $(NATIVE2ASCII) -encoding eucJP \ |
|
258 |
| $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \ |
|
259 |
| $(NATIVE2ASCII) -reverse -encoding $1 \ |
|
260 |
> $@ |
|
261 |
endef |
|
262 |
||
263 |
$(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
264 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
265 |
$(call install-ja-manpage, UTF-8) |
|
266 |
||
267 |
$(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
268 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
269 |
$(call install-ja-manpage, UTF-8) |
|
270 |
||
271 |
$(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
272 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
273 |
$(call install-ja-manpage, PCK) |
|
274 |
||
275 |
$(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
276 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
277 |
$(call install-ja-manpage, PCK) |
|
278 |
||
279 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
280 |
$(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
281 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
282 |
$(install-file) |
|
283 |
||
284 |
$(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
285 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
286 |
$(install-file) |
|
287 |
endif |
|
288 |
||
289 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux macosx), ) |
|
290 |
$(JRE_IMAGE_DIR)/man/ja: |
|
291 |
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
292 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
|
293 |
||
294 |
$(JDK_IMAGE_DIR)/man/ja: |
|
295 |
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
296 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
|
297 |
endif |
|
298 |
||
299 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
300 |
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
|
301 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/, $(JRE_MAN_PAGES)) \ |
|
302 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
|
303 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JRE_MAN_PAGES)) |
|
304 |
||
305 |
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
|
306 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/, $(JDK_MAN_PAGES)) \ |
|
307 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
|
308 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES)) |
|
309 |
endif |
|
310 |
||
311 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux macosx), ) |
|
312 |
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
|
313 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
|
314 |
$(JRE_IMAGE_DIR)/man/ja |
|
315 |
||
316 |
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
|
317 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
|
318 |
$(JDK_IMAGE_DIR)/man/ja |
|
319 |
endif |
|
320 |
||
321 |
JRE_TARGETS += $(JRE_MAN_PAGE_LIST) |
|
322 |
JDK_TARGETS += $(JDK_MAN_PAGE_LIST) |
|
323 |
endif # Windows |
|
324 |
||
325 |
################################################################################ |
|
326 |
# /include dir |
|
327 |
||
328 |
$(eval $(call SetupCopyFiles,COPY_INCLUDES, \ |
|
329 |
SRC := $(JDK_OUTPUTDIR)/include, \ |
|
330 |
DEST := $(JDK_IMAGE_DIR)/include, \ |
|
331 |
FILES := $(call CacheFind,$(JDK_OUTPUTDIR)/include))) |
|
332 |
||
333 |
JDK_TARGETS += $(COPY_INCLUDES) |
|
334 |
||
335 |
################################################################################ |
|
336 |
# doc files |
|
337 |
||
338 |
JRE_DOC_FILES ?= LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
|
339 |
JDK_DOC_FILES ?= LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
|
340 |
JRE_DOC_LOCATION ?= $(JDK_TOPDIR) |
|
341 |
JDK_DOC_LOCATION ?= $(JDK_TOPDIR) |
|
342 |
||
343 |
JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/, $(JRE_DOC_FILES)) |
|
344 |
JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/, $(JDK_DOC_FILES)) |
|
345 |
||
346 |
# Processing license files from source area to image area |
|
347 |
# These are modified to have the platform specific EOL chars. |
|
348 |
define process-doc-file |
|
349 |
$(ECHO) $(LOG_INFO) Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
350 |
$(MKDIR) -p $(@D) |
|
351 |
$(RM) $@ |
|
352 |
LC_ALL=C $(SED) 's/$$//g' $< > $@ |
|
353 |
$(CHMOD) 444 $@ |
|
354 |
endef |
|
355 |
||
356 |
$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/% |
|
357 |
$(process-doc-file) |
|
358 |
||
359 |
$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/% |
|
360 |
$(process-doc-file) |
|
361 |
||
362 |
JRE_TARGETS += $(JRE_DOC_TARGETS) |
|
363 |
JDK_TARGETS += $(JDK_DOC_TARGETS) |
|
364 |
||
365 |
################################################################################ |
|
366 |
# Release file |
|
367 |
||
368 |
JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release |
|
369 |
JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release |
|
370 |
JRE_COMPACT1_INFO_FILE := $(JRE_COMPACT1_IMAGE_DIR)/release |
|
371 |
JRE_COMPACT2_INFO_FILE := $(JRE_COMPACT2_IMAGE_DIR)/release |
|
372 |
JRE_COMPACT3_INFO_FILE := $(JRE_COMPACT3_IMAGE_DIR)/release |
|
373 |
||
374 |
# Common way to emit a line into the release or info file |
|
375 |
define info-file-item # name value |
|
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
376 |
$(PRINTF) '%s="%s"\n' $1 $2 >> $@ |
27560 | 377 |
endef |
378 |
||
379 |
# Param 1 - The file containing the MODULES list |
|
380 |
define create-info-file |
|
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
381 |
$(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)") |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
382 |
$(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)") |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
383 |
$(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)") |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
384 |
$(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)") |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
385 |
$(if $(JDK_ARCH_ABI_PROP_NAME), \ |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
386 |
$(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
|
387 |
$(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)") |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
388 |
$(call info-file-item, "MODULES", "`$(CAT) $1`") |
27560 | 389 |
endef |
390 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
391 |
# Param 1 - The file containing the MODULES list |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
392 |
define prepare-info-file |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
393 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
394 |
$(MKDIR) -p $(@D) |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
395 |
$(RM) $@ |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
396 |
endef |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
397 |
|
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
398 |
define info-file |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
399 |
$(call prepare-info-file, $1) |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
400 |
$(call create-info-file, $1) |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
401 |
endef |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
402 |
|
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
403 |
# 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
|
404 |
# 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
|
405 |
# trigger a rebuild of these files anyway. |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
406 |
INFO_FILE_VARDEPS := $(call DependOnVariable, create-info-file) |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
407 |
|
27560 | 408 |
ALL_SOURCE_TIPS = $(shell \ |
409 |
if [ -f $(SUPPORT_OUTPUTDIR)/source_tips ] ; then \ |
|
410 |
$(CAT) $(SUPPORT_OUTPUTDIR)/source_tips ; \ |
|
411 |
fi) |
|
412 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
413 |
$(JRE_INFO_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
414 |
$(call info-file, $(JRE_SORTED_MODULES)) |
27560 | 415 |
|
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
416 |
$(JDK_INFO_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips |
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
417 |
$(call info-file, $(JDK_SORTED_MODULES)) |
27560 | 418 |
|
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
419 |
$(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
|
420 |
$(call info-file, $(JRE_COMPACT1_SORTED_MODULES)) |
27560 | 421 |
$(call info-file-item, "JAVA_PROFILE", "compact1") |
422 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
423 |
$(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
|
424 |
$(call info-file, $(JRE_COMPACT2_SORTED_MODULES)) |
27560 | 425 |
$(call info-file-item, "JAVA_PROFILE", "compact2") |
426 |
||
28600
09dd1740f176
8069261: Create make dependencies on make variable values
erikj
parents:
28356
diff
changeset
|
427 |
$(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
|
428 |
$(call info-file, $(JRE_COMPACT3_SORTED_MODULES)) |
27560 | 429 |
$(call info-file-item, "JAVA_PROFILE", "compact3") |
430 |
||
431 |
JRE_TARGETS += $(JRE_INFO_FILE) |
|
432 |
JDK_TARGETS += $(JDK_INFO_FILE) |
|
433 |
JRE_COMPACT1_TARGETS += $(JRE_COMPACT1_INFO_FILE) |
|
434 |
JRE_COMPACT2_TARGETS += $(JRE_COMPACT2_INFO_FILE) |
|
435 |
JRE_COMPACT3_TARGETS += $(JRE_COMPACT3_INFO_FILE) |
|
436 |
||
437 |
################################################################################ |
|
438 |
# src.zip |
|
439 |
||
440 |
$(JDK_IMAGE_DIR)/src.zip: $(SUPPORT_OUTPUTDIR)/src.zip |
|
441 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
442 |
$(install-file) |
|
443 |
||
444 |
JDK_TARGETS += $(JDK_IMAGE_DIR)/src.zip |
|
445 |
||
446 |
################################################################################ |
|
447 |
# /demo dir |
|
448 |
||
449 |
# The db demo contains an empty dir that needs to be copied. The other |
|
450 |
# directories will always trigger the rule for recompile since |
|
451 |
# _the.list_of_packages files are touched. |
|
452 |
ifneq ($(findstring images, $(MAKECMDGOALS)), ) |
|
453 |
$(JDK_IMAGE_DIR)/demo/%: $(SUPPORT_OUTPUTDIR)/demo/image/% |
|
454 |
if [ ! -d "$@" ]; then \ |
|
455 |
$(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \ |
|
456 |
$(MKDIR) -p $(@D); \ |
|
457 |
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) '$<' '$@'; fi \ |
|
458 |
fi |
|
459 |
||
460 |
# Find all files including directories |
|
461 |
JDK_DEMO_TARGETS := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/demo/image), \ |
|
462 |
$(patsubst $(SUPPORT_OUTPUTDIR)/demo/image/%, $(JDK_IMAGE_DIR)/demo/%, \ |
|
463 |
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demo/image \ |
|
464 |
! \( -name "_the*" -o -name "javac_state" \) ))) |
|
465 |
||
466 |
JDK_TARGETS += $(JDK_DEMO_TARGETS) |
|
467 |
endif |
|
468 |
||
469 |
################################################################################ |
|
470 |
# /sample dir |
|
471 |
||
472 |
$(eval $(call SetupCopyFiles,COPY_SAMPLES, \ |
|
473 |
SRC := $(SUPPORT_OUTPUTDIR)/sample, \ |
|
474 |
DEST := $(JDK_IMAGE_DIR)/sample, \ |
|
475 |
FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample), \ |
|
476 |
$(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample)))) |
|
477 |
||
478 |
JDK_TARGETS += $(COPY_SAMPLES) |
|
479 |
||
480 |
################################################################################ |
|
481 |
# jrt-fs.jar |
|
482 |
||
483 |
$(eval $(call SetupCopyFiles,COPY_JRTFS_JAR, \ |
|
484 |
SRC := $(SUPPORT_OUTPUTDIR), \ |
|
485 |
DEST := $(JDK_IMAGE_DIR), \ |
|
486 |
FILES := $(SUPPORT_OUTPUTDIR)/jrt-fs.jar)) |
|
487 |
||
488 |
JDK_TARGETS += $(COPY_JRTFS_JAR) |
|
489 |
||
490 |
################################################################################ |
|
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
491 |
# Code coverage data files |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
492 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
493 |
ifeq ($(GCOV_ENABLED), true) |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
494 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
495 |
GCOV_FIND_EXPR := -type f -name "*.gcno" |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
496 |
|
29444
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
497 |
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_GCOV_GCNO, \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
498 |
SRC := $(OUTPUT_ROOT), \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
499 |
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
500 |
FILES := $(shell $(FIND) $(HOTSPOT_OUTPUTDIR) $(GCOV_FIND_EXPR)))) |
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
501 |
|
29444
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
502 |
SYMBOLS_TARGETS += $(COPY_HOTSPOT_GCOV_GCNO) |
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
503 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
504 |
$(eval $(call SetupCopyFiles,COPY_JDK_GCOV_GCNO, \ |
29444
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
505 |
SRC := $(OUTPUT_ROOT), \ |
b6186ae3a799
8075236: Change layout of gcov .gcno files in symbols image
erikj
parents:
29305
diff
changeset
|
506 |
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \ |
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
507 |
FILES := $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/native $(GCOV_FIND_EXPR)))) |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
508 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
509 |
SYMBOLS_TARGETS += $(COPY_JDK_GCOV_GCNO) |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
510 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
511 |
endif |
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
512 |
|
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
513 |
################################################################################ |
27560 | 514 |
|
515 |
# Include custom post hook here to make it possible to augment the target lists |
|
516 |
# before actual target prerequisites are declared. |
|
517 |
$(eval $(call IncludeCustomExtension, , Images-post.gmk)) |
|
518 |
||
519 |
################################################################################ |
|
520 |
||
521 |
$(JRE_TARGETS): $(TOOL_JRE_TARGETS) |
|
522 |
$(JDK_TARGETS): $(TOOL_JDK_TARGETS) |
|
523 |
||
29305
4ddc6faf7842
8073021: add native code coverage target into makefiles
erikj
parents:
29303
diff
changeset
|
524 |
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
|
525 |
$(SYMBOLS_TARGETS) |
27560 | 526 |
|
527 |
||
528 |
$(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS) |
|
529 |
$(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS) |
|
530 |
$(JRE_COMPACT3_TARGETS): $(TOOL_JRE_COMPACT3_TARGETS) |
|
531 |
||
532 |
profiles: $(TOOL_JRE_COMPACT1_TARGETS) \ |
|
533 |
$(TOOL_JRE_COMPACT2_TARGETS) \ |
|
534 |
$(TOOL_JRE_COMPACT3_TARGETS) \ |
|
535 |
$(JRE_COMPACT1_TARGETS) \ |
|
536 |
$(JRE_COMPACT2_TARGETS) \ |
|
537 |
$(JRE_COMPACT3_TARGETS) |
|
538 |
||
539 |
.PHONY: default all jimages profiles |