make/MacBundles.gmk
author aph
Fri, 19 Jan 2018 16:57:56 +0000
changeset 48701 48ce4b11bc17
parent 48327 d2a837cf9ff1
child 51825 e3632b4706c4
permissions -rw-r--r--
8195685: AArch64: AArch64 cannot build with JDK-8174962 Reviewed-by: adinn, njian
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
     1
#
48327
d2a837cf9ff1 8192833: JEP 322: Time-Based Release Versioning
mr
parents: 47334
diff changeset
     2
# Copyright (c) 2011, 2017, 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
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 35008
diff changeset
    37
  # JDK_MACOSX_CONTENTS_DIR and JRE_MACOSX_CONTENTS_DIR are defined in SPEC.
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    38
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 41458
diff changeset
    39
  MACOSX_PLIST_SRC := $(TOPDIR)/make/data/bundle
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    40
33926
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 30094
diff changeset
    41
  BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(VERSION_SHORT)
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 30094
diff changeset
    42
  BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 30094
diff changeset
    43
  BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
48327
d2a837cf9ff1 8192833: JEP 322: Time-Based Release Versioning
mr
parents: 47334
diff changeset
    44
  BUNDLE_PLATFORM_VERSION := $(VERSION_FEATURE).$(VERSION_INTERIM)
33926
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 30094
diff changeset
    45
  BUNDLE_VERSION := $(VERSION_NUMBER)
27560
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
47334
09d386ddaa42 8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents: 47253
diff changeset
    52
  $(eval $(call SetupCopyFiles, COPY_JDK_IMAGE, \
09d386ddaa42 8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents: 47253
diff changeset
    53
      SRC := $(JDK_IMAGE_DIR), \
09d386ddaa42 8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents: 47253
diff changeset
    54
      DEST := $(JDK_MACOSX_CONTENTS_DIR)/Home, \
09d386ddaa42 8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents: 47253
diff changeset
    55
      FILES := $(call CacheFind, $(JDK_IMAGE_DIR)), \
09d386ddaa42 8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents: 47253
diff changeset
    56
  ))
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    57
47334
09d386ddaa42 8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents: 47253
diff changeset
    58
  $(eval $(call SetupCopyFiles, COPY_JRE_IMAGE, \
09d386ddaa42 8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents: 47253
diff changeset
    59
      SRC := $(JRE_IMAGE_DIR), \
09d386ddaa42 8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents: 47253
diff changeset
    60
      DEST := $(JRE_MACOSX_CONTENTS_DIR)/Home, \
09d386ddaa42 8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents: 47253
diff changeset
    61
      FILES := $(call CacheFind, $(JRE_IMAGE_DIR)), \
09d386ddaa42 8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents: 47253
diff changeset
    62
  ))
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    63
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 35008
diff changeset
    64
  $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib:
47253
92fd0e04e0e1 8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents: 47217
diff changeset
    65
	$(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@))
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
	$(RM) $@
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    68
	$(LN) -s ../Home/lib/jli/libjli.dylib $@
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    69
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 35008
diff changeset
    70
  $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib:
47253
92fd0e04e0e1 8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents: 47217
diff changeset
    71
	$(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@))
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    72
	$(MKDIR) -p $(@D)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    73
	$(RM) $@
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    74
	$(LN) -s ../Home/lib/jli/libjli.dylib $@
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    75
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    76
  $(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    77
      SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 35008
diff changeset
    78
      OUTPUT_FILE := $(JDK_MACOSX_CONTENTS_DIR)/Info.plist, \
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    79
      REPLACEMENTS := \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    80
          @@ID@@ => $(BUNDLE_ID).jdk ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    81
          @@NAME@@ => $(BUNDLE_NAME) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    82
          @@INFO@@ => $(BUNDLE_INFO) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    83
          @@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    84
          @@VERSION@@ => $(BUNDLE_VERSION) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    85
          @@VENDOR@@ => $(BUNDLE_VENDOR) , \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    86
  ))
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    87
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    88
  $(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    89
      SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 35008
diff changeset
    90
      OUTPUT_FILE := $(JRE_MACOSX_CONTENTS_DIR)/Info.plist, \
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    91
      REPLACEMENTS := \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    92
          @@ID@@ => $(BUNDLE_ID).jre ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    93
          @@NAME@@ => $(BUNDLE_NAME) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    94
          @@INFO@@ => $(BUNDLE_INFO) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    95
          @@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    96
          @@VERSION@@ => $(BUNDLE_VERSION) ; \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    97
          @@VENDOR@@ => $(BUNDLE_VENDOR) , \
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
    98
  ))
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
    99
47334
09d386ddaa42 8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents: 47253
diff changeset
   100
  jdk-bundle: $(COPY_JDK_IMAGE) $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
   101
      $(BUILD_JDK_PLIST)
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 35008
diff changeset
   102
	$(SETFILE) -a B $(dir $(JDK_MACOSX_CONTENTS_DIR))
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   103
47334
09d386ddaa42 8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents: 47253
diff changeset
   104
  jre-bundle: $(COPY_JRE_IMAGE) $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \
30094
bc3b5dbd8931 8078058: Clean up mac bundles logic
ihse
parents: 27560
diff changeset
   105
      $(BUILD_JRE_PLIST)
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 35008
diff changeset
   106
	$(SETFILE) -a B $(dir $(JRE_MACOSX_CONTENTS_DIR))
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   107
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   108
else # Not macosx
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   109
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   110
  bundles:
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   111
	$(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)"
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   112
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   113
endif # macosx
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   114
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents:
diff changeset
   115
.PHONY: jdk-bundle jre-bundle bundles