author | ohair |
Wed, 02 Feb 2011 09:39:31 -0800 | |
changeset 8022 | d11e5f2eb62c |
parent 7967 | aa85f513e8f2 |
parent 8009 | faa3179b2b38 |
permissions | -rw-r--r-- |
4524 | 1 |
# |
7668 | 2 |
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. |
4524 | 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 |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
4524 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
4524 | 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 |
# |
|
5506 | 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. |
|
4524 | 24 |
# |
25 |
||
26 |
JDK_MODULE_IMAGE_DIR = $(ABS_OUTPUTDIR)/jdk-module-image |
|
27 |
JRE_MODULE_IMAGE_DIR = $(ABS_OUTPUTDIR)/jre-module-image |
|
28 |
||
29 |
# |
|
30 |
# modules Target to build jdk and jre module image |
|
31 |
# |
|
32 |
# There is one jar file per module containing classes only. |
|
33 |
# All module jars are currently placed under jre/lib directory. |
|
34 |
# |
|
35 |
# Open issues that need further investigation: |
|
36 |
# 1. Classes in jre/lib/ext/dnsns.jar are currently put in jre/lib/jndi-dns |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
37 |
# module. META-INF/services file is not installed. |
4524 | 38 |
# 2. Signed jars |
39 |
# For JDK build, signed jars are copied to the build. |
|
40 |
# All jars in the module image are unsigned. |
|
41 |
||
42 |
MODULE_IMAGEBINDIR = bin |
|
43 |
||
44 |
# |
|
45 |
# Targets. |
|
46 |
# |
|
47 |
INITIAL_MODULE_IMAGE_JRE=initial-module-image-jre |
|
48 |
INITIAL_MODULE_IMAGE_JDK=initial-module-image-jdk |
|
49 |
ifeq ($(PLATFORM), solaris) |
|
50 |
ifeq ($(ARCH_DATA_MODEL), 64) |
|
51 |
INITIAL_MODULE_IMAGE_JRE=initial-module-image-jre-sol64 |
|
52 |
INITIAL_MODULE_IMAGE_JDK=initial-module-image-jdk-sol64 |
|
53 |
endif |
|
54 |
endif |
|
55 |
||
56 |
modules modules-clobber \ |
|
57 |
initial-module-image-jre initial-module-image-jdk \ |
|
58 |
initial-module-image-jre-sol64 initial-module-image-jdk-sol64 \ |
|
59 |
trim-module-image-jre trim-module-image-jdk \ |
|
60 |
process-module-image-jre process-module-image-jdk :: |
|
61 |
@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..." |
|
62 |
||
63 |
# Order is important here, trim jre after jdk image is created |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
64 |
modules:: gen-modules \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
65 |
sanity-module-images post-sanity-module-images \ |
4524 | 66 |
$(INITIAL_MODULE_IMAGE_JRE) $(INITIAL_MODULE_IMAGE_JDK) \ |
67 |
trim-module-image-jre trim-module-image-jdk \ |
|
68 |
process-module-image-jre process-module-image-jdk |
|
69 |
||
70 |
# Don't use these |
|
71 |
module-image-jre:: initial-module-image-jre trim-module-image-jre process-module-image-jre |
|
72 |
module-image-jdk:: initial-module-image-jdk trim-module-image-jdk process-module-image-jdk |
|
73 |
||
74 |
# |
|
75 |
# Paths to these files we need |
|
8009
faa3179b2b38
6980024: Rebranding jre7/jdk7 License, Copyright, Readme
ohair
parents:
7668
diff
changeset
|
76 |
JDK_MODULE_DOCFILES = $(IMAGE_DOCLIST_JDK:%=$(JDK_MODULE_IMAGE_DIR)/%) |
faa3179b2b38
6980024: Rebranding jre7/jdk7 License, Copyright, Readme
ohair
parents:
7668
diff
changeset
|
77 |
JRE_MODULE_DOCFILES = $(IMAGE_DOCLIST_JRE:%=$(JRE_MODULE_IMAGE_DIR)/%) |
4524 | 78 |
|
79 |
###### RULES |
|
80 |
||
81 |
# JDK files |
|
82 |
$(JDK_MODULE_IMAGE_DIR)/%: $(SHARE_JDK_DOC_SRC)/% |
|
83 |
$(process-doc-file) |
|
84 |
||
85 |
# JRE files |
|
86 |
$(JRE_MODULE_IMAGE_DIR)/%: $(SHARE_JRE_DOC_SRC)/% |
|
87 |
$(process-doc-file) |
|
8009
faa3179b2b38
6980024: Rebranding jre7/jdk7 License, Copyright, Readme
ohair
parents:
7668
diff
changeset
|
88 |
ifeq ($(PLATFORM), windows) |
faa3179b2b38
6980024: Rebranding jre7/jdk7 License, Copyright, Readme
ohair
parents:
7668
diff
changeset
|
89 |
$(JRE_MODULE_IMAGE_DIR)/README.txt: $(SHARE_JRE_DOC_SRC)/README |
4524 | 90 |
$(process-doc-file) |
91 |
endif |
|
92 |
||
93 |
###################################################### |
|
94 |
# JRE Image |
|
95 |
###################################################### |
|
96 |
||
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
97 |
MODULES_LIST = $(MODULES_TEMPDIR)/classlist/modules.list |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
98 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
99 |
# Modules in the jre/lib/security directory |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
100 |
POLICY_MODULES = US_export_policy local_policy |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
101 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
102 |
# Modules in the modules/ext directory |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
103 |
EXT_MODULES = localedata security-sunec security-sunjce |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
104 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
105 |
# Build PKCS#11 on all platforms except 64-bit Windows. |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
106 |
PKCS11 = security-sunpkcs11 |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
107 |
ifeq ($(ARCH_DATA_MODEL), 64) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
108 |
ifeq ($(PLATFORM), windows) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
109 |
PKCS11 = |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
110 |
endif |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
111 |
endif |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
112 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
113 |
EXT_MODULES += $(PKCS11) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
114 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
115 |
# Build Microsoft CryptoAPI provider only on (non-64-bit) Windows platform. |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
116 |
ifeq ($(PLATFORM), windows) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
117 |
ifneq ($(ARCH_DATA_MODEL), 64) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
118 |
EXT_MODULES += security-sunmscapi |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
119 |
endif |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
120 |
endif |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
121 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
122 |
# Modules for JDK only |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
123 |
JDK_MODULES = tools |
4524 | 124 |
|
125 |
gen-modules: |
|
126 |
$(CD) modules; $(MAKE) all |
|
127 |
||
128 |
initial-module-image-jre-setup: |
|
129 |
$(RM) -r $(JRE_MODULE_IMAGE_DIR) |
|
130 |
$(MKDIR) -p $(JRE_MODULE_IMAGE_DIR) |
|
131 |
||
132 |
# 64-bit solaris jre image contains only the 64-bit add-on files. |
|
8009
faa3179b2b38
6980024: Rebranding jre7/jdk7 License, Copyright, Readme
ohair
parents:
7668
diff
changeset
|
133 |
initial-module-image-jre-sol64:: initial-module-image-jre-setup |
4524 | 134 |
@# Use tar instead of cp to preserve the symbolic links |
135 |
for dir in bin lib ; do \ |
|
136 |
( $(CD) $(OUTPUTDIR) && \ |
|
137 |
$(TAR) cf - `$(FIND) $$dir -name '$(ARCH)' -print` | \ |
|
138 |
($(CD) $(JRE_MODULE_IMAGE_DIR) && $(TAR) xf -) ) ; \ |
|
139 |
done |
|
140 |
@# Remove some files from the jre area |
|
141 |
for t in $(NOTJRETOOLS) ; do \ |
|
142 |
$(RM) $(JRE_MODULE_IMAGE_DIR)/bin$(ISA_DIR)/$$t ; \ |
|
143 |
done |
|
144 |
$(RM) `$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'orb.idl'` |
|
145 |
$(RM) `$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'ir.idl'` |
|
146 |
||
147 |
# Construct an initial jre image (initial jdk jre) no trimming or stripping |
|
148 |
initial-module-image-jre:: initial-module-image-jre-setup \ |
|
8009
faa3179b2b38
6980024: Rebranding jre7/jdk7 License, Copyright, Readme
ohair
parents:
7668
diff
changeset
|
149 |
$(JRE_MODULE_DOCFILES) \ |
4524 | 150 |
$(BUILDMETAINDEX_JARFILE) |
151 |
@# Copy in bin directory |
|
152 |
$(CD) $(OUTPUTDIR) && $(FIND) bin -depth | $(CPIO) -pdum $(JRE_MODULE_IMAGE_DIR) |
|
153 |
@# CTE plugin security change require new empty directory lib/applet |
|
154 |
$(MKDIR) -p $(JRE_MODULE_IMAGE_DIR)/lib/applet |
|
155 |
@# Copy files but not .jar in lib directory |
|
156 |
$(CD) $(OUTPUTDIR) && $(FIND) lib -depth | $(EGREP) -v ".jar$$" | $(CPIO) -pdum $(JRE_MODULE_IMAGE_DIR) |
|
157 |
@# |
|
158 |
@# copy modules to jre/lib |
|
159 |
@# |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
160 |
for m in `$(NAWK) '{print $$1}' $(MODULES_LIST)` ; do \ |
4681
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
161 |
$(CP) $(MODULES_DIR)/$$m/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib ; \ |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
162 |
done |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
163 |
$(MKDIR) -p $(JRE_MODULE_IMAGE_DIR)/lib/ext |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
164 |
for m in $(EXT_MODULES) ; do \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
165 |
$(MV) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib/ext ; \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
166 |
done |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
167 |
for m in $(POLICY_MODULES) ; do \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
168 |
$(MV) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib/security; \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
169 |
done |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
170 |
@# Remove jdk modules |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
171 |
for m in $(JDK_MODULES) ; do \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
172 |
$(RM) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar ; \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
173 |
done |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
174 |
|
4524 | 175 |
@# Make sure all directories are read/execute for everyone |
176 |
$(CHMOD) a+rx `$(FIND) $(JRE_MODULE_IMAGE_DIR) -type d` |
|
177 |
@# Remove some files from the jre area |
|
178 |
for t in $(NOTJRETOOLS) ; do \ |
|
179 |
$(RM) $(JRE_MODULE_IMAGE_DIR)/bin$(ISA_DIR)/$$t ; \ |
|
180 |
done |
|
181 |
@# Remove orb.idl and ir.idl from jre |
|
182 |
$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'orb.idl' -exec $(RM) \{} \; |
|
183 |
$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'ir.idl' -exec $(RM) \{} \; |
|
184 |
@# Generate meta-index to make boot and extension class loaders lazier |
|
185 |
$(CD) $(JRE_MODULE_IMAGE_DIR)/lib && \ |
|
186 |
$(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \ |
|
187 |
-o meta-index *.jar |
|
188 |
@$(CD) $(JRE_MODULE_IMAGE_DIR)/lib && $(java-vm-cleanup) |
|
189 |
$(CD) $(JRE_MODULE_IMAGE_DIR)/lib/ext && \ |
|
190 |
$(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \ |
|
191 |
-o meta-index *.jar |
|
192 |
@$(CD) $(JRE_MODULE_IMAGE_DIR)/lib/ext && $(java-vm-cleanup) |
|
193 |
ifeq ($(PLATFORM), windows) |
|
194 |
@# Remove certain *.lib files |
|
195 |
$(CD) $(JRE_MODULE_IMAGE_DIR)/lib && \ |
|
196 |
$(RM) java.$(LIB_SUFFIX) jvm.$(LIB_SUFFIX) \ |
|
7967 | 197 |
awt.$(LIB_SUFFIX) jawt.$(LIB_SUFFIX) |
4524 | 198 |
ifeq ($(ARCH_DATA_MODEL), 32) |
199 |
@# The Java Kernel JRE image ships with a special VM. It is not included |
|
200 |
@# in the full JRE image, so remove it. Also, is it only for 32-bit windows. |
|
201 |
$(CD) $(JRE_MODULE_IMAGE_DIR)/bin && $(RM) -r kernel |
|
202 |
endif |
|
203 |
endif # Windows |
|
204 |
ifneq ($(PLATFORM), windows) |
|
205 |
$(call copy-man-pages,$(JRE_MODULE_IMAGE_DIR),$(JRE_MAN_PAGES)) |
|
206 |
endif # !windows |
|
207 |
||
208 |
# Trim out any extra files not for the jre shipment but wanted in the jdk jre. |
|
209 |
# (Note the jdk WILL want the jre image before this trimming) |
|
210 |
# Removes server VM on Windows 32bit. |
|
211 |
# Remove certain shared libraries that should not be in the jre image |
|
212 |
# but should be in the jdk jre image. |
|
213 |
trim-module-image-jre:: |
|
214 |
ifeq ($(PLATFORM), windows) |
|
215 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
216 |
$(RM) -r $(JRE_MODULE_IMAGE_DIR)/bin/server |
|
217 |
endif |
|
218 |
ifdef NOTJRE_SHARED_LIBS |
|
219 |
for l in $(NOTJRE_SHARED_LIBS) ; do \ |
|
220 |
$(RM) $(JRE_MODULE_IMAGE_DIR)/bin/$$l ; \ |
|
221 |
done ; |
|
222 |
endif |
|
223 |
else # PLATFORM |
|
224 |
ifdef NOTJRE_SHARED_LIBS |
|
225 |
for l in $(NOTJRE_SHARED_LIBS) ; do \ |
|
226 |
$(RM) $(JRE_MODULE_IMAGE_DIR)/lib/$(LIBARCH)/$$l ; \ |
|
227 |
done ; |
|
228 |
endif |
|
229 |
endif # PLATFORM |
|
230 |
||
231 |
# Get list of all Elf files in the jre |
|
232 |
JRE_MODULE_ELF_LIST=$(MODULES_TEMPDIR)/jre-elf-files.list |
|
233 |
$(JRE_MODULE_ELF_LIST): |
|
234 |
@$(prep-target) |
|
235 |
ifneq ($(PLATFORM), windows) |
|
236 |
$(RM) $@ |
|
237 |
$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -type f -name \*.$(LIB_SUFFIX) >> $@ |
|
238 |
$(FILE) `$(FIND) $(JRE_MODULE_IMAGE_DIR)/bin -type f -name \*$(EXE_SUFFIX)` \ |
|
239 |
| $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@ |
|
240 |
endif |
|
241 |
||
242 |
# Post process the image (strips and mcs on Elf files we are shipping) |
|
243 |
# (Note the jdk WILL want the jre image before this processing) |
|
244 |
process-module-image-jre:: $(JRE_MODULE_ELF_LIST) |
|
245 |
ifneq ($(POST_STRIP_PROCESS), ) |
|
246 |
for f in `$(CAT) $(JRE_MODULE_ELF_LIST)`; do \ |
|
247 |
$(CHMOD) u+w $${f}; \ |
|
248 |
$(ECHO) $(POST_STRIP_PROCESS) $${f}; \ |
|
249 |
$(POST_STRIP_PROCESS) $${f}; \ |
|
250 |
$(CHMOD) go-w $${f}; \ |
|
251 |
done |
|
252 |
endif |
|
253 |
ifneq ($(POST_MCS_PROCESS), ) |
|
254 |
for f in `$(CAT) $(JRE_MODULE_ELF_LIST)`; do \ |
|
255 |
$(CHMOD) u+w $${f}; \ |
|
256 |
$(ECHO) $(POST_MCS_PROCESS) $${f}; \ |
|
257 |
$(POST_MCS_PROCESS) $${f}; \ |
|
258 |
$(CHMOD) go-w $${f}; \ |
|
259 |
done |
|
260 |
endif |
|
261 |
$(RM) $(JRE_MODULE_ELF_LIST) |
|
262 |
||
263 |
###################################################### |
|
264 |
# JDK Image |
|
265 |
###################################################### |
|
266 |
# Note: cpio ($(CPIO)) sometimes leaves directories without rx access. |
|
267 |
||
268 |
initial-module-image-jdk-setup: |
|
269 |
$(RM) -r $(JDK_MODULE_IMAGE_DIR) |
|
270 |
$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/jre |
|
271 |
($(CD) $(JRE_MODULE_IMAGE_DIR) && $(FIND) . -depth -print \ |
|
272 |
| $(CPIO) -pdum $(JDK_MODULE_IMAGE_DIR)/jre ) |
|
273 |
$(RM) -rf $(JDK_MODULE_IMAGE_DIR)/jre/man |
|
274 |
$(CHMOD) a+rx `$(FIND) $(JDK_MODULE_IMAGE_DIR) -type d` |
|
275 |
||
276 |
initial-module-image-jdk64-bindemos: |
|
277 |
for dir in bin demo ; do \ |
|
278 |
( $(CD) $(OUTPUTDIR) && \ |
|
279 |
$(TAR) cf - `$(FIND) $$dir -name '$(LIBARCH)' -print` | \ |
|
280 |
($(CD) $(JDK_MODULE_IMAGE_DIR) && $(TAR) xf -) ) ; \ |
|
281 |
done |
|
282 |
||
283 |
# Solaris 64 bit image is special |
|
284 |
initial-module-image-jdk-sol64:: initial-module-image-jdk-setup \ |
|
8009
faa3179b2b38
6980024: Rebranding jre7/jdk7 License, Copyright, Readme
ohair
parents:
7668
diff
changeset
|
285 |
initial-module-image-jdk64-bindemos |
4524 | 286 |
|
287 |
# DB files to add |
|
288 |
ifeq ($(OPENJDK),true) |
|
289 |
||
290 |
initial-module-image-jdk-db: |
|
291 |
||
292 |
else |
|
293 |
||
294 |
# Create the list of db *.zip files to bundle with jdk |
|
295 |
ABS_DB_PATH :=$(call FullPath,$(CLOSED_SHARE_SRC)/db) |
|
296 |
DB_ZIP_LIST = $(shell $(LS) $(ABS_DB_PATH)/*.zip 2>/dev/null) |
|
297 |
||
298 |
initial-module-image-jdk-db: $(DB_ZIP_LIST) |
|
299 |
$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/db |
|
300 |
for d in $(DB_ZIP_LIST); do \ |
|
301 |
($(CD) $(JDK_MODULE_IMAGE_DIR)/db && $(UNZIP) -o $$d); \ |
|
302 |
done |
|
303 |
||
304 |
endif |
|
305 |
||
306 |
# Standard jdk image |
|
307 |
initial-module-image-jdk:: initial-module-image-jdk-setup \ |
|
308 |
initial-module-image-jdk-db \ |
|
8009
faa3179b2b38
6980024: Rebranding jre7/jdk7 License, Copyright, Readme
ohair
parents:
7668
diff
changeset
|
309 |
$(JDK_MODULE_DOCFILES) |
4524 | 310 |
$(MKDIR) $(JDK_MODULE_IMAGE_DIR)/lib |
311 |
@# |
|
312 |
@# copy jdk modules to jdk/lib |
|
313 |
@# |
|
314 |
$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/lib |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
315 |
for m in $(JDK_MODULES) ; do \ |
4681
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
316 |
$(CP) $(MODULES_DIR)/$$m/lib/$$m.jar $(JDK_MODULE_IMAGE_DIR)/lib ; \ |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4524
diff
changeset
|
317 |
done |
4524 | 318 |
ifeq ($(PLATFORM), windows) |
319 |
@# |
|
320 |
@# lib/ |
|
321 |
@# |
|
322 |
$(CP) $(LIBDIR)/$(LIB_PREFIX)jvm.$(LIB_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/lib |
|
323 |
$(CP) $(LIBDIR)/$(LIB_PREFIX)jawt.$(LIB_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/lib |
|
324 |
@# |
|
325 |
@# bin/ |
|
326 |
@# |
|
327 |
@# copy all EXE files and only certain DLL files from BINDIR |
|
328 |
$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/bin |
|
329 |
$(CP) $(BINDIR)/*$(EXE_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin |
|
330 |
$(CP) $(BINDIR)/jli.$(LIBRARY_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin |
|
5381
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
4681
diff
changeset
|
331 |
ifeq ($(COMPILER_VERSION), VS2010) |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
4681
diff
changeset
|
332 |
$(CP) $(BINDIR)/msvc*100.$(LIBRARY_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
4681
diff
changeset
|
333 |
endif |
4524 | 334 |
ifeq ($(ARCH_DATA_MODEL), 32) |
335 |
ifeq ($(COMPILER_VERSION), VS2003) |
|
336 |
$(CP) $(BINDIR)/msvc*71.$(LIBRARY_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin |
|
337 |
endif |
|
338 |
endif |
|
339 |
else # PLATFORM |
|
340 |
@# |
|
341 |
@# bin/ |
|
342 |
@# |
|
343 |
($(CD) $(BINDIR)/.. && $(TAR) cf - \ |
|
344 |
`$(FIND) bin \( -type f -o -type l \) -print `) | \ |
|
345 |
($(CD) $(JDK_MODULE_IMAGE_DIR) && $(TAR) xf -) |
|
346 |
endif # PLATFORM |
|
347 |
@# |
|
348 |
@# lib/ct.sym |
|
349 |
@# |
|
350 |
$(MKDIR) -p $(OUTPUTDIR)/symbols/META-INF/sym |
|
351 |
$(JAVAC_CMD) -XDprocess.packages -proc:only \ |
|
352 |
-processor com.sun.tools.javac.sym.CreateSymbols \ |
|
353 |
-Acom.sun.tools.javac.sym.Jar=$(RT_JAR) \ |
|
354 |
-Acom.sun.tools.javac.sym.Dest=$(OUTPUTDIR)/symbols/META-INF/sym/rt.jar \ |
|
355 |
$(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) |
|
356 |
$(BOOT_JAR_CMD) c0f $(LIBDIR)/ct.sym \ |
|
357 |
-C $(OUTPUTDIR)/symbols META-INF $(BOOT_JAR_JFLAGS) |
|
358 |
@$(java-vm-cleanup) |
|
359 |
$(CP) $(LIBDIR)/ct.sym $(JDK_MODULE_IMAGE_DIR)/lib/ct.sym |
|
360 |
@# |
|
361 |
@# CORBA supported orb.idl and ir.idl should be copied to lib |
|
362 |
@# |
|
363 |
$(CP) $(LIBDIR)/orb.idl $(JDK_MODULE_IMAGE_DIR)/lib/orb.idl |
|
364 |
$(CP) $(LIBDIR)/ir.idl $(JDK_MODULE_IMAGE_DIR)/lib/ir.idl |
|
365 |
ifeq ($(PLATFORM), linux) |
|
366 |
@# |
|
367 |
@# on Linux copy jexec from jre/lib to /lib |
|
368 |
@# |
|
369 |
$(CP) $(LIBDIR)/jexec $(JDK_MODULE_IMAGE_DIR)/lib/jexec |
|
370 |
endif # PLATFORM |
|
371 |
@# |
|
372 |
@# demo, include |
|
373 |
@# |
|
374 |
$(CP) -r -f $(DEMODIR) $(JDK_MODULE_IMAGE_DIR) |
|
375 |
$(CP) -r -f $(SAMPLEDIR) $(JDK_MODULE_IMAGE_DIR) |
|
376 |
$(CP) -r $(INCLUDEDIR) $(JDK_MODULE_IMAGE_DIR) |
|
377 |
@# |
|
378 |
@# Swing BeanInfo generation |
|
379 |
@# |
|
380 |
$(CD) javax/swing/beaninfo && $(MAKE) JDK_IMAGE_DIR=$(JDK_MODULE_IMAGE_DIR) swing-1.2-beans |
|
381 |
ifneq ($(PLATFORM), windows) |
|
382 |
$(call copy-man-pages,$(JDK_MODULE_IMAGE_DIR),$(JDK_MAN_PAGES)) |
|
383 |
endif # !windows |
|
384 |
||
385 |
# Trim out files we don't want to ship |
|
386 |
trim-module-image-jdk:: |
|
387 |
@# Remove tools that should not be part of SDK. |
|
388 |
for t in $(NOTJDKTOOLS); do \ |
|
7967 | 389 |
$(RM) $(JDK_MODULE_IMAGE_DIR)/bin/$${t}$(EXE_SUFFIX); \ |
4524 | 390 |
done |
391 |
||
392 |
# Get list of Elf files in the jdk |
|
393 |
JDK_MODULE_ELF_LIST=$(MODULES_TEMPDIR)/jdk-elf-files.list |
|
394 |
$(JDK_MODULE_ELF_LIST): |
|
395 |
@$(prep-target) |
|
396 |
ifneq ($(PLATFORM), windows) |
|
397 |
$(RM) $@ |
|
398 |
$(FIND) $(JDK_MODULE_IMAGE_DIR)/jre/lib -type f -name \*.$(LIB_SUFFIX) >> $@ |
|
399 |
$(FILE) `$(FIND) $(JDK_MODULE_IMAGE_DIR)/jre/bin -type f -name \*$(EXE_SUFFIX)` \ |
|
400 |
| $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@ |
|
401 |
file `$(FIND) $(JDK_MODULE_IMAGE_DIR)/bin -type f -name \*$(EXE_SUFFIX)` \ |
|
402 |
| $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@ |
|
403 |
endif |
|
404 |
||
405 |
# Post process the image (strips and mcs on files we are shipping) |
|
406 |
process-module-image-jdk:: $(JDK_MODULE_ELF_LIST) |
|
407 |
ifneq ($(POST_STRIP_PROCESS), ) |
|
408 |
for f in `$(CAT) $(JDK_MODULE_ELF_LIST)`; do \ |
|
409 |
$(CHMOD) u+w $${f}; \ |
|
410 |
$(ECHO) $(POST_STRIP_PROCESS) $${f}; \ |
|
411 |
$(POST_STRIP_PROCESS) $${f}; \ |
|
412 |
$(CHMOD) go-w $${f}; \ |
|
413 |
done |
|
414 |
endif |
|
415 |
ifneq ($(POST_MCS_PROCESS), ) |
|
416 |
for f in `$(CAT) $(JDK_MODULE_ELF_LIST)`; do \ |
|
417 |
$(CHMOD) u+w $${f}; \ |
|
418 |
$(ECHO) $(POST_MCS_PROCESS) $${f}; \ |
|
419 |
$(POST_MCS_PROCESS) $${f}; \ |
|
420 |
$(CHMOD) go-w $${f}; \ |
|
421 |
done |
|
422 |
endif |
|
423 |
$(RM) $(JDK_MODULE_ELF_LIST) |
|
424 |
||
425 |
###################################################### |
|
426 |
# clobber |
|
427 |
###################################################### |
|
428 |
modules-clobber:: |
|
429 |
$(RM) -r $(JDK_MODULE_IMAGE_DIR) |
|
430 |
$(RM) -r $(JRE_MODULE_IMAGE_DIR) |
|
431 |
||
432 |
# |
|
433 |
# TODO - nop for now |
|
434 |
sanity-module-images post-sanity-module-images: |
|
435 |
||
436 |
modules modules-clobber:: |
|
437 |
@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..." |
|
438 |
@$(java-vm-cleanup) |
|
439 |
||
440 |
.PHONY: modules module-image-jre module-image-jdk \ |
|
441 |
initial-module-image-jre initial-module-image-jdk \ |
|
442 |
initial-module-image-jre-sol64 initial-module-image-jdk-sol64 \ |
|
443 |
initial-module-image-jdk-setup \ |
|
444 |
initial-module-image-jdk-db \ |
|
445 |
initial-module-image-jdk64-bindemos \ |
|
446 |
initial-module-image-jre-setup \ |
|
447 |
trim-module-image-jre trim-module-image-jdk \ |
|
448 |
process-module-image-jre process-module-image-jdk \ |
|
449 |
install-previous-jre install-previous-jdk \ |
|
450 |
modules-clobber |
|
451 |
||
452 |
# Force rule |
|
453 |
FRC: |
|
454 |