make/MacBundles.gmk
author dsamersoff
Thu, 01 Oct 2015 10:33:29 +0300
changeset 33265 e9b5c00922e5
parent 31311 3d8fd992345c
child 33932 6ffbe66fe204
permissions -rw-r--r--
8133063: Remove BasicLauncherTest from the problem list Summary: Remove BasicLauncherTest from the problem list Reviewed-by: jbachorik
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     1
#
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
     2
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     4
#
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    10
#
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    15
# accompanied this code).
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    16
#
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    20
#
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    23
# questions.
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    24
#
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    25
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    26
include $(SPEC)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    27
include MakeBase.gmk
31125
9c321d13b2be 8080915: [macosx] JDK 9 installation does not add java info to the java_home plist
erikj
parents: 30094
diff changeset
    28
include TextFileProcessing.gmk
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    29
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    30
default: bundles
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    31
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    32
# Only macosx has bundles defined.
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    33
ifeq ($(OPENJDK_TARGET_OS), macosx)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    34
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    35
  bundles: jre-bundle jdk-bundle
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    36
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    37
  # JDK_MACOSX_BUNDLE_DIR and JRE_MACOSX_BUNDLE_DIR are defined in SPEC.
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    38
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    39
  MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    40
31310
481585782338 8081814: Modularize the deploy build
erikj
parents: 30094
diff changeset
    41
    BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(JDK_MINOR_VERSION)u$(JDK_UPDATE_VERSION)
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    42
  BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION)
31310
481585782338 8081814: Modularize the deploy build
erikj
parents: 30094
diff changeset
    43
    BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_VERSION)
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    44
  BUNDLE_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    45
  BUNDLE_VERSION := $(JDK_VERSION)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    46
  ifeq ($(COMPANY_NAME), N/A)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    47
    BUNDLE_VENDOR := UNDEFINED
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    48
  else
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    49
    BUNDLE_VENDOR := $(COMPANY_NAME)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    50
  endif
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    51
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    52
  JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR))
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    53
  JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR))
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    54
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    55
  JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_MACOSX_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST))
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    56
  JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_MACOSX_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST))
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    57
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    58
  # Copy empty directories (jre/lib/applet).
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    59
  $(JDK_MACOSX_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
31310
481585782338 8081814: Modularize the deploy build
erikj
parents: 30094
diff changeset
    60
	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(LOG_INFO)
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    61
	$(MKDIR) -p $(@D)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    62
	if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    63
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    64
  $(JRE_MACOSX_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
31310
481585782338 8081814: Modularize the deploy build
erikj
parents: 30094
diff changeset
    65
	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(LOG_INFO)
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    66
	$(MKDIR) -p $(@D)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    67
	if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    68
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    69
  $(JDK_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib:
31310
481585782338 8081814: Modularize the deploy build
erikj
parents: 30094
diff changeset
    70
	$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(LOG_INFO)
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    71
	$(MKDIR) -p $(@D)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    72
	$(RM) $@
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    73
	$(LN) -s ../Home/lib/jli/libjli.dylib $@
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    74
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    75
  $(JRE_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib:
31310
481585782338 8081814: Modularize the deploy build
erikj
parents: 30094
diff changeset
    76
	$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(LOG_INFO)
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    77
	$(MKDIR) -p $(@D)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    78
	$(RM) $@
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    79
	$(LN) -s ../Home/lib/jli/libjli.dylib $@
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    80
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    81
  $(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    82
      SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    83
      OUTPUT_FILE := $(JDK_MACOSX_BUNDLE_DIR)/Info.plist, \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    84
      REPLACEMENTS := \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    85
          @@ID@@ => $(BUNDLE_ID).jdk ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    86
          @@NAME@@ => $(BUNDLE_NAME) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    87
          @@INFO@@ => $(BUNDLE_INFO) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    88
          @@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    89
          @@VERSION@@ => $(BUNDLE_VERSION) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    90
          @@VENDOR@@ => $(BUNDLE_VENDOR) , \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    91
  ))
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    92
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    93
  $(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    94
      SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    95
      OUTPUT_FILE := $(JRE_MACOSX_BUNDLE_DIR)/Info.plist, \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    96
      REPLACEMENTS := \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    97
          @@ID@@ => $(BUNDLE_ID).jre ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    98
          @@NAME@@ => $(BUNDLE_NAME) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    99
          @@INFO@@ => $(BUNDLE_INFO) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
   100
          @@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
   101
          @@VERSION@@ => $(BUNDLE_VERSION) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
   102
          @@VENDOR@@ => $(BUNDLE_VENDOR) , \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
   103
  ))
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   104
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
   105
  jdk-bundle: $(JDK_TARGET_LIST) $(JDK_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
   106
      $(BUILD_JDK_PLIST)
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
   107
	$(SETFILE) -a B $(dir $(JDK_MACOSX_BUNDLE_DIR))
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   108
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
   109
  jre-bundle: $(JRE_TARGET_LIST) $(JRE_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
   110
      $(BUILD_JRE_PLIST)
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
   111
	$(SETFILE) -a B $(dir $(JRE_MACOSX_BUNDLE_DIR))
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   112
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   113
else # Not macosx
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   114
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   115
  bundles:
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   116
	$(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)"
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   117
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   118
endif # macosx
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   119
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   120
.PHONY: jdk-bundle jre-bundle bundles