13164
|
1 |
#
|
|
2 |
# Copyright (c) 2012, 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 |
#######
|
|
32 |
|
|
33 |
IMPORT_TARGET_FILES :=
|
|
34 |
|
|
35 |
IMPORT_CLASSES := CORBA JAXP JAXWS LANGTOOLS
|
|
36 |
IMPORT_SOURCES := CORBA JAXP JAXWS LANGTOOLS
|
|
37 |
# Only Corba has binaries
|
|
38 |
IMPORT_BINARIES := CORBA
|
|
39 |
|
|
40 |
#######
|
|
41 |
|
|
42 |
# Put the libraries here. Different locations for different target apis.
|
|
43 |
ifeq ($(OPENJDK_TARGET_OS_API),posix)
|
13702
|
44 |
INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
|
|
45 |
HOTSPOT_LIB_DIR:=$(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)
|
13164
|
46 |
else
|
|
47 |
INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/bin
|
|
48 |
HOTSPOT_LIB_DIR:=$(HOTSPOT_DIST)/jre/bin
|
|
49 |
endif
|
|
50 |
|
|
51 |
#######
|
|
52 |
|
|
53 |
#
|
|
54 |
# jar xf/unzip fails when executing them all in parallel
|
|
55 |
# introduce artificial dependency (_DEP) buuhhh
|
|
56 |
|
|
57 |
define ImportClasses
|
|
58 |
$1_CLASSES_DEP := $$(IMPORT_TARGET_CLASSES)
|
|
59 |
IMPORT_TARGET_CLASSES += $(JDK_OUTPUTDIR)/classes/_the.$1.classes.imported
|
|
60 |
|
|
61 |
$(JDK_OUTPUTDIR)/classes/_the.$1.classes.imported : $$($1_DIST)/lib/classes.jar $$($1_CLASSES_DEP)
|
|
62 |
$(ECHO) Importing $1 classes.jar
|
|
63 |
$(MKDIR) -p $$(@D)
|
13702
|
64 |
$(RM) $$@ $$@.tmp
|
13164
|
65 |
($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp)
|
|
66 |
$(MV) $$@.tmp $$@
|
|
67 |
endef
|
|
68 |
|
|
69 |
define ImportSources
|
|
70 |
$1_SOURCES_DEP := $$(IMPORT_TARGET_SOURCES)
|
|
71 |
IMPORT_TARGET_SOURCES += $(JDK_OUTPUTDIR)/impsrc/_the.$1.src.imported
|
|
72 |
|
|
73 |
$(JDK_OUTPUTDIR)/impsrc/_the.$1.src.imported : $$($1_DIST)/lib/src.zip $$($1_SOURCES_DEP)
|
|
74 |
$(ECHO) Importing $1 src.zip
|
|
75 |
$(MKDIR) -p $$(@D)
|
13702
|
76 |
$(RM) $$@ $$@.tmp
|
13164
|
77 |
($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp)
|
|
78 |
$(MV) $$@.tmp $$@
|
|
79 |
endef
|
|
80 |
|
|
81 |
define ImportBinaries
|
|
82 |
$1_BINARIES_DEP := $$(IMPORT_TARGET_BINARIES)
|
|
83 |
IMPORT_TARGET_BINARIES += $(JDK_OUTPUTDIR)/_the.$1.binaries.imported
|
|
84 |
|
|
85 |
$(JDK_OUTPUTDIR)/_the.$1.binaries.imported : $$($1_DIST)/lib/bin.zip $$($1_BINARIES_DEP)
|
|
86 |
$(ECHO) Importing $1 bin.zip
|
|
87 |
$(MKDIR) -p $$(@D)
|
13702
|
88 |
$(RM) $$@ $$@.tmp
|
13164
|
89 |
($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp)
|
|
90 |
$(MV) $$@.tmp $$@
|
|
91 |
endef
|
|
92 |
|
|
93 |
#######
|
|
94 |
|
|
95 |
$(foreach I,$(IMPORT_CLASSES), $(eval $(call ImportClasses,$I)))
|
|
96 |
$(foreach I,$(IMPORT_SOURCES), $(eval $(call ImportSources,$I)))
|
|
97 |
$(foreach I,$(IMPORT_BINARIES), $(eval $(call ImportBinaries,$I)))
|
|
98 |
|
|
99 |
IMPORT_TARGET_FILES += $(IMPORT_TARGET_CLASSES) $(IMPORT_TARGET_SOURCES) $(IMPORT_TARGET_BINARIES)
|
|
100 |
|
|
101 |
#######
|
|
102 |
|
|
103 |
ifeq ($(OPENJDK_TARGET_OS),solaris)
|
|
104 |
define do-install-file
|
13702
|
105 |
$(MKDIR) -p '$$(@D)'
|
|
106 |
$(RM) '$$@'
|
13164
|
107 |
$(CP) -r -P '$$<' '$$(@D)'
|
|
108 |
endef
|
|
109 |
else ifeq ($(OPENJDK_TARGET_OS),macosx)
|
|
110 |
define do-install-file
|
13702
|
111 |
$(MKDIR) -p '$$(@D)'
|
|
112 |
$(RM) '$$@'
|
13164
|
113 |
$(CP) -pRP '$$<' '$$@'
|
|
114 |
endef
|
|
115 |
else
|
|
116 |
define do-install-file
|
13702
|
117 |
$(MKDIR) -p '$$(@D)'
|
|
118 |
$(RM) '$$@'
|
13164
|
119 |
$(CP) -P '$$<' '$$@'
|
|
120 |
endef
|
|
121 |
endif
|
|
122 |
|
|
123 |
define CopyDir
|
13702
|
124 |
$1_SRC_FILES := $(shell $(FIND) $2 -type f -a ! -name "wb.jar")
|
13164
|
125 |
$1_DST_FILES := $$(patsubst $2/%,$3/%,$$($1_SRC_FILES))
|
|
126 |
IMPORT_TARGET_FILES += $$($1_DST_FILES)
|
|
127 |
$3/% : $2/%
|
14231
|
128 |
$(ECHO) $(LOG_INFO) Copying $$(@F)
|
13164
|
129 |
$(do-install-file)
|
|
130 |
endef
|
|
131 |
|
|
132 |
#######
|
|
133 |
|
|
134 |
#
|
|
135 |
# Import hotspot
|
|
136 |
#
|
|
137 |
|
|
138 |
$(eval $(call CopyDir,HOTSPOT0, $(HOTSPOT_LIB_DIR), $(INSTALL_LIBRARIES_HERE)))
|
|
139 |
$(eval $(call CopyDir,HOTSPOT1, $(HOTSPOT_DIST)/lib, $(JDK_OUTPUTDIR)/lib))
|
|
140 |
|
13702
|
141 |
JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \
|
|
142 |
$(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
|
13164
|
143 |
|
|
144 |
ifneq ($(OPENJDK_TARGET_OS), windows)
|
|
145 |
ifeq ($(JVM_VARIANT_SERVER), true)
|
|
146 |
IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
|
|
147 |
ifneq (,$(JSIG_DEBUGINFO))
|
|
148 |
IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
|
|
149 |
endif
|
|
150 |
endif
|
|
151 |
ifeq ($(JVM_VARIANT_CLIENT), true)
|
|
152 |
IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
|
|
153 |
ifneq (,$(JSIG_DEBUGINFO))
|
|
154 |
IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
|
|
155 |
endif
|
|
156 |
endif
|
|
157 |
endif
|
|
158 |
|
|
159 |
$(INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
|
13702
|
160 |
$(MKDIR) -p $(@D)
|
|
161 |
$(RM) $@
|
13164
|
162 |
$(LN) -s ../$(@F) $@
|
|
163 |
|
|
164 |
$(INSTALL_LIBRARIES_HERE)/server/%.debuginfo : $(INSTALL_LIBRARIES_HERE)/%.debuginfo
|
13702
|
165 |
$(MKDIR) -p $(@D)
|
|
166 |
$(RM) $@
|
13164
|
167 |
$(LN) -s ../$(@F) $@
|
|
168 |
|
|
169 |
$(INSTALL_LIBRARIES_HERE)/server/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
|
13702
|
170 |
$(MKDIR) -p $(@D)
|
|
171 |
$(RM) $@
|
13164
|
172 |
ifeq (REALLY_WEIRD,1)
|
|
173 |
$(LN) -s ../$(@F) $@
|
|
174 |
else
|
|
175 |
#
|
|
176 |
# TODO: Check if this is what they really want...a zip containing a symlink
|
|
177 |
#
|
13702
|
178 |
$(RM) $@.tmp $(basename $@).debuginfo
|
13164
|
179 |
$(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
|
13702
|
180 |
$(ZIP) -q -y $@.tmp $(basename $@).debuginfo
|
|
181 |
$(RM) $(basename $@).debuginfo
|
|
182 |
$(MV) $@.tmp $@
|
13164
|
183 |
endif
|
|
184 |
|
|
185 |
$(INSTALL_LIBRARIES_HERE)/client/%$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
|
13702
|
186 |
$(MKDIR) -p $(@D)
|
|
187 |
$(RM) $@
|
13164
|
188 |
$(LN) -s ../$(@F) $@
|
|
189 |
|
|
190 |
$(INSTALL_LIBRARIES_HERE)/client/%.debuginfo : $(INSTALL_LIBRARIES_HERE)/%.debuginfo
|
13702
|
191 |
$(MKDIR) -p $(@D)
|
|
192 |
$(RM) $@
|
13164
|
193 |
$(LN) -s ../$(@F) $@
|
|
194 |
|
|
195 |
$(INSTALL_LIBRARIES_HERE)/client/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
|
13702
|
196 |
$(MKDIR) -p $(@D)
|
|
197 |
$(RM) $@
|
13164
|
198 |
ifeq (REALLY_WEIRD,1)
|
|
199 |
$(LN) -s ../$(@F) $@
|
|
200 |
else
|
|
201 |
#
|
|
202 |
# TODO: Check if this is what they really want...a zip containing a symlink
|
|
203 |
#
|
13702
|
204 |
$(RM) $@.tmp $(basename $@).debuginfo
|
13164
|
205 |
$(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
|
13702
|
206 |
$(ZIP) -q -y $@.tmp $(basename $@).debuginfo
|
|
207 |
$(RM) $(basename $@).debuginfo
|
|
208 |
$(MV) $@.tmp $@
|
13164
|
209 |
endif
|
|
210 |
|
|
211 |
#######
|
|
212 |
|
|
213 |
ifeq ($(OPENJDK_TARGET_OS),solaris)
|
|
214 |
define install-file
|
13702
|
215 |
$(MKDIR) -p '$(@D)'
|
|
216 |
$(RM) '$@'
|
13164
|
217 |
$(CP) -r -P '$<' '$(@D)'
|
|
218 |
endef
|
|
219 |
else ifeq ($(OPENJDK_TARGET_OS),macosx)
|
|
220 |
define install-file
|
13702
|
221 |
$(MKDIR) -p '$(@D)'
|
|
222 |
$(RM) '$@'
|
13164
|
223 |
$(CP) -pRP '$<' '$@'
|
|
224 |
endef
|
|
225 |
else
|
|
226 |
define install-file
|
13702
|
227 |
$(MKDIR) -p '$(@D)'
|
|
228 |
$(RM) '$@'
|
13164
|
229 |
$(CP) -P '$<' '$@'
|
|
230 |
endef
|
|
231 |
endif
|
|
232 |
|
|
233 |
ifndef OPENJDK
|
|
234 |
|
|
235 |
IMPORT_TARGET_FILES += \
|
|
236 |
$(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar \
|
14231
|
237 |
$(JDK_OUTPUTDIR)/lib/security/local_policy.jar
|
13164
|
238 |
|
|
239 |
$(JDK_OUTPUTDIR)/lib/security/local_policy.jar: $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
|
14231
|
240 |
$(ECHO) $(LOG_INFO) Copying $(@F)
|
13164
|
241 |
$(install-file)
|
|
242 |
|
|
243 |
$(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar: $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
|
14231
|
244 |
$(ECHO) $(LOG_INFO) Copying $(@F)
|
13164
|
245 |
$(install-file)
|
|
246 |
|
|
247 |
endif # OPENJDK
|
|
248 |
|
|
249 |
#######
|
|
250 |
|
|
251 |
all: $(IMPORT_TARGET_FILES)
|