Tue, 17 Mar 2015 11:34:10 -0700
Merge
erikj@559 | 1 | # |
ksrini@806 | 2 | # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
erikj@559 | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
erikj@559 | 4 | # |
erikj@559 | 5 | # This code is free software; you can redistribute it and/or modify it |
erikj@559 | 6 | # under the terms of the GNU General Public License version 2 only, as |
erikj@559 | 7 | # published by the Free Software Foundation. Oracle designates this |
erikj@559 | 8 | # particular file as subject to the "Classpath" exception as provided |
erikj@559 | 9 | # by Oracle in the LICENSE file that accompanied this code. |
erikj@559 | 10 | # |
erikj@559 | 11 | # This code is distributed in the hope that it will be useful, but WITHOUT |
erikj@559 | 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
erikj@559 | 13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
erikj@559 | 14 | # version 2 for more details (a copy is included in the LICENSE file that |
erikj@559 | 15 | # accompanied this code). |
erikj@559 | 16 | # |
erikj@559 | 17 | # You should have received a copy of the GNU General Public License version |
erikj@559 | 18 | # 2 along with this work; if not, write to the Free Software Foundation, |
erikj@559 | 19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
erikj@559 | 20 | # |
erikj@559 | 21 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
erikj@559 | 22 | # or visit www.oracle.com if you need additional information or have any |
erikj@559 | 23 | # questions. |
erikj@559 | 24 | # |
erikj@559 | 25 | |
mikael@1140 | 26 | # This file is contains targets utilities needed by JPRT. |
erikj@559 | 27 | |
asaha@1129 | 28 | ifdef ALT_BSDIFF_DIR |
asaha@1129 | 29 | @$(ECHO) " --with-bsdiff-dir=$(call UnixPath,$(ALT_BSDIFF_DIR)) " >> $@.tmp |
asaha@1129 | 30 | endif |
erikj@559 | 31 | ifndef JPRT_ARCHIVE_BUNDLE |
erikj@559 | 32 | JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip |
erikj@559 | 33 | endif |
tbell@589 | 34 | ifndef JPRT_ARCHIVE_INSTALL_BUNDLE |
ihse@839 | 35 | JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip |
tbell@589 | 36 | endif |
erikj@559 | 37 | |
mikael@1155 | 38 | ifeq ($(SKIP_BOOT_CYCLE), false) |
mikael@1155 | 39 | jprt_bundle: bootcycle-images |
mikael@1155 | 40 | endif |
erikj@559 | 41 | |
erikj@559 | 42 | # This target must be called in the context of a SPEC file |
erikj@559 | 43 | jprt_bundle: $(JPRT_ARCHIVE_BUNDLE) |
erikj@559 | 44 | @$(call CheckIfMakeAtEnd) |
erikj@559 | 45 | |
erikj@559 | 46 | # This target must be called in the context of a SPEC file |
erikj@559 | 47 | $(JPRT_ARCHIVE_BUNDLE): bundles |
erikj@559 | 48 | $(MKDIR) -p $(@D) |
erikj@559 | 49 | $(RM) $@ |
erikj@610 | 50 | $(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@ |
erikj@559 | 51 | |
ksrini@806 | 52 | SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR) |
ksrini@806 | 53 | SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR) |
erikj@610 | 54 | SRC_JDK_BUNDLE_DIR := $(JDK_BUNDLE_DIR) |
erikj@610 | 55 | SRC_JRE_BUNDLE_DIR := $(JRE_BUNDLE_DIR) |
erikj@610 | 56 | |
erikj@610 | 57 | # Bundle up the images |
erikj@610 | 58 | bundles: all bundles-only |
erikj@610 | 59 | bundles-only: start-make |
erikj@559 | 60 | @$(call TargetEnter) |
erikj@559 | 61 | $(MKDIR) -p $(BUILD_OUTPUT)/bundles |
ksrini@806 | 62 | $(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip . |
ksrini@806 | 63 | $(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip . |
ihse@839 | 64 | if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \ |
ihse@839 | 65 | $(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \ |
ihse@839 | 66 | fi |
erikj@610 | 67 | @$(call TargetExit) |
erikj@610 | 68 | |
erikj@610 | 69 | # Copy images to one unified location regardless of platform etc. |
erikj@610 | 70 | final-images: all final-images-only |
erikj@610 | 71 | final-images-only: start-make |
erikj@610 | 72 | @$(call TargetEnter) |
erikj@610 | 73 | $(RM) -r $(BUILD_OUTPUT)/final-images |
erikj@610 | 74 | $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR) |
erikj@610 | 75 | $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR) |
erikj@610 | 76 | $(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/ |
erikj@610 | 77 | $(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/ |
ihse@839 | 78 | ifeq ($(OPENJDK_TARGET_OS),macosx) |
ihse@839 | 79 | $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR) |
ihse@839 | 80 | $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR) |
ihse@839 | 81 | $(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/ |
ihse@839 | 82 | $(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/ |
ihse@839 | 83 | endif |
erikj@559 | 84 | @$(call TargetExit) |
erikj@559 | 85 | |
erikj@610 | 86 | |
erikj@559 | 87 | ########################################################################### |
erikj@559 | 88 | # Phony targets |
mikael@1140 | 89 | .PHONY: jprt_bundle bundles bundles-only final-images final-images-only |