79 include ./make/sponsors-rules.gmk |
90 include ./make/sponsors-rules.gmk |
80 include ./make/deploy-rules.gmk |
91 include ./make/deploy-rules.gmk |
81 |
92 |
82 all:: setup build |
93 all:: setup build |
83 |
94 |
84 setup: |
95 setup: openjdk_check |
85 $(MKDIR) -p $(OUTPUTDIR)/j2sdk-image |
96 $(MKDIR) -p $(OUTPUTDIR)/j2sdk-image |
86 $(MKDIR) -p $(ABS_OUTPUTDIR)/j2sdk-image |
97 $(MKDIR) -p $(ABS_OUTPUTDIR)/j2sdk-image |
87 $(MKDIR) -p $(OUTPUTDIR)-fastdebug/j2sdk-image |
98 $(MKDIR) -p $(OUTPUTDIR)-fastdebug/j2sdk-image |
88 $(MKDIR) -p $(ABS_OUTPUTDIR)-fastdebug/j2sdk-image |
99 $(MKDIR) -p $(ABS_OUTPUTDIR)-fastdebug/j2sdk-image |
|
100 |
|
101 # Check on whether we really can build the openjdk, need source etc. |
|
102 openjdk_check: |
|
103 ifneq ($(SKIP_OPENJDK_BUILD), true) |
|
104 @$(ECHO) " " |
|
105 @$(ECHO) "=================================================" |
|
106 @if [ ! -r $(OPENJDK_BUILDDIR)/Makefile ] ; then \ |
|
107 $(ECHO) "ERROR: No openjdk source tree available at: $(OPENJDK_BUILDDIR)"; \ |
|
108 exit 1; \ |
|
109 else \ |
|
110 $(ECHO) "OpenJDK will be built after JDK is built"; \ |
|
111 $(ECHO) " OPENJDK_BUILDDIR=$(OPENJDK_BUILDDIR)"; \ |
|
112 fi |
|
113 @$(ECHO) "=================================================" |
|
114 @$(ECHO) " " |
|
115 endif |
89 |
116 |
90 build:: sanity |
117 build:: sanity |
91 |
118 |
92 clobber:: |
119 clobber:: |
93 |
120 |
188 |
215 |
189 ifneq ($(SKIP_COMPARE_IMAGES), true) |
216 ifneq ($(SKIP_COMPARE_IMAGES), true) |
190 all :: compare-image |
217 all :: compare-image |
191 endif |
218 endif |
192 |
219 |
193 ifeq ($(SKIP_OPENJDK_BUILD), false) |
220 ifneq ($(SKIP_OPENJDK_BUILD), true) |
|
221 all :: openjdk_build |
|
222 endif |
|
223 |
|
224 # If we have bundle rules, we have a chance here to do a complete cycle |
|
225 # build, of production and open build. |
|
226 # FIXUP: We should create the openjdk source bundle and build that? |
|
227 # But how do we reliable create or get at a formal openjdk source tree? |
|
228 # The one we have needs to be trimmed of built bits and closed dirs. |
|
229 # The repositories might not be available. |
|
230 # The openjdk source bundle is probably not available. |
|
231 |
|
232 ifneq ($(SKIP_OPENJDK_BUILD), true) |
194 ifeq ($(BUILD_JDK), true) |
233 ifeq ($(BUILD_JDK), true) |
195 ifeq ($(BUNDLE_RULES_AVAILABLE), true) |
234 ifeq ($(BUNDLE_RULES_AVAILABLE), true) |
196 # If we have bundle rules, we have a chance here to do a complete cycle |
235 |
197 # build, of closed and open build. |
236 OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME) |
198 # FIXUP: We should create the openjdk source bundle and build that? |
237 OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/open-output |
199 ABS_OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME) |
238 OPENJDK_BUILD_NAME \ |
200 ABS_OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/openjdk |
239 = openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE) |
201 OPENJDK_BUILD_NAME_PREFIX \ |
240 OPENJDK_BUILD_BINARY_ZIP=$(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip |
202 = $(J2SDK_NAME)-$(JDK_MKTG_UNDERSCORE_VERSION)-$(MILESTONE) |
241 BUILT_IMAGE=$(ABS_OUTPUTDIR)/j2sdk-image |
203 OPENJDK_BUILD_NAME_SUFFIX \ |
242 ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64) |
204 = $(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE) |
243 OPENJDK_BOOTDIR=$(BOOTDIR) |
205 OPENJDK_BUILD_NAME \ |
244 OPENJDK_IMPORTJDK=$(JDK_IMPORT_PATH) |
206 = $(OPENJDK_BUILD_NAME_PREFIX)-openjdk-$(OPENJDK_BUILD_NAME_SUFFIX) |
245 else |
207 OPENJDK_BUILD_BINARY_ZIP \ |
246 OPENJDK_BOOTDIR=$(BUILT_IMAGE) |
208 = $(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip |
247 OPENJDK_IMPORTJDK=$(BUILT_IMAGE) |
209 all :: openjdk-build |
248 endif |
210 openjdk-build: |
249 |
|
250 openjdk_build: |
211 @$(ECHO) " " |
251 @$(ECHO) " " |
212 @$(ECHO) "=================================================" |
252 @$(ECHO) "=================================================" |
213 @$(ECHO) "Starting openjdk build" |
253 @$(ECHO) "Starting openjdk build" |
|
254 @$(ECHO) " Using: ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR)" |
214 @$(ECHO) "=================================================" |
255 @$(ECHO) "=================================================" |
215 @$(ECHO) " " |
256 @$(ECHO) " " |
216 $(RM) -r $(ABS_OPENJDK_OUTPUTDIR) |
257 $(RM) -r $(OPENJDK_OUTPUTDIR) |
217 $(MKDIR) -p $(ABS_OPENJDK_OUTPUTDIR) |
258 $(MKDIR) -p $(OPENJDK_OUTPUTDIR) |
218 $(MAKE) OPENJDK=true \ |
259 ($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \ |
219 BUILD_LANGTOOLS=$(BUILD_LANGTOOLS) \ |
260 OPENJDK=true \ |
220 BUILD_CORBA=$(BUILD_CORBA) \ |
261 ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \ |
221 BUILD_JAXP=$(BUILD_JAXP) \ |
262 ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \ |
222 BUILD_JAXWS=$(BUILD_JAXWS) \ |
263 ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \ |
223 BUILD_HOTSPOT=$(BUILD_HOTSPOT) \ |
264 ALT_BOOTDIR=$(OPENJDK_BOOTDIR) \ |
224 ALT_OUTPUTDIR=$(ABS_OPENJDK_OUTPUTDIR) \ |
265 ALT_JDK_IMPORT_PATH=$(OPENJDK_IMPORTJDK) \ |
225 ALT_BINARY_PLUGS_PATH=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME) \ |
266 product_build ) |
226 ALT_BOOTDIR=$(ABS_OUTPUTDIR)/j2sdk-image \ |
|
227 ALT_JDK_IMPORT_PATH=$(ABS_OUTPUTDIR)/j2sdk-image \ |
|
228 product_build |
|
229 $(RM) $(OPENJDK_BUILD_BINARY_ZIP) |
267 $(RM) $(OPENJDK_BUILD_BINARY_ZIP) |
230 ( $(CD) $(ABS_OPENJDK_OUTPUTDIR)/j2sdk-image && \ |
268 ( $(CD) $(OPENJDK_OUTPUTDIR)/j2sdk-image && \ |
231 $(ZIPEXE) -q -r $(OPENJDK_BUILD_BINARY_ZIP) .) |
269 $(ZIPEXE) -q -r $(OPENJDK_BUILD_BINARY_ZIP) .) |
232 $(RM) -r $(ABS_OPENJDK_OUTPUTDIR) |
270 $(RM) -r $(OPENJDK_OUTPUTDIR) |
|
271 @$(ECHO) " " |
|
272 @$(ECHO) "=================================================" |
|
273 @$(ECHO) "Finished openjdk build" |
|
274 @$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)" |
|
275 @$(ECHO) "=================================================" |
|
276 @$(ECHO) " " |
|
277 |
233 endif |
278 endif |
234 endif |
279 endif |
235 endif |
280 endif |
236 |
281 |
237 clobber:: |
282 clobber:: |
430 |
475 |
431 ################################################################ |
476 ################################################################ |
432 # Cycle build. Build the jdk, use it to build the jdk again. |
477 # Cycle build. Build the jdk, use it to build the jdk again. |
433 ################################################################ |
478 ################################################################ |
434 |
479 |
435 ABS_BOOTJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk |
480 ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk |
436 |
481 |
437 boot_cycle: |
482 boot_cycle: |
438 $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTJDK_OUTPUTDIR) product_build |
483 $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) product_build |
439 $(MAKE) ALT_BOOTDIR=$(ABS_BOOTJDK_OUTPUTDIR)/j2sdk-image product_build |
484 $(MAKE) ALT_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image product_build |
440 |
485 |
441 ################################################################ |
486 ################################################################ |
442 # JPRT rule to build |
487 # JPRT rule to build |
443 ################################################################ |
488 ################################################################ |
444 |
489 |