make/Bundles.gmk
author bpatel
Mon, 13 Mar 2017 09:55:31 -0700
changeset 44195 5860769fe2f4
parent 43051 6b8a8764b1fe
child 44724 8efb5c82a573
permissions -rw-r--r--
8175799: module summary page shows duplicated output Reviewed-by: jjg, ksrini
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
     1
#
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
     2
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
     4
#
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    10
#
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    15
# accompanied this code).
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    16
#
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    20
#
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    23
# questions.
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    24
#
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    25
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    26
default: all
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    27
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    28
include $(SPEC)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    29
include MakeBase.gmk
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    30
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    31
PRODUCT_TARGETS :=
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    32
TEST_TARGETS :=
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    33
DOCS_TARGETS :=
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    34
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    35
# On Windows tar frequently complains that "file changed as we read it" for
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    36
# some random source files. This seems to be cause by anti virus scanners and
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    37
# is most likely safe to ignore. When it happens, tar returns '1'.
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    38
ifeq ($(OPENJDK_BUILD_OS), windows)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    39
  TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1"
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    40
endif
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    41
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    42
# Hook to include the corresponding custom file, if present.
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    43
$(eval $(call IncludeCustomExtension, , Bundles-pre.gmk))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    44
################################################################################
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    45
# BUNDLE : Name of bundle to create
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    46
# FILES : Files in BASE_DIRS to add to bundle
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    47
# SPECIAL_INCLUDES : List of directories inside BASE_DIRS to look for additional
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    48
#     files in. These files will not get proper dependency handling. Use when
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    49
#     files or directories may contain spaces.
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    50
# BASE_DIRS : Base directories for the root dir in the bundle.
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    51
# SUBDIR : Optional name of root dir in bundle.
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    52
SetupBundleFile = $(NamedParamsMacroTemplate)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    53
define SetupBundleFileBody
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    54
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    55
  $$(foreach d, $$($1_BASE_DIRS), \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    56
    $$(eval $1_$$d_RELATIVE_FILES := $$$$(patsubst $$d/%, %, \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    57
        $$$$(filter $$d/%, $$$$($1_FILES)))) \
42507
a3499e58c108 8171167: Build fails in Mach 5 with "File name too long."
erikj
parents: 42506
diff changeset
    58
    $$(eval $1_$$d_LIST_FILE := \
a3499e58c108 8171167: Build fails in Mach 5 with "File name too long."
erikj
parents: 42506
diff changeset
    59
        $(SUPPORT_OUTPUTDIR)/bundles/_$1_$$$$(subst /,_,$$$$(patsubst $(TOPDIR)/%,%,$$d)_files)) \
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    60
  )
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    61
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    62
  ifneq ($$(filter %.tar.gz, $$($1_BUNDLE_NAME)), )
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    63
    $1_TYPE := tar.gz
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    64
  else ifneq ($$(filter %.zip, $$($1_BUNDLE_NAME)), )
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    65
    $1_TYPE := zip
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    66
  else
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    67
    $$(error Unknown bundle type $$($1_BUNDLE_NAME))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    68
  endif
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    69
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    70
  $$(call SetIfEmpty, $1_UNZIP_DEBUGINFO, false)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    71
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    72
  $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES)
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    73
	$$(foreach d, $$($1_BASE_DIRS), \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    74
	  $$(eval $$(call ListPathsSafely, \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    75
	      $1_$$d_RELATIVE_FILES, $$($1_$$d_LIST_FILE))) \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    76
	)
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    77
	$$(call MakeDir, $$(@D))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    78
        ifneq ($$($1_SPECIAL_INCLUDES), )
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    79
	  $$(foreach i, $$($1_SPECIAL_INCLUDES), \
43051
6b8a8764b1fe 8172577: Builds for OS X after build 149 does not include Java Mission Control.app
erikj
parents: 43043
diff changeset
    80
	    $$(foreach d, $$($1_BASE_DIRS), \
6b8a8764b1fe 8172577: Builds for OS X after build 149 does not include Java Mission Control.app
erikj
parents: 43043
diff changeset
    81
	      ($(CD) $$d && $(FIND) $$i >> $$($1_$$d_LIST_FILE)) ; ))
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
    82
        endif
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    83
        ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO), .-zip-false)
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    84
          # If no subdir is specified, zip can be done directly from BASE_DIRS.
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    85
	  $$(foreach d, $$($1_BASE_DIRS), \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    86
	    ( $(CD) $$d \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    87
	    && $(ZIPEXE) -qru $$@ . -i@$$($1_$$d_LIST_FILE) \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    88
	    || test "$$$$?" = "12" )$$(NEWLINE))
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    89
        else ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    90
            .-tar.gz-false-1)
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    91
          # If no subdir is specified and only one BASE_DIR, tar.gz can be done
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    92
          # directly from BASE_DIR.
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    93
	  $(CD) $$($1_BASE_DIRS) \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    94
	      && ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    95
	          -$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    96
	          $(TAR_IGNORE_EXIT_VALUE) ) \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    97
	      | $(GZIP) > $$@
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    98
        else ifeq ($$($1_TYPE)-$(TAR_SUPPORTS_TRANSFORM)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
    99
            tar.gz-true-false-1)
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   100
          # If only one BASE_DIR, but with a SUBDIR set, tar.gz can use the
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   101
          # transform option to create bundle directly from the BASE_DIR.
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   102
	  $(CD) $$($1_BASE_DIRS) \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   103
	      && ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   104
	          -$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \
42849
fa0a0a987432 8171548: JDK bundles changes sym links incorrectly in the legal directory
erikj
parents: 42507
diff changeset
   105
	          $$(if $$($1_SUBDIR), --transform 's|^|$$($1_SUBDIR)/|S') \
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   106
	          $(TAR_IGNORE_EXIT_VALUE) ) \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   107
	      | $(GZIP) > $$@
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   108
        else
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   109
          # In all other cases, need to copy all files into a temporary location
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   110
          # before creation bundle.
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   111
	  $(RM) -r $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   112
	  $(MKDIR) -p $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   113
	  $$(foreach d, $$($1_BASE_DIRS), \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   114
	    ( $(CD) $$d \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   115
	    && $(TAR) cf - -$(TAR_INCLUDE_PARAM) $$($1_$$d_LIST_FILE) \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   116
	        $(TAR_IGNORE_EXIT_VALUE) ) \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   117
	    | ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )$$(NEWLINE) )
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   118
          # Unzip any zipped debuginfo files
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   119
          ifeq ($$($1_UNZIP_DEBUGINFO), true)
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   120
	    for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   121
	      $(CD) $$$${f%/*} && $(UNZIP) -q $$$${f} && $(RM) $$$${f}; \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   122
	    done
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   123
          endif
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   124
          ifeq ($$($1_TYPE), tar.gz)
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   125
	    $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   126
	    ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   127
	        $$(if $$($1_SUBDIR), $$($1_SUBDIR), .) $(TAR_IGNORE_EXIT_VALUE) ) \
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   128
	    | $(GZIP) > $$@
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   129
          else ifeq ($$($1_TYPE), zip)
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   130
	    $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIPEXE) -qr $$@ .
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   131
          endif
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   132
        endif
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   133
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   134
  $1 += $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   135
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   136
endef
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   137
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   138
################################################################################
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   139
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   140
# On Macosx, we bundle up the macosx specific images which already have the
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   141
# correct base directories.
37982
cd251f56161f 8157574: Mac fastdebug bundles have wrong directory layout
erikj
parents: 37972
diff changeset
   142
ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   143
  JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   144
  JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   145
  JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   146
  JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   147
  JDK_BUNDLE_SUBDIR :=
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   148
  JRE_BUNDLE_SUBDIR :=
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   149
else
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   150
  JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   151
  JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   152
  JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   153
  JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)
43043
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   154
  JRE_COMPACT1_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)-compact1
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   155
  JRE_COMPACT2_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)-compact2
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   156
  JRE_COMPACT3_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)-compact3
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   157
  ifneq ($(DEBUG_LEVEL), release)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   158
    JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   159
    JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   160
  endif
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   161
endif
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   162
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   163
################################################################################
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   164
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   165
ifneq ($(filter product-bundles, $(MAKECMDGOALS)), )
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   166
  $(eval $(call FillCacheFind, $(IMAGES_OUTPUTDIR)))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   167
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   168
  SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   169
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   170
  ALL_JDK_FILES := $(call CacheFind, $(JDK_IMAGE_DIR))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   171
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   172
  # Create special filter rules when dealing with unzipped .dSYM directories on
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   173
  # macosx
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   174
  ifeq ($(OPENJDK_TARGET_OS), macosx)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   175
    ifeq ($(ZIP_DEBUGINFO_FILES), false)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   176
      JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   177
          $(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, $(ALL_JDK_FILES))))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   178
    endif
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   179
  endif
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   180
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   181
  JDK_BUNDLE_FILES := \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   182
      $(filter-out \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   183
          $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   184
          $(JDK_EXTRA_EXCLUDES) \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   185
          $(SYMBOLS_EXCLUDE_PATTERN) \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   186
          $(JDK_IMAGE_HOMEDIR)/demo/% $(JDK_IMAGE_HOMEDIR)/sample/% \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   187
          , \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   188
          $(ALL_JDK_FILES) \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   189
      )
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   190
  DEMOS_BUNDLE_FILES := \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   191
      $(filter-out \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   192
          $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   193
          $(SYMBOLS_EXCLUDE_PATTERN) \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   194
          , \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   195
          $(filter \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   196
               $(JDK_IMAGE_HOMEDIR)/demo/% $(JDK_IMAGE_HOMEDIR)/sample/% \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   197
               $(JDK_IMAGE_HOMEDIR)/release \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   198
               , \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   199
               $(ALL_JDK_FILES) \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   200
          ) \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   201
      )
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   202
  JDK_SYMBOLS_BUNDLE_FILES := \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   203
      $(filter \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   204
          $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   205
          $(SYMBOLS_EXCLUDE_PATTERN) \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   206
          , \
39925
719d2be9b4de 8148548: [Linux/Solaris] debuginfo and fastdebuginfo bundle contains demo info
erikj
parents: 39111
diff changeset
   207
          $(filter-out \
719d2be9b4de 8148548: [Linux/Solaris] debuginfo and fastdebuginfo bundle contains demo info
erikj
parents: 39111
diff changeset
   208
              $(JDK_IMAGE_HOMEDIR)/demo/% $(JDK_IMAGE_HOMEDIR)/sample/% \
719d2be9b4de 8148548: [Linux/Solaris] debuginfo and fastdebuginfo bundle contains demo info
erikj
parents: 39111
diff changeset
   209
              , \
719d2be9b4de 8148548: [Linux/Solaris] debuginfo and fastdebuginfo bundle contains demo info
erikj
parents: 39111
diff changeset
   210
              $(ALL_JDK_FILES) \
719d2be9b4de 8148548: [Linux/Solaris] debuginfo and fastdebuginfo bundle contains demo info
erikj
parents: 39111
diff changeset
   211
          ) \
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   212
      ) \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   213
      $(call CacheFind, $(SYMBOLS_IMAGE_DIR))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   214
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   215
  ALL_JRE_FILES := $(call CacheFind, $(JRE_IMAGE_DIR))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   216
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   217
  # Create special filter rules when dealing with unzipped .dSYM directories on
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   218
  # macosx
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   219
  ifeq ($(OPENJDK_TARGET_OS), macosx)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   220
    ifeq ($(ZIP_DEBUGINFO_FILES), false)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   221
      JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   222
          $(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES))))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   223
    endif
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   224
  endif
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   225
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   226
  JRE_BUNDLE_FILES := $(filter-out \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   227
      $(JRE_SYMBOLS_EXCLUDE_PATTERN) \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   228
      $(SYMBOLS_EXCLUDE_PATTERN), \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   229
      $(ALL_JRE_FILES))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   230
  JRE_SYMBOLS_BUNDLE_FILES := $(filter \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   231
      $(JRE_SYMBOLS_EXCLUDE_PATTERN) \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   232
      $(SYMBOLS_EXCLUDE_PATTERN), \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   233
      $(ALL_JRE_FILES))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   234
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   235
  $(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   236
      BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   237
      FILES := $(JDK_BUNDLE_FILES), \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   238
      SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   239
      BASE_DIRS := $(JDK_IMAGE_DIR), \
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   240
      SUBDIR := $(JDK_BUNDLE_SUBDIR), \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   241
  ))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   242
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   243
  PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   244
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   245
  $(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   246
      BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   247
      FILES := $(JRE_BUNDLE_FILES), \
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   248
      BASE_DIRS := $(JRE_IMAGE_DIR), \
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   249
      SUBDIR := $(JRE_BUNDLE_SUBDIR), \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   250
  ))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   251
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   252
  PRODUCT_TARGETS += $(BUILD_JRE_BUNDLE)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   253
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   254
  $(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   255
      BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   256
      FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   257
      BASE_DIRS := $(JDK_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   258
      SUBDIR := $(JDK_BUNDLE_SUBDIR), \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   259
      UNZIP_DEBUGINFO := true, \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   260
  ))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   261
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   262
  PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   263
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   264
  $(eval $(call SetupBundleFile, BUILD_JRE_SYMBOLS_BUNDLE, \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   265
      BUNDLE_NAME := $(JRE_SYMBOLS_BUNDLE_NAME), \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   266
      FILES := $(JRE_SYMBOLS_BUNDLE_FILES), \
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   267
      BASE_DIRS := $(JRE_IMAGE_DIR), \
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   268
      SUBDIR := $(JRE_BUNDLE_SUBDIR), \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   269
      UNZIP_DEBUGINFO := true, \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   270
  ))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   271
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   272
  PRODUCT_TARGETS += $(BUILD_JRE_SYMBOLS_BUNDLE)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   273
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   274
  $(eval $(call SetupBundleFile, BUILD_DEMOS_BUNDLE, \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   275
      BUNDLE_NAME := $(DEMOS_BUNDLE_NAME), \
41875
854ef5325653 8160491: tar.gz bundles missing files containing $
erikj
parents: 39925
diff changeset
   276
      FILES := $(DEMOS_BUNDLE_FILES), \
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   277
      BASE_DIRS := $(JDK_IMAGE_DIR), \
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   278
      SUBDIR := $(JDK_BUNDLE_SUBDIR), \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   279
  ))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   280
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   281
  PRODUCT_TARGETS += $(BUILD_DEMOS_BUNDLE)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   282
endif
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   283
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   284
################################################################################
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   285
43043
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   286
ifneq ($(filter profiles-bundles, $(MAKECMDGOALS)), )
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   287
  ifeq ($(OPENJDK_TARGET_OS), macosx)
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   288
    $(error Creating compact profiles bundles on macosx is unsupported)
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   289
  endif
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   290
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   291
  define GenerateCompactProfilesBundles
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   292
    ALL_JRE_COMPACT$1_FILES := $$(call CacheFind, $$(JRE_COMPACT$1_IMAGE_DIR))
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   293
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   294
    JRE_COMPACT$1_BUNDLE_FILES := $$(filter-out \
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   295
        $$(SYMBOLS_EXCLUDE_PATTERN), \
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   296
        $$(ALL_JRE_COMPACT$1_FILES))
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   297
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   298
    $$(eval $$(call SetupBundleFile, BUILD_JRE_COMPACT$1_BUNDLE, \
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   299
        BUNDLE_NAME := $$(JRE_COMPACT$1_BUNDLE_NAME), \
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   300
        FILES := $$(JRE_COMPACT$1_BUNDLE_FILES), \
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   301
        BASE_DIRS := $$(JRE_COMPACT$1_IMAGE_DIR), \
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   302
        SUBDIR := $$(JRE_COMPACT$1_BUNDLE_SUBDIR), \
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   303
    ))
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   304
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   305
    PROFILES_TARGETS += $$(BUILD_JRE_COMPACT$1_BUNDLE)
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   306
  endef
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   307
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   308
  $(eval $(call GenerateCompactProfilesBundles,1))
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   309
  $(eval $(call GenerateCompactProfilesBundles,2))
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   310
  $(eval $(call GenerateCompactProfilesBundles,3))
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   311
endif
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   312
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   313
################################################################################
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   314
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   315
ifneq ($(filter test-bundles, $(MAKECMDGOALS)), )
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   316
  TEST_BUNDLE_FILES := $(call CacheFind, $(TEST_IMAGE_DIR))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   317
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   318
  $(eval $(call SetupBundleFile, BUILD_TEST_BUNDLE, \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   319
      BUNDLE_NAME := $(TEST_BUNDLE_NAME), \
41875
854ef5325653 8160491: tar.gz bundles missing files containing $
erikj
parents: 39925
diff changeset
   320
      FILES := $(TEST_BUNDLE_FILES), \
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   321
      BASE_DIRS := $(TEST_IMAGE_DIR), \
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   322
  ))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   323
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   324
  TEST_TARGETS += $(BUILD_TEST_BUNDLE)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   325
endif
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   326
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   327
################################################################################
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   328
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   329
ifneq ($(filter docs-bundles, $(MAKECMDGOALS)), )
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   330
  DOCS_BUNDLE_FILES := $(call CacheFind, $(DOCS_IMAGE_DIR))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   331
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   332
  $(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   333
      BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   334
      FILES := $(DOCS_BUNDLE_FILES), \
42506
54b0b4fffab5 8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents: 42136
diff changeset
   335
      BASE_DIRS := $(DOCS_IMAGE_DIR), \
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   336
      SUBDIR := docs, \
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   337
  ))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   338
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   339
  DOCS_TARGETS += $(BUILD_DOCS_BUNDLE)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   340
endif
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   341
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   342
################################################################################
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   343
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   344
# Hook to include the corresponding custom file, if present.
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   345
$(eval $(call IncludeCustomExtension, , Bundles.gmk))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   346
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   347
################################################################################
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   348
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   349
product-bundles: $(PRODUCT_TARGETS)
43043
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   350
profiles-bundles: $(PROFILES_TARGETS)
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   351
test-bundles: $(TEST_TARGETS)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   352
docs-bundles: $(DOCS_TARGETS)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents:
diff changeset
   353
43043
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42849
diff changeset
   354
.PHONY: all default product-bundles profiles-bundles test-bundles docs-bundles