annotate make/Jprt.gmk @ 47290:b90a1b5b8142

manual merge
author mcimadamore
date Mon, 25 Sep 2017 16:38:40 +0100
parents 59bdd7243c52
children 9b9d2ce82f37
rev   line source
erikj@15053 1 #
ihse@41458 2 # Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
erikj@15053 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
erikj@15053 4 #
erikj@15053 5 # This code is free software; you can redistribute it and/or modify it
erikj@15053 6 # under the terms of the GNU General Public License version 2 only, as
erikj@15053 7 # published by the Free Software Foundation. Oracle designates this
erikj@15053 8 # particular file as subject to the "Classpath" exception as provided
erikj@15053 9 # by Oracle in the LICENSE file that accompanied this code.
erikj@15053 10 #
erikj@15053 11 # This code is distributed in the hope that it will be useful, but WITHOUT
erikj@15053 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
erikj@15053 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
erikj@15053 14 # version 2 for more details (a copy is included in the LICENSE file that
erikj@15053 15 # accompanied this code).
erikj@15053 16 #
erikj@15053 17 # You should have received a copy of the GNU General Public License version
erikj@15053 18 # 2 along with this work; if not, write to the Free Software Foundation,
erikj@15053 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
erikj@15053 20 #
erikj@15053 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
erikj@15053 22 # or visit www.oracle.com if you need additional information or have any
erikj@15053 23 # questions.
erikj@15053 24 #
erikj@15053 25
erikj@24411 26 # This file contains targets and utilities needed by JPRT.
erikj@15053 27
erikj@24411 28 # Cygpath is only defined when running on Cygwin
erikj@24411 29 ifneq ($(CYGPATH), )
erikj@24411 30 # If we get JPRT_ARCHIVE_*BUNDLE externally, make sure they have /cygdrive
erikj@24411 31 # style paths
erikj@24411 32 ifdef JPRT_ARCHIVE_BUNDLE
erikj@24411 33 override JPRT_ARCHIVE_BUNDLE := $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_BUNDLE))
erikj@24411 34 endif
ihse@28285 35 ifdef JPRT_ARCHIVE_TEST_BUNDLE
erikj@29305 36 override JPRT_ARCHIVE_TEST_BUNDLE := \
erikj@29305 37 $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_TEST_BUNDLE))
erikj@29305 38 endif
erikj@29305 39 ifdef JPRT_ARCHIVE_SYMBOLS_BUNDLE
erikj@29305 40 override JPRT_ARCHIVE_SYMBOLS_BUNDLE := \
erikj@29305 41 $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_SYMBOLS_BUNDLE))
ihse@28285 42 endif
erikj@24411 43 endif
erikj@24411 44
erikj@24411 45 # When running in JPRT these will be provided. Need defaults so that this makefile
erikj@24411 46 # is valid anyway.
erikj@15053 47 ifndef JPRT_ARCHIVE_BUNDLE
erikj@34102 48 JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/jdk-image.zip
erikj@15053 49 endif
ihse@28285 50 ifndef JPRT_ARCHIVE_TEST_BUNDLE
ihse@28285 51 JPRT_ARCHIVE_TEST_BUNDLE=/tmp/jprt_bundles/test-image.zip
ihse@28285 52 endif
erikj@29305 53 ifndef JPRT_ARCHIVE_SYMBOLS_BUNDLE
erikj@29305 54 JPRT_ARCHIVE_SYMBOLS_BUNDLE=/tmp/jprt_bundles/symbols-image.zip
erikj@29305 55 endif
erikj@15053 56
mikael@25708 57 ifeq ($(SKIP_BOOT_CYCLE), false)
mikael@25708 58 jprt_bundle: bootcycle-images
mikael@25708 59 endif
mikael@25708 60
erikj@37972 61 ################################################################################
erikj@37972 62 # JPRT specific bundling targets
erikj@37972 63 JPRT_TARGET ?= $(DEFAULT_MAKE_TARGET)
erikj@37972 64 ifeq ($(JPRT_TARGET), $(DEFAULT_MAKE_TARGET))
erikj@37972 65 jprt_bundle: $(DEFAULT_MAKE_TARGET) $(JPRT_ARCHIVE_BUNDLE) \
erikj@37972 66 $(JPRT_ARCHIVE_TEST_BUNDLE)
erikj@15053 67
erikj@37972 68 SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR)
erikj@37972 69 SRC_TEST_IMAGE_DIR := $(TEST_IMAGE_DIR)
erikj@29305 70
erikj@37972 71 # This target must be called in the context of a SPEC file
erikj@37972 72 $(JPRT_ARCHIVE_BUNDLE): product-images
erikj@37972 73 $(call MakeDir, $(@D))
ihse@42136 74 $(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIPEXE) -y -q -r $@ .
erikj@15053 75
erikj@37972 76 $(JPRT_ARCHIVE_TEST_BUNDLE): test-image
erikj@37972 77 $(call MakeDir, $(@D))
ihse@42136 78 $(CD) $(SRC_TEST_IMAGE_DIR) && $(ZIPEXE) -y -q -r $@ .
alanb@36506 79
erikj@37972 80 ##############################################################################
erikj@37972 81 # Optional symbols bundle
erikj@37972 82 ifeq ($(GCOV_ENABLED), true)
erikj@37972 83 jprt_bundle: $(JPRT_ARCHIVE_SYMBOLS_BUNDLE)
ihse@28285 84
erikj@37972 85 $(JPRT_ARCHIVE_SYMBOLS_BUNDLE): product-images
erikj@37972 86 $(call MakeDir, $(@D))
ihse@42136 87 $(CD) $(SYMBOLS_IMAGE_DIR) && $(ZIPEXE) -y -q -r $@ .
erikj@29305 88
erikj@37972 89 endif
erikj@15396 90
erikj@37972 91 ##############################################################################
erikj@37972 92
erikj@37972 93 else
erikj@37972 94 # Just fake the main bundle to satisfy JPRT
erikj@37972 95 jprt_bundle: $(JPRT_TARGET)
erikj@15053 96 @$(call TargetEnter)
mcimadamore@47290 97 $(MKDIR) -p $(OUTPUTDIR)/bundles
erikj@37972 98 $(CD) $(TOPDIR) && $(TAR) cf - README | $(GZIP) > \
erikj@37972 99 $(JPRT_ARCHIVE_BUNDLE)
erikj@37402 100 @$(call TargetExit)
erikj@37402 101 endif
erikj@15396 102
erikj@37972 103 ALL_TARGETS += jprt_bundle
erikj@15053 104
erikj@37972 105 ################################################################################
erikj@37972 106
erikj@37972 107 $(eval $(call IncludeCustomExtension, , Jprt.gmk))