jdk/make/Bundles.gmk
author kshefov
Tue, 25 Nov 2014 14:16:55 +0400
changeset 27758 dfba484228ed
parent 26191 a0ff4b39d34b
permissions -rw-r--r--
8059070: [TESTBUG] java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java failed - timeout Reviewed-by: psandoz, vlivanov
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     1
#
23010
6dadb192ad81 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents: 21805
diff changeset
     2
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     4
#
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    10
#
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    15
# accompanied this code).
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    16
#
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    20
#
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    23
# questions.
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    24
#
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    25
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    26
include $(SPEC)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    27
include MakeBase.gmk
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    28
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    29
default: bundles
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    30
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    31
# Only macosx has bundles defined.
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    32
ifeq ($(OPENJDK_TARGET_OS), macosx)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    33
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    34
  bundles: jre-bundle jdk-bundle
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    35
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    36
  # JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    37
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25859
diff changeset
    38
  MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    39
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    40
  # All these OPENJDK checks are needed since there is no coherency between
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    41
  # these values in open and closed. Should probably be fixed.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    42
  ifndef OPENJDK
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    43
    BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(JDK_MINOR_VERSION)u$(JDK_UPDATE_VERSION)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    44
  else
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    45
    BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    46
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    47
  BUNDLE_ID_JRE := $(BUNDLE_ID).jre
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    48
  BUNDLE_ID_JDK := $(BUNDLE_ID).jdk
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    49
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    50
  BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    51
  BUNDLE_NAME_JRE := $(BUNDLE_NAME)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    52
  BUNDLE_NAME_JDK := $(BUNDLE_NAME)
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    53
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    54
  ifndef OPENJDK
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    55
    BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_VERSION)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    56
  else
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    57
    BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) ($(JDK_VERSION))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    58
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    59
  BUNDLE_INFO_JRE := $(BUNDLE_INFO)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    60
  BUNDLE_INFO_JDK := $(BUNDLE_INFO)
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    61
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    62
  BUNDLE_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    63
  BUNDLE_VERSION := $(JDK_VERSION)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    64
  ifeq ($(COMPANY_NAME), N/A)
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    65
    BUNDLE_VENDOR := UNDEFINED
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    66
  else
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    67
    BUNDLE_VENDOR := $(COMPANY_NAME)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    68
  endif
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    69
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    70
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    71
  JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    72
  JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR))
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    73
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    74
  JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    75
  JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST))
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    76
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    77
  # Copy empty directories (jre/lib/applet).
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    78
  $(JDK_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    79
	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    80
	$(MKDIR) -p $(@D)
24700
a646a5fa8e27 8044480: JDK image target overwrites lib/server/libjsig.dylib symlink with a copy of lib/libjsig.dylib
erikj
parents: 23010
diff changeset
    81
	if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    82
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    83
  $(JRE_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    84
	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    85
	$(MKDIR) -p $(@D)
24700
a646a5fa8e27 8044480: JDK image target overwrites lib/server/libjsig.dylib symlink with a copy of lib/libjsig.dylib
erikj
parents: 23010
diff changeset
    86
	if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    87
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    88
  $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib:
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    89
	$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    90
	$(MKDIR) -p $(@D)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    91
	$(RM) $@
15135
3ea5d7852acc 8005903: build-infra: bad symlink: j2sdk-bundle/jdk1.8.0.jdk/Contents/MacOS/libjli.dylib
erikj
parents: 15129
diff changeset
    92
	$(LN) -s ../Home/jre/lib/jli/libjli.dylib $@
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    93
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
    94
  $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib:
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    95
	$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    96
	$(MKDIR) -p $(@D)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    97
	$(RM) $@
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    98
	$(LN) -s ../Home/lib/jli/libjli.dylib $@
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    99
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   100
  $(JDK_BUNDLE_DIR)/Info.plist: $(SPEC)
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   101
	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   102
	$(MKDIR) -p $(@D)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   103
	$(SED) -e "s/@@ID@@/$(BUNDLE_ID_JDK)/g" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   104
	    -e "s/@@NAME@@/$(BUNDLE_NAME_JDK)/g" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   105
	    -e "s/@@INFO@@/$(BUNDLE_INFO_JDK)/g" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   106
	    -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   107
	    -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   108
	    -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24700
diff changeset
   109
	    < $(MACOSX_PLIST_SRC)/JDK-Info.plist > $@
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   110
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   111
  $(JRE_BUNDLE_DIR)/Info.plist: $(SPEC)
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   112
	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   113
	$(MKDIR) -p $(@D)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   114
	$(SED) -e "s/@@ID@@/$(BUNDLE_ID_JRE)/g" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   115
	    -e "s/@@NAME@@/$(BUNDLE_NAME_JRE)/g" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   116
	    -e "s/@@INFO@@/$(BUNDLE_INFO_JRE)/g" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   117
	    -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   118
	    -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   119
	    -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24700
diff changeset
   120
	    < $(MACOSX_PLIST_SRC)/JRE-Info.plist > $@
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   121
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   122
  jdk-bundle: $(JDK_TARGET_LIST) $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   123
      $(JDK_BUNDLE_DIR)/Info.plist
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   124
	$(SETFILE) -a B $(dir $(JDK_BUNDLE_DIR))
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   125
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   126
  jre-bundle: $(JRE_TARGET_LIST) $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   127
      $(JRE_BUNDLE_DIR)/Info.plist
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   128
	$(SETFILE) -a B $(dir $(JRE_BUNDLE_DIR))
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   129
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   130
else # Not macosx
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   131
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 15145
diff changeset
   132
  bundles:
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   133
	$(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)"
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   134
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   135
endif # macosx
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   136
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   137
.PHONY: jdk-bundle jre-bundle bundles