1.1 --- a/common/makefiles/Jprt.gmk Mon Feb 04 10:53:38 2013 +0100 1.2 +++ b/common/makefiles/Jprt.gmk Mon Feb 04 11:02:03 2013 +0100 1.3 @@ -179,27 +179,52 @@ 1.4 $(JPRT_ARCHIVE_BUNDLE): bundles 1.5 $(MKDIR) -p $(@D) 1.6 $(RM) $@ 1.7 - $(CP) $(BUILD_OUTPUT)/bundles/j2sdk-image.zip $@ 1.8 + $(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@ 1.9 1.10 -# This target must be called in the context of a SPEC file 1.11 -bundles: all 1.12 +ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64) 1.13 + SRC_JDK_IMAGE_DIR := $(JDK_OVERLAY_IMAGE_DIR) 1.14 + SRC_JRE_IMAGE_DIR := $(JRE_OVERLAY_IMAGE_DIR) 1.15 +else 1.16 + SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR) 1.17 + SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR) 1.18 +endif 1.19 +SRC_JDK_BUNDLE_DIR := $(JDK_BUNDLE_DIR) 1.20 +SRC_JRE_BUNDLE_DIR := $(JRE_BUNDLE_DIR) 1.21 + 1.22 +# Bundle up the images 1.23 +bundles: all bundles-only 1.24 +bundles-only: start-make 1.25 @$(call TargetEnter) 1.26 $(MKDIR) -p $(BUILD_OUTPUT)/bundles 1.27 -ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64) 1.28 - $(CD) $(JDK_OVERLAY_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2sdk-image.zip . 1.29 - $(CD) $(JRE_OVERLAY_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2re-image.zip . 1.30 -else 1.31 - $(CD) $(JDK_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2sdk-image.zip . 1.32 - $(CD) $(JRE_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2re-image.zip . 1.33 + $(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip . 1.34 + $(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip . 1.35 if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \ 1.36 $(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \ 1.37 fi 1.38 + @$(call TargetExit) 1.39 + 1.40 +# Copy images to one unified location regardless of platform etc. 1.41 +final-images: all final-images-only 1.42 +final-images-only: start-make 1.43 + @$(call TargetEnter) 1.44 + $(RM) -r $(BUILD_OUTPUT)/final-images 1.45 + $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR) 1.46 + $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR) 1.47 + $(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/ 1.48 + $(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/ 1.49 +ifeq ($(OPENJDK_TARGET_OS),macosx) 1.50 + $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR) 1.51 + $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR) 1.52 + $(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/ 1.53 + $(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/ 1.54 endif 1.55 @$(call TargetExit) 1.56 1.57 + 1.58 # Keep track of phony targets 1.59 PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \ 1.60 - jprt_build_generic bundles jprt_bundle 1.61 + jprt_build_generic bundles jprt_bundle \ 1.62 + final-images final-images-only 1.63 1.64 ########################################################################### 1.65 # Phony targets