erikj@559: # ksrini@806: # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. erikj@559: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. erikj@559: # erikj@559: # This code is free software; you can redistribute it and/or modify it erikj@559: # under the terms of the GNU General Public License version 2 only, as erikj@559: # published by the Free Software Foundation. Oracle designates this erikj@559: # particular file as subject to the "Classpath" exception as provided erikj@559: # by Oracle in the LICENSE file that accompanied this code. erikj@559: # erikj@559: # This code is distributed in the hope that it will be useful, but WITHOUT erikj@559: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or erikj@559: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License erikj@559: # version 2 for more details (a copy is included in the LICENSE file that erikj@559: # accompanied this code). erikj@559: # erikj@559: # You should have received a copy of the GNU General Public License version erikj@559: # 2 along with this work; if not, write to the Free Software Foundation, erikj@559: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. erikj@559: # erikj@559: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA erikj@559: # or visit www.oracle.com if you need additional information or have any erikj@559: # questions. erikj@559: # erikj@559: mikael@1140: # This file is contains targets utilities needed by JPRT. erikj@559: asaha@1129: ifdef ALT_BSDIFF_DIR asaha@1129: @$(ECHO) " --with-bsdiff-dir=$(call UnixPath,$(ALT_BSDIFF_DIR)) " >> $@.tmp asaha@1129: endif erikj@559: ifndef JPRT_ARCHIVE_BUNDLE erikj@559: JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip erikj@559: endif tbell@589: ifndef JPRT_ARCHIVE_INSTALL_BUNDLE ihse@839: JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip tbell@589: endif erikj@559: mikael@1155: ifeq ($(SKIP_BOOT_CYCLE), false) mikael@1155: jprt_bundle: bootcycle-images mikael@1155: endif erikj@559: erikj@559: # This target must be called in the context of a SPEC file erikj@559: jprt_bundle: $(JPRT_ARCHIVE_BUNDLE) erikj@559: @$(call CheckIfMakeAtEnd) erikj@559: erikj@559: # This target must be called in the context of a SPEC file erikj@559: $(JPRT_ARCHIVE_BUNDLE): bundles erikj@559: $(MKDIR) -p $(@D) erikj@559: $(RM) $@ erikj@610: $(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@ erikj@559: ksrini@806: SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR) ksrini@806: SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR) erikj@610: SRC_JDK_BUNDLE_DIR := $(JDK_BUNDLE_DIR) erikj@610: SRC_JRE_BUNDLE_DIR := $(JRE_BUNDLE_DIR) erikj@610: erikj@610: # Bundle up the images erikj@610: bundles: all bundles-only erikj@610: bundles-only: start-make erikj@559: @$(call TargetEnter) erikj@559: $(MKDIR) -p $(BUILD_OUTPUT)/bundles ksrini@806: $(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip . ksrini@806: $(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip . ihse@839: if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \ ihse@839: $(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \ ihse@839: fi erikj@610: @$(call TargetExit) erikj@610: erikj@610: # Copy images to one unified location regardless of platform etc. erikj@610: final-images: all final-images-only erikj@610: final-images-only: start-make erikj@610: @$(call TargetEnter) erikj@610: $(RM) -r $(BUILD_OUTPUT)/final-images erikj@610: $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR) erikj@610: $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR) erikj@610: $(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/ erikj@610: $(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/ ihse@839: ifeq ($(OPENJDK_TARGET_OS),macosx) ihse@839: $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR) ihse@839: $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR) ihse@839: $(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/ ihse@839: $(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/ ihse@839: endif erikj@559: @$(call TargetExit) erikj@559: erikj@610: erikj@559: ########################################################################### erikj@559: # Phony targets mikael@1140: .PHONY: jprt_bundle bundles bundles-only final-images final-images-only