2012-12-28 08:51:15 +00:00
|
|
|
#
|
2015-05-06 08:47:21 +00:00
|
|
|
# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
2012-12-28 08:51:15 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
|
|
# published by the Free Software Foundation. Oracle designates this
|
|
|
|
# particular file as subject to the "Classpath" exception as provided
|
|
|
|
# by Oracle in the LICENSE file that accompanied this code.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
|
|
|
#
|
|
|
|
|
2014-05-20 10:54:44 +00:00
|
|
|
# This file contains targets and utilities needed by JPRT.
|
2012-12-28 08:51:15 +00:00
|
|
|
|
2014-05-20 10:54:44 +00:00
|
|
|
# Cygpath is only defined when running on Cygwin
|
|
|
|
ifneq ($(CYGPATH), )
|
|
|
|
# If we get JPRT_ARCHIVE_*BUNDLE externally, make sure they have /cygdrive
|
|
|
|
# style paths
|
|
|
|
ifdef JPRT_ARCHIVE_BUNDLE
|
|
|
|
override JPRT_ARCHIVE_BUNDLE := $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_BUNDLE))
|
|
|
|
endif
|
|
|
|
ifdef JPRT_ARCHIVE_INSTALL_BUNDLE
|
2015-03-10 13:36:56 +00:00
|
|
|
override JPRT_ARCHIVE_INSTALL_BUNDLE := \
|
|
|
|
$(shell $(CYGPATH) -u $(JPRT_ARCHIVE_INSTALL_BUNDLE))
|
2014-05-20 10:54:44 +00:00
|
|
|
endif
|
2015-01-09 15:45:39 +00:00
|
|
|
ifdef JPRT_ARCHIVE_TEST_BUNDLE
|
2015-03-10 13:36:56 +00:00
|
|
|
override JPRT_ARCHIVE_TEST_BUNDLE := \
|
|
|
|
$(shell $(CYGPATH) -u $(JPRT_ARCHIVE_TEST_BUNDLE))
|
|
|
|
endif
|
|
|
|
ifdef JPRT_ARCHIVE_SYMBOLS_BUNDLE
|
|
|
|
override JPRT_ARCHIVE_SYMBOLS_BUNDLE := \
|
|
|
|
$(shell $(CYGPATH) -u $(JPRT_ARCHIVE_SYMBOLS_BUNDLE))
|
2015-01-09 15:45:39 +00:00
|
|
|
endif
|
2014-05-20 10:54:44 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# When running in JPRT these will be provided. Need defaults so that this makefile
|
|
|
|
# is valid anyway.
|
2012-12-28 08:51:15 +00:00
|
|
|
ifndef JPRT_ARCHIVE_BUNDLE
|
|
|
|
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
|
|
|
|
endif
|
2013-01-23 21:30:11 +00:00
|
|
|
ifndef JPRT_ARCHIVE_INSTALL_BUNDLE
|
2013-10-10 12:58:19 +00:00
|
|
|
JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
|
2013-01-23 21:30:11 +00:00
|
|
|
endif
|
2015-01-09 15:45:39 +00:00
|
|
|
ifndef JPRT_ARCHIVE_TEST_BUNDLE
|
|
|
|
JPRT_ARCHIVE_TEST_BUNDLE=/tmp/jprt_bundles/test-image.zip
|
|
|
|
endif
|
2015-03-10 13:36:56 +00:00
|
|
|
ifndef JPRT_ARCHIVE_SYMBOLS_BUNDLE
|
|
|
|
JPRT_ARCHIVE_SYMBOLS_BUNDLE=/tmp/jprt_bundles/symbols-image.zip
|
|
|
|
endif
|
2012-12-28 08:51:15 +00:00
|
|
|
|
2014-07-31 18:14:26 +00:00
|
|
|
ifeq ($(SKIP_BOOT_CYCLE), false)
|
|
|
|
jprt_bundle: bootcycle-images
|
|
|
|
endif
|
|
|
|
|
2012-12-28 08:51:15 +00:00
|
|
|
# This target must be called in the context of a SPEC file
|
2015-01-09 15:45:39 +00:00
|
|
|
jprt_bundle: $(JPRT_ARCHIVE_BUNDLE) $(JPRT_ARCHIVE_TEST_BUNDLE)
|
2012-12-28 08:51:15 +00:00
|
|
|
|
2015-03-10 13:36:56 +00:00
|
|
|
ifeq ($(GCOV_ENABLED), true)
|
|
|
|
jprt_bundle: $(JPRT_ARCHIVE_SYMBOLS_BUNDLE)
|
|
|
|
endif
|
|
|
|
|
2012-12-28 08:51:15 +00:00
|
|
|
# This target must be called in the context of a SPEC file
|
|
|
|
$(JPRT_ARCHIVE_BUNDLE): bundles
|
|
|
|
$(MKDIR) -p $(@D)
|
|
|
|
$(RM) $@
|
2013-02-04 10:02:03 +00:00
|
|
|
$(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@
|
2012-12-28 08:51:15 +00:00
|
|
|
|
2015-01-09 15:45:39 +00:00
|
|
|
$(JPRT_ARCHIVE_TEST_BUNDLE): bundles
|
|
|
|
$(MKDIR) -p $(@D)
|
|
|
|
$(RM) $@
|
|
|
|
$(CP) $(BUILD_OUTPUT)/bundles/$(TEST_IMAGE_SUBDIR).zip $@
|
|
|
|
|
2015-03-10 13:36:56 +00:00
|
|
|
$(JPRT_ARCHIVE_SYMBOLS_BUNDLE): bundles
|
|
|
|
$(MKDIR) -p $(@D)
|
|
|
|
$(RM) $@
|
|
|
|
$(CP) $(BUILD_OUTPUT)/bundles/$(SYMBOLS_IMAGE_SUBDIR).zip $@
|
|
|
|
|
2013-09-27 23:27:34 +00:00
|
|
|
SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR)
|
|
|
|
SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR)
|
2015-01-09 15:45:39 +00:00
|
|
|
SRC_TEST_IMAGE_DIR := $(TEST_IMAGE_DIR)
|
2015-05-06 08:47:21 +00:00
|
|
|
SRC_JDK_MACOSX_BUNDLE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
|
|
|
|
SRC_JRE_MACOSX_BUNDLE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
|
2013-02-04 10:02:03 +00:00
|
|
|
|
|
|
|
# Bundle up the images
|
2014-08-17 14:51:37 +00:00
|
|
|
bundles: all
|
2013-02-04 10:02:03 +00:00
|
|
|
@$(call TargetEnter)
|
|
|
|
$(MKDIR) -p $(BUILD_OUTPUT)/bundles
|
2015-03-10 13:36:56 +00:00
|
|
|
$(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r \
|
|
|
|
$(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip .
|
|
|
|
$(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -y -q -r \
|
|
|
|
$(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip .
|
|
|
|
$(CD) $(SRC_TEST_IMAGE_DIR) && $(ZIP) -y -q -r \
|
|
|
|
$(BUILD_OUTPUT)/bundles/$(TEST_IMAGE_SUBDIR).zip .
|
2013-10-10 12:58:19 +00:00
|
|
|
if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \
|
2015-03-10 13:36:56 +00:00
|
|
|
$(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r \
|
|
|
|
$(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
|
|
|
|
fi
|
|
|
|
if [ -d $(SYMBOLS_IMAGE_DIR) ] ; then \
|
|
|
|
$(CD) $(SYMBOLS_IMAGE_DIR) && $(ZIP) -y -q -r \
|
|
|
|
$(BUILD_OUTPUT)/bundles/$(SYMBOLS_IMAGE_SUBDIR).zip . ; \
|
2013-10-10 12:58:19 +00:00
|
|
|
fi
|
2013-02-04 10:02:03 +00:00
|
|
|
@$(call TargetExit)
|
|
|
|
|
|
|
|
# Copy images to one unified location regardless of platform etc.
|
2014-08-17 14:51:37 +00:00
|
|
|
final-images: all
|
2013-02-04 10:02:03 +00:00
|
|
|
@$(call TargetEnter)
|
|
|
|
$(RM) -r $(BUILD_OUTPUT)/final-images
|
|
|
|
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)
|
|
|
|
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)
|
|
|
|
$(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/
|
|
|
|
$(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/
|
2013-10-10 12:58:19 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS),macosx)
|
2015-05-06 08:47:21 +00:00
|
|
|
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_MACOSX_BUNDLE_SUBDIR)
|
|
|
|
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_MACOSX_BUNDLE_SUBDIR)
|
|
|
|
$(CP) -R -P $(SRC_JDK_MACOSX_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_MACOSX_BUNDLE_SUBDIR)/
|
|
|
|
$(CP) -R -P $(SRC_JRE_MACOSX_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_MACOSX_BUNDLE_SUBDIR)/
|
2013-10-10 12:58:19 +00:00
|
|
|
endif
|
2012-12-28 08:51:15 +00:00
|
|
|
@$(call TargetExit)
|
|
|
|
|
2015-03-26 15:17:30 +00:00
|
|
|
ALL_TARGETS += jprt_bundle bundles final-images
|