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