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
|
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
|
2015-11-24 14:46:04 +00:00
|
|
|
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/jdk-image.zip
|
2012-12-28 08:51:15 +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
|
|
|
|
|
2016-05-04 13:29:01 +00:00
|
|
|
################################################################################
|
|
|
|
# JPRT specific bundling targets
|
|
|
|
JPRT_TARGET ?= $(DEFAULT_MAKE_TARGET)
|
|
|
|
ifeq ($(JPRT_TARGET), $(DEFAULT_MAKE_TARGET))
|
|
|
|
jprt_bundle: $(DEFAULT_MAKE_TARGET) $(JPRT_ARCHIVE_BUNDLE) \
|
|
|
|
$(JPRT_ARCHIVE_TEST_BUNDLE)
|
2012-12-28 08:51:15 +00:00
|
|
|
|
2016-05-04 13:29:01 +00:00
|
|
|
SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR)
|
|
|
|
SRC_TEST_IMAGE_DIR := $(TEST_IMAGE_DIR)
|
|
|
|
|
|
|
|
# This target must be called in the context of a SPEC file
|
|
|
|
$(JPRT_ARCHIVE_BUNDLE): product-images
|
|
|
|
$(call MakeDir, $(@D))
|
|
|
|
$(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r $@ .
|
|
|
|
|
|
|
|
$(JPRT_ARCHIVE_TEST_BUNDLE): test-image
|
|
|
|
$(call MakeDir, $(@D))
|
|
|
|
$(CD) $(SRC_TEST_IMAGE_DIR) && $(ZIP) -y -q -r $@ .
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
# Optional symbols bundle
|
|
|
|
ifeq ($(GCOV_ENABLED), true)
|
|
|
|
jprt_bundle: $(JPRT_ARCHIVE_SYMBOLS_BUNDLE)
|
|
|
|
zip-bundles: $(SYMBOLS_ZIP_BUNDLE)
|
|
|
|
|
|
|
|
$(JPRT_ARCHIVE_SYMBOLS_BUNDLE): product-images
|
|
|
|
$(call MakeDir, $(@D))
|
|
|
|
$(CD) $(SYMBOLS_IMAGE_DIR) && $(ZIP) -y -q -r $@ .
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
##############################################################################
|
2015-03-10 13:36:56 +00:00
|
|
|
|
2016-04-08 11:14:23 +00:00
|
|
|
else
|
2016-05-04 13:29:01 +00:00
|
|
|
# Just fake the main bundle to satisfy JPRT
|
|
|
|
jprt_bundle: $(JPRT_TARGET)
|
2016-04-08 11:14:23 +00:00
|
|
|
@$(call TargetEnter)
|
|
|
|
$(MKDIR) -p $(BUILD_OUTPUT)/bundles
|
2016-05-04 13:29:01 +00:00
|
|
|
$(CD) $(TOPDIR) && $(TAR) cf - README | $(GZIP) > \
|
|
|
|
$(JPRT_ARCHIVE_BUNDLE)
|
2016-04-08 11:14:23 +00:00
|
|
|
@$(call TargetExit)
|
|
|
|
endif
|
2013-02-04 10:02:03 +00:00
|
|
|
|
2016-05-04 13:29:01 +00:00
|
|
|
ALL_TARGETS += jprt_bundle
|
|
|
|
|
|
|
|
################################################################################
|
2012-12-28 08:51:15 +00:00
|
|
|
|
2016-05-04 13:29:01 +00:00
|
|
|
$(eval $(call IncludeCustomExtension, , Jprt.gmk))
|