38 IMPORT_BINARIES := CORBA |
38 IMPORT_BINARIES := CORBA |
39 |
39 |
40 ####### |
40 ####### |
41 |
41 |
42 # Put the libraries here. Different locations for different target apis. |
42 # Put the libraries here. Different locations for different target apis. |
43 ifeq ($(OPENJDK_TARGET_OS_API),posix) |
43 ifeq ($(OPENJDK_TARGET_OS_API), posix) |
44 INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR) |
44 INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR) |
45 HOTSPOT_LIB_DIR:=$(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR) |
45 HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR) |
46 else |
46 else |
47 INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/bin |
47 INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/bin |
48 HOTSPOT_LIB_DIR:=$(HOTSPOT_DIST)/jre/bin |
48 HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/jre/bin |
49 endif |
49 endif |
50 |
50 |
51 ####### |
51 ####### |
52 |
52 |
53 # |
53 # |
54 # jar xf/unzip fails when executing them all in parallel |
54 # jar xf/unzip fails when executing them all in parallel |
55 # introduce artificial dependency (_DEP) buuhhh |
55 # introduce artificial dependency (_DEP) buuhhh |
56 |
56 |
57 define ImportClasses |
57 define ImportClasses |
58 $1_CLASSES_DEP := $$(IMPORT_TARGET_CLASSES) |
58 $1_CLASSES_DEP := $$(IMPORT_TARGET_CLASSES) |
59 IMPORT_TARGET_CLASSES += $(JDK_OUTPUTDIR)/classes/_the.$1.classes.imported |
59 IMPORT_TARGET_CLASSES += $(JDK_OUTPUTDIR)/classes/_the.$1.classes.imported |
60 |
60 |
61 $(JDK_OUTPUTDIR)/classes/_the.$1.classes.imported : $$($1_DIST)/lib/classes.jar $$($1_CLASSES_DEP) |
61 $(JDK_OUTPUTDIR)/classes/_the.$1.classes.imported: $$($1_DIST)/lib/classes.jar $$($1_CLASSES_DEP) |
62 $(ECHO) Importing $1 classes.jar |
62 $(ECHO) Importing $1 classes.jar |
63 $(MKDIR) -p $$(@D) |
63 $(MKDIR) -p $$(@D) |
64 $(RM) $$@ $$@.tmp |
64 $(RM) $$@ $$@.tmp |
65 ($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp) |
65 ($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp) |
66 $(MV) $$@.tmp $$@ |
66 $(MV) $$@.tmp $$@ |
67 endef |
67 endef |
68 |
68 |
69 define ImportSources |
69 define ImportSources |
70 $1_SOURCES_DEP := $$(IMPORT_TARGET_SOURCES) |
70 $1_SOURCES_DEP := $$(IMPORT_TARGET_SOURCES) |
71 IMPORT_TARGET_SOURCES += $(JDK_OUTPUTDIR)/impsrc/_the.$1.src.imported |
71 IMPORT_TARGET_SOURCES += $(JDK_OUTPUTDIR)/impsrc/_the.$1.src.imported |
72 |
72 |
73 $(JDK_OUTPUTDIR)/impsrc/_the.$1.src.imported : $$($1_DIST)/lib/src.zip $$($1_SOURCES_DEP) |
73 $(JDK_OUTPUTDIR)/impsrc/_the.$1.src.imported: $$($1_DIST)/lib/src.zip $$($1_SOURCES_DEP) |
74 $(ECHO) Importing $1 src.zip |
74 $(ECHO) Importing $1 src.zip |
75 $(MKDIR) -p $$(@D) |
75 $(MKDIR) -p $$(@D) |
76 $(RM) $$@ $$@.tmp |
76 $(RM) $$@ $$@.tmp |
77 ($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp) |
77 ($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp) |
78 $(MV) $$@.tmp $$@ |
78 $(MV) $$@.tmp $$@ |
79 endef |
79 endef |
80 |
80 |
81 define ImportBinaries |
81 define ImportBinaries |
82 $1_BINARIES_DEP := $$(IMPORT_TARGET_BINARIES) |
82 $1_BINARIES_DEP := $$(IMPORT_TARGET_BINARIES) |
83 IMPORT_TARGET_BINARIES += $(JDK_OUTPUTDIR)/_the.$1.binaries.imported |
83 IMPORT_TARGET_BINARIES += $(JDK_OUTPUTDIR)/_the.$1.binaries.imported |
84 |
84 |
85 $(JDK_OUTPUTDIR)/_the.$1.binaries.imported : $$($1_DIST)/lib/bin.zip $$($1_BINARIES_DEP) |
85 $(JDK_OUTPUTDIR)/_the.$1.binaries.imported: $$($1_DIST)/lib/bin.zip $$($1_BINARIES_DEP) |
86 $(ECHO) Importing $1 bin.zip |
86 $(ECHO) Importing $1 bin.zip |
87 $(MKDIR) -p $$(@D) |
87 $(MKDIR) -p $$(@D) |
88 $(RM) $$@ $$@.tmp |
88 $(RM) $$@ $$@.tmp |
89 ($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp) |
89 ($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp) |
90 $(MV) $$@.tmp $$@ |
90 $(MV) $$@.tmp $$@ |
91 endef |
91 endef |
92 |
92 |
93 ####### |
93 ####### |
94 |
94 |
95 $(foreach I,$(IMPORT_CLASSES), $(eval $(call ImportClasses,$I))) |
95 $(foreach I, $(IMPORT_CLASSES), $(eval $(call ImportClasses,$I))) |
96 $(foreach I,$(IMPORT_SOURCES), $(eval $(call ImportSources,$I))) |
96 $(foreach I, $(IMPORT_SOURCES), $(eval $(call ImportSources,$I))) |
97 $(foreach I,$(IMPORT_BINARIES), $(eval $(call ImportBinaries,$I))) |
97 $(foreach I, $(IMPORT_BINARIES), $(eval $(call ImportBinaries,$I))) |
98 |
98 |
99 IMPORT_TARGET_FILES += $(IMPORT_TARGET_CLASSES) $(IMPORT_TARGET_SOURCES) $(IMPORT_TARGET_BINARIES) |
99 IMPORT_TARGET_FILES += $(IMPORT_TARGET_CLASSES) $(IMPORT_TARGET_SOURCES) $(IMPORT_TARGET_BINARIES) |
100 |
100 |
101 ####### |
101 ####### |
102 |
102 |
103 define CopyDir |
103 define CopyDir |
104 $1_SRC_FILES := $(shell $(FIND) $2 -type f -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE),$4) \)) |
104 $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)) |
105 $1_DST_FILES := $$(patsubst $2/%,$3/%,$$($1_SRC_FILES)) |
106 IMPORT_TARGET_FILES += $$($1_DST_FILES) |
106 IMPORT_TARGET_FILES += $$($1_DST_FILES) |
107 $3/% : $2/% |
107 $3/%: $2/% |
108 $(ECHO) $(LOG_INFO) Copying $$(@F) |
108 $(ECHO) $(LOG_INFO) Copying $$(@F) |
109 $$(install-file) |
109 $$(install-file) |
110 endef |
110 endef |
111 |
111 |
112 ####### |
112 ####### |
113 |
113 |
114 # |
114 # |
115 # Import hotspot |
115 # Import hotspot |
116 # |
116 # |
117 HOTSPOT_IMPORT_FILES:=$(addprefix $(LIBRARY_PREFIX), jvm.* saproc.* jsig.* sawindbg.* jvm_db.* jvm_dtrace.*) \ |
117 HOTSPOT_IMPORT_FILES := $(addprefix $(LIBRARY_PREFIX), jvm.* saproc.* jsig.* sawindbg.* jvm_db.* jvm_dtrace.*) \ |
118 Xusage.txt sa-jdi.jar |
118 Xusage.txt sa-jdi.jar |
119 $(eval $(call CopyDir,HOTSPOT0, $(HOTSPOT_LIB_DIR), $(INSTALL_LIBRARIES_HERE), $(HOTSPOT_IMPORT_FILES))) |
119 $(eval $(call CopyDir,HOTSPOT0, $(HOTSPOT_LIB_DIR), $(INSTALL_LIBRARIES_HERE), $(HOTSPOT_IMPORT_FILES))) |
120 $(eval $(call CopyDir,HOTSPOT1, $(HOTSPOT_DIST)/lib, $(JDK_OUTPUTDIR)/lib, $(HOTSPOT_IMPORT_FILES))) |
120 $(eval $(call CopyDir,HOTSPOT1, $(HOTSPOT_DIST)/lib, $(JDK_OUTPUTDIR)/lib, $(HOTSPOT_IMPORT_FILES))) |
121 |
121 |
122 JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \ |
122 JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \ |
123 $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) ) |
123 $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) ) |
124 |
124 |
125 ifneq ($(OPENJDK_TARGET_OS), windows) |
125 ifneq ($(OPENJDK_TARGET_OS), windows) |
126 ifeq ($(JVM_VARIANT_SERVER), true) |
126 ifeq ($(JVM_VARIANT_SERVER), true) |
127 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) |
127 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) |
128 ifneq (,$(JSIG_DEBUGINFO)) |
128 ifneq (, $(JSIG_DEBUGINFO)) |
129 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I)) |
129 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I)) |
130 endif |
130 endif |
131 endif |
131 endif |
132 ifeq ($(JVM_VARIANT_CLIENT), true) |
132 ifeq ($(JVM_VARIANT_CLIENT), true) |
133 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) |
133 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) |
134 ifneq (,$(JSIG_DEBUGINFO)) |
134 ifneq (, $(JSIG_DEBUGINFO)) |
135 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I)) |
135 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I)) |
136 endif |
136 endif |
137 endif |
137 endif |
138 ifeq ($(JVM_VARIANT_MINIMAL1), true) |
138 ifeq ($(JVM_VARIANT_MINIMAL1), true) |
139 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) |
139 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) |
140 ifneq (,$(JSIG_DEBUGINFO)) |
140 ifneq (, $(JSIG_DEBUGINFO)) |
141 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I)) |
141 IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I)) |
142 endif |
142 endif |
143 endif |
143 endif |
144 endif |
144 endif |
145 |
145 |
146 $(INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX) |
146 $(INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX) |
147 $(MKDIR) -p $(@D) |
147 $(MKDIR) -p $(@D) |
148 $(RM) $@ |
148 $(RM) $@ |
149 $(LN) -s ../$(@F) $@ |
149 $(LN) -s ../$(@F) $@ |
150 |
150 |
151 $(INSTALL_LIBRARIES_HERE)/server/%.debuginfo : $(INSTALL_LIBRARIES_HERE)/%.debuginfo |
151 $(INSTALL_LIBRARIES_HERE)/server/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo |
152 $(MKDIR) -p $(@D) |
152 $(MKDIR) -p $(@D) |
153 $(RM) $@ |
153 $(RM) $@ |
154 $(LN) -s ../$(@F) $@ |
154 $(LN) -s ../$(@F) $@ |
155 |
155 |
156 $(INSTALL_LIBRARIES_HERE)/server/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz |
156 $(INSTALL_LIBRARIES_HERE)/server/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz |
157 $(MKDIR) -p $(@D) |
157 $(MKDIR) -p $(@D) |
158 $(RM) $@ |
158 $(RM) $@ |
159 $(RM) $@.tmp $(basename $@).debuginfo |
159 $(RM) $@.tmp $(basename $@).debuginfo |
160 $(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo |
160 $(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo |
161 $(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo |
161 $(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo |
162 $(RM) $(basename $@).debuginfo |
162 $(RM) $(basename $@).debuginfo |
163 $(MV) $@.tmp $@ |
163 $(MV) $@.tmp $@ |
164 |
164 |
165 $(INSTALL_LIBRARIES_HERE)/client/%$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX) |
165 $(INSTALL_LIBRARIES_HERE)/client/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX) |
166 $(MKDIR) -p $(@D) |
166 $(MKDIR) -p $(@D) |
167 $(RM) $@ |
167 $(RM) $@ |
168 $(LN) -s ../$(@F) $@ |
168 $(LN) -s ../$(@F) $@ |
169 |
169 |
170 $(INSTALL_LIBRARIES_HERE)/client/%.debuginfo : $(INSTALL_LIBRARIES_HERE)/%.debuginfo |
170 $(INSTALL_LIBRARIES_HERE)/client/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo |
171 $(MKDIR) -p $(@D) |
171 $(MKDIR) -p $(@D) |
172 $(RM) $@ |
172 $(RM) $@ |
173 $(LN) -s ../$(@F) $@ |
173 $(LN) -s ../$(@F) $@ |
174 |
174 |
175 $(INSTALL_LIBRARIES_HERE)/client/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz |
175 $(INSTALL_LIBRARIES_HERE)/client/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz |
176 $(MKDIR) -p $(@D) |
176 $(MKDIR) -p $(@D) |
177 $(RM) $@ |
177 $(RM) $@ |
178 $(RM) $@.tmp $(basename $@).debuginfo |
178 $(RM) $@.tmp $(basename $@).debuginfo |
179 $(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo |
179 $(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo |
180 $(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo |
180 $(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo |
181 $(RM) $(basename $@).debuginfo |
181 $(RM) $(basename $@).debuginfo |
182 $(MV) $@.tmp $@ |
182 $(MV) $@.tmp $@ |
183 |
183 |
184 $(INSTALL_LIBRARIES_HERE)/minimal/%$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX) |
184 $(INSTALL_LIBRARIES_HERE)/minimal/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX) |
185 $(MKDIR) -p $(@D) |
185 $(MKDIR) -p $(@D) |
186 $(RM) $@ |
186 $(RM) $@ |
187 $(LN) -s ../$(@F) $@ |
187 $(LN) -s ../$(@F) $@ |
188 |
188 |
189 $(INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo : $(INSTALL_LIBRARIES_HERE)/%.debuginfo |
189 $(INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo |
190 $(MKDIR) -p $(@D) |
190 $(MKDIR) -p $(@D) |
191 $(RM) $@ |
191 $(RM) $@ |
192 $(LN) -s ../$(@F) $@ |
192 $(LN) -s ../$(@F) $@ |
193 |
193 |
194 $(INSTALL_LIBRARIES_HERE)/minimal/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz |
194 $(INSTALL_LIBRARIES_HERE)/minimal/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz |
195 $(MKDIR) -p $(@D) |
195 $(MKDIR) -p $(@D) |
196 $(RM) $@ |
196 $(RM) $@ |
197 $(RM) $@.tmp $(basename $@).debuginfo |
197 $(RM) $@.tmp $(basename $@).debuginfo |
198 $(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo |
198 $(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo |
199 $(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo |
199 $(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo |
200 $(RM) $(basename $@).debuginfo |
200 $(RM) $(basename $@).debuginfo |
201 $(MV) $@.tmp $@ |
201 $(MV) $@.tmp $@ |
202 |
202 |
203 ########################################################################################## |
203 ########################################################################################## |
204 # Unpack the binary distributions of the crypto classes if they exist. |
204 # Unpack the binary distributions of the crypto classes if they exist. |
205 SEC_FILES_ZIP:=$(JDK_TOPDIR)/make/tools/crypto/sec-bin.zip |
205 SEC_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/sec-bin.zip |
206 SEC_FILES_WIN_ZIP:=$(JDK_TOPDIR)/make/tools/crypto/sec-windows-bin.zip |
206 SEC_FILES_WIN_ZIP := $(JDK_TOPDIR)/make/tools/crypto/sec-windows-bin.zip |
207 JGSS_WIN32_FILES_ZIP:=$(JDK_TOPDIR)/make/tools/crypto/jgss-windows-i586-bin.zip |
207 JGSS_WIN32_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/jgss-windows-i586-bin.zip |
208 JGSS_WIN64_FILES_ZIP:=$(JDK_TOPDIR)/make/tools/crypto/jgss-windows-x64-bin.zip |
208 JGSS_WIN64_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/jgss-windows-x64-bin.zip |
209 |
209 |
210 define unzip-sec-file |
210 define unzip-sec-file |
211 $(ECHO) Unzipping $(<F) |
211 $(ECHO) Unzipping $(<F) |
212 $(MKDIR) -p $(@D) |
212 $(MKDIR) -p $(@D) |
213 $(RM) $@ |
213 $(RM) $@ |