26 default: all |
26 default: all |
27 |
27 |
28 include $(SPEC) |
28 include $(SPEC) |
29 include MakeBase.gmk |
29 include MakeBase.gmk |
30 |
30 |
31 ####### |
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 |
32 |
42 # Put the libraries here. Different locations for different target apis. |
33 # Put the libraries here. Different locations for different target apis. |
43 ifeq ($(OPENJDK_TARGET_OS_API), posix) |
34 ifeq ($(OPENJDK_TARGET_OS_API), posix) |
44 INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR) |
35 INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR) |
45 HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR) |
36 HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR) |
46 else |
37 else |
47 INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/bin |
38 INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/bin |
48 HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/jre/bin |
39 HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/jre/bin |
49 endif |
40 endif |
50 |
41 |
51 ####### |
42 ################################################################################ |
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) |
|
64 $(RM) $$@ $$@.tmp |
|
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) |
|
76 $(RM) $$@ $$@.tmp |
|
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) |
|
88 $(RM) $$@ $$@.tmp |
|
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 |
43 |
103 define CopyDir |
44 define CopyDir |
104 $1_SRC_FILES := $(shell $(FIND) $2 -type f -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE),$4) \)) |
45 $1_SRC_FILES := $(shell $(FIND) $2 -type f -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE),$4) \)) |
105 $1_DST_FILES := $$(patsubst $2/%,$3/%,$$($1_SRC_FILES)) |
46 $1_DST_FILES := $$(patsubst $2/%,$3/%,$$($1_SRC_FILES)) |
106 IMPORT_TARGET_FILES += $$($1_DST_FILES) |
47 HOTSPOT_IMPORT_TARGET_FILES += $$($1_DST_FILES) |
107 $3/%: $2/% |
48 $3/%: $2/% |
108 $(ECHO) $(LOG_INFO) Copying $$(@F) |
49 $(ECHO) $(LOG_INFO) Copying $$(@F) |
109 $$(install-file) |
50 $$(install-file) |
110 endef |
51 endef |
111 |
52 |
112 ####### |
53 ################################################################################ |
113 |
54 |
114 # |
55 # |
115 # Import hotspot |
56 # Import hotspot |
116 # |
57 # |
117 HOTSPOT_IMPORT_FILES := $(addprefix $(LIBRARY_PREFIX), jvm.* saproc.* jsig.* sawindbg.* jvm_db.* jvm_dtrace.*) \ |
58 HOTSPOT_IMPORT_FILES := $(addprefix $(LIBRARY_PREFIX), jvm.* saproc.* jsig.* sawindbg.* jvm_db.* jvm_dtrace.*) \ |
127 $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) ) |
68 $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) ) |
128 endif |
69 endif |
129 |
70 |
130 ifneq ($(OPENJDK_TARGET_OS), windows) |
71 ifneq ($(OPENJDK_TARGET_OS), windows) |
131 ifeq ($(JVM_VARIANT_SERVER), true) |
72 ifeq ($(JVM_VARIANT_SERVER), true) |
132 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) |
73 HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) |
133 ifneq (, $(JSIG_DEBUGINFO)) |
74 ifneq (, $(JSIG_DEBUGINFO)) |
134 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I)) |
75 HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I)) |
135 endif |
76 endif |
136 endif |
77 endif |
137 ifeq ($(JVM_VARIANT_CLIENT), true) |
78 ifeq ($(JVM_VARIANT_CLIENT), true) |
138 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) |
79 HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) |
139 ifneq (, $(JSIG_DEBUGINFO)) |
80 ifneq (, $(JSIG_DEBUGINFO)) |
140 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I)) |
81 HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I)) |
141 endif |
82 endif |
142 endif |
83 endif |
143 ifneq ($(OPENJDK_TARGET_OS), macosx) |
84 ifneq ($(OPENJDK_TARGET_OS), macosx) |
144 ifeq ($(JVM_VARIANT_MINIMAL1), true) |
85 ifeq ($(JVM_VARIANT_MINIMAL1), true) |
145 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) |
86 HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) |
146 ifneq (,$(JSIG_DEBUGINFO)) |
87 ifneq (,$(JSIG_DEBUGINFO)) |
147 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I)) |
88 HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I)) |
148 endif |
89 endif |
149 endif |
90 endif |
150 endif |
91 endif |
151 endif |
92 endif |
152 |
93 |
240 $(RM) $(basename $@).debuginfo |
181 $(RM) $(basename $@).debuginfo |
241 $(MV) $@.tmp $@ |
182 $(MV) $@.tmp $@ |
242 endif |
183 endif |
243 |
184 |
244 ########################################################################################## |
185 ########################################################################################## |
245 # Unpack the binary distributions of the crypto classes if they exist. |
|
246 SEC_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/sec-bin.zip |
|
247 SEC_FILES_WIN_ZIP := $(JDK_TOPDIR)/make/tools/crypto/sec-windows-bin.zip |
|
248 JGSS_WIN32_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/jgss-windows-i586-bin.zip |
|
249 JGSS_WIN64_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/jgss-windows-x64-bin.zip |
|
250 |
186 |
251 define unzip-sec-file |
187 hotspot: $(HOTSPOT_IMPORT_TARGET_FILES) |
252 $(ECHO) Unzipping $(<F) |
|
253 $(MKDIR) -p $(@D) |
|
254 $(RM) $@ |
|
255 ($(CD) $(JDK_OUTPUTDIR) && $(UNZIP) -q -o $< > $@.tmp) |
|
256 $(MV) $@.tmp $@ |
|
257 endef |
|
258 |
188 |
259 $(JDK_OUTPUTDIR)/classes/_the.sec-bin.unzipped: $(SEC_FILES_ZIP) |
189 all: hotspot |
260 $(call unzip-sec-file) |
|
261 |
190 |
262 $(JDK_OUTPUTDIR)/classes/_the.sec-windows-bin.unzipped: $(SEC_FILES_WIN_ZIP) |
191 .PHONY: hotspot all |
263 $(call unzip-sec-file) |
|
264 |
|
265 $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-i586-bin.unzipped: $(JGSS_WIN32_FILES_ZIP) |
|
266 $(call unzip-sec-file) |
|
267 |
|
268 $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-x64-bin.unzipped: $(JGSS_WIN64_FILES_ZIP) |
|
269 $(call unzip-sec-file) |
|
270 |
|
271 ifneq ($(wildcard $(SEC_FILES_ZIP)), ) |
|
272 IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.sec-bin.unzipped |
|
273 ifeq ($(OPENJDK_TARGET_OS), windows) |
|
274 IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.sec-windows-bin.unzipped |
|
275 ifeq ($(OPENJDK_TARGET_CPU), x86) |
|
276 IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-i586-bin.unzipped |
|
277 endif |
|
278 ifeq ($(OPENJDK_TARGET_CPU), x86_64) |
|
279 IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-x64-bin.unzipped |
|
280 endif |
|
281 endif |
|
282 endif |
|
283 |
|
284 ########################################################################################## |
|
285 |
|
286 all: $(IMPORT_TARGET_FILES) |
|