make/Jprt.gmk
author dpochepk
Mon, 08 Aug 2016 11:30:46 +0300
changeset 40371 98d4822ec8ef
parent 37972 e1fa5c2e62a0
child 41458 f285e333e8db
permissions -rw-r--r--
8163243: [TESTBUG] compiler/codecache/jmx/UsageThresholdIncreasedTest.java failed with: Failed to find sun/hotspot/WhiteBox.class Reviewed-by: iveresov
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15053
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
     1
#
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 29662
diff changeset
     2
# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
15053
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
     4
#
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    10
#
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    15
# accompanied this code).
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    16
#
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    20
#
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    23
# questions.
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    24
#
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    25
24411
54baaf3fa2ca 8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents: 22031
diff changeset
    26
# This file contains targets and utilities needed by JPRT.
15053
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    27
24411
54baaf3fa2ca 8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents: 22031
diff changeset
    28
# Cygpath is only defined when running on Cygwin
54baaf3fa2ca 8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents: 22031
diff changeset
    29
ifneq ($(CYGPATH), )
54baaf3fa2ca 8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents: 22031
diff changeset
    30
  # If we get JPRT_ARCHIVE_*BUNDLE externally, make sure they have /cygdrive
54baaf3fa2ca 8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents: 22031
diff changeset
    31
  # style paths
54baaf3fa2ca 8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents: 22031
diff changeset
    32
  ifdef JPRT_ARCHIVE_BUNDLE
54baaf3fa2ca 8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents: 22031
diff changeset
    33
    override JPRT_ARCHIVE_BUNDLE := $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_BUNDLE))
54baaf3fa2ca 8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents: 22031
diff changeset
    34
  endif
28285
3b8c4ccbb332 8067759: Create initial test bundle framework
ihse
parents: 25854
diff changeset
    35
  ifdef JPRT_ARCHIVE_TEST_BUNDLE
29305
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 28285
diff changeset
    36
    override JPRT_ARCHIVE_TEST_BUNDLE := \
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 28285
diff changeset
    37
        $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_TEST_BUNDLE))
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 28285
diff changeset
    38
  endif
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 28285
diff changeset
    39
  ifdef JPRT_ARCHIVE_SYMBOLS_BUNDLE
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 28285
diff changeset
    40
    override JPRT_ARCHIVE_SYMBOLS_BUNDLE := \
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 28285
diff changeset
    41
        $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_SYMBOLS_BUNDLE))
28285
3b8c4ccbb332 8067759: Create initial test bundle framework
ihse
parents: 25854
diff changeset
    42
  endif
24411
54baaf3fa2ca 8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents: 22031
diff changeset
    43
endif
54baaf3fa2ca 8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents: 22031
diff changeset
    44
54baaf3fa2ca 8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents: 22031
diff changeset
    45
# When running in JPRT these will be provided. Need defaults so that this makefile
54baaf3fa2ca 8043127: Convert JPRT_ARCHIVE_BUNDLE to unix style paths
erikj
parents: 22031
diff changeset
    46
# is valid anyway.
15053
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    47
ifndef JPRT_ARCHIVE_BUNDLE
34102
c0a98357f847 8143141: Bring in minor build changes from the jigsaw/jake forest
erikj
parents: 30094
diff changeset
    48
  JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/jdk-image.zip
15053
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    49
endif
28285
3b8c4ccbb332 8067759: Create initial test bundle framework
ihse
parents: 25854
diff changeset
    50
ifndef JPRT_ARCHIVE_TEST_BUNDLE
3b8c4ccbb332 8067759: Create initial test bundle framework
ihse
parents: 25854
diff changeset
    51
  JPRT_ARCHIVE_TEST_BUNDLE=/tmp/jprt_bundles/test-image.zip
3b8c4ccbb332 8067759: Create initial test bundle framework
ihse
parents: 25854
diff changeset
    52
endif
29305
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 28285
diff changeset
    53
ifndef JPRT_ARCHIVE_SYMBOLS_BUNDLE
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 28285
diff changeset
    54
  JPRT_ARCHIVE_SYMBOLS_BUNDLE=/tmp/jprt_bundles/symbols-image.zip
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 28285
diff changeset
    55
endif
15053
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    56
25708
7ef7f2129ede 8054009: Support SKIP_BOOT_CYCLE=false when invoked from JPRT
mikael
parents: 24411
diff changeset
    57
ifeq ($(SKIP_BOOT_CYCLE), false)
7ef7f2129ede 8054009: Support SKIP_BOOT_CYCLE=false when invoked from JPRT
mikael
parents: 24411
diff changeset
    58
  jprt_bundle: bootcycle-images
7ef7f2129ede 8054009: Support SKIP_BOOT_CYCLE=false when invoked from JPRT
mikael
parents: 24411
diff changeset
    59
endif
7ef7f2129ede 8054009: Support SKIP_BOOT_CYCLE=false when invoked from JPRT
mikael
parents: 24411
diff changeset
    60
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    61
################################################################################
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    62
# JPRT specific bundling targets
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    63
JPRT_TARGET ?= $(DEFAULT_MAKE_TARGET)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    64
ifeq ($(JPRT_TARGET), $(DEFAULT_MAKE_TARGET))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    65
  jprt_bundle: $(DEFAULT_MAKE_TARGET) $(JPRT_ARCHIVE_BUNDLE) \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    66
      $(JPRT_ARCHIVE_TEST_BUNDLE)
29305
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 28285
diff changeset
    67
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    68
  SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    69
  SRC_TEST_IMAGE_DIR := $(TEST_IMAGE_DIR)
15053
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    70
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    71
  # This target must be called in the context of a SPEC file
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    72
  $(JPRT_ARCHIVE_BUNDLE): product-images
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    73
	$(call MakeDir, $(@D))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    74
	$(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r $@ .
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 34102
diff changeset
    75
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    76
  $(JPRT_ARCHIVE_TEST_BUNDLE): test-image
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    77
	$(call MakeDir, $(@D))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    78
	$(CD) $(SRC_TEST_IMAGE_DIR) && $(ZIP) -y -q -r $@ .
28285
3b8c4ccbb332 8067759: Create initial test bundle framework
ihse
parents: 25854
diff changeset
    79
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    80
  ##############################################################################
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    81
  # Optional symbols bundle
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    82
  ifeq ($(GCOV_ENABLED), true)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    83
    jprt_bundle: $(JPRT_ARCHIVE_SYMBOLS_BUNDLE)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    84
    zip-bundles: $(SYMBOLS_ZIP_BUNDLE)
29305
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 28285
diff changeset
    85
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    86
    $(JPRT_ARCHIVE_SYMBOLS_BUNDLE): product-images
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    87
	$(call MakeDir, $(@D))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    88
	$(CD) $(SYMBOLS_IMAGE_DIR) && $(ZIP) -y -q -r $@ .
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    89
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    90
  endif
15396
57dde7448b3f 8007275: build-infra: Create final-images target
erikj
parents: 15083
diff changeset
    91
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    92
  ##############################################################################
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    93
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    94
else
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    95
  # Just fake the main bundle to satisfy JPRT
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    96
  jprt_bundle: $(JPRT_TARGET)
15053
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    97
	@$(call TargetEnter)
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
    98
	$(MKDIR) -p $(BUILD_OUTPUT)/bundles
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
    99
	$(CD) $(TOPDIR) && $(TAR) cf - README | $(GZIP) > \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
   100
	    $(JPRT_ARCHIVE_BUNDLE)
37402
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36506
diff changeset
   101
	@$(call TargetExit)
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36506
diff changeset
   102
endif
15396
57dde7448b3f 8007275: build-infra: Create final-images target
erikj
parents: 15083
diff changeset
   103
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
   104
ALL_TARGETS += jprt_bundle
15053
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff changeset
   105
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
   106
################################################################################
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
   107
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37649
diff changeset
   108
$(eval $(call IncludeCustomExtension, , Jprt.gmk))