2
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
# This code is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 2 only, as
7
# published by the Free Software Foundation. Oracle designates this
8
# particular file as subject to the "Classpath" exception as provided
9
# by Oracle in the LICENSE file that accompanied this code.
11
# This code is distributed in the hope that it will be useful, but WITHOUT
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
# version 2 for more details (a copy is included in the LICENSE file that
15
# accompanied this code).
17
# You should have received a copy of the GNU General Public License version
18
# 2 along with this work; if not, write to the Free Software Foundation,
19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
# or visit www.oracle.com if you need additional information or have any
30
include TextFileProcessing.gmk
34
# Only macosx has bundles defined.
35
ifeq ($(call isTargetOs, macosx), true)
37
bundles: jre-bundle jdk-bundle
39
# JDK_MACOSX_CONTENTS_DIR and JRE_MACOSX_CONTENTS_DIR are defined in SPEC.
41
MACOSX_PLIST_SRC := $(TOPDIR)/make/data/bundle
43
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
44
BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
45
ifeq ($(COMPANY_NAME), N/A)
46
BUNDLE_VENDOR := UNDEFINED
48
BUNDLE_VENDOR := $(COMPANY_NAME)
51
$(eval $(call SetupCopyFiles, COPY_JDK_IMAGE, \
52
SRC := $(JDK_IMAGE_DIR), \
53
DEST := $(JDK_MACOSX_CONTENTS_DIR)/Home, \
54
FILES := $(call FindFiles, $(JDK_IMAGE_DIR)), \
57
$(eval $(call SetupCopyFiles, COPY_JRE_IMAGE, \
58
SRC := $(JRE_IMAGE_DIR), \
59
DEST := $(JRE_MACOSX_CONTENTS_DIR)/Home, \
60
FILES := $(call FindFiles, $(JRE_IMAGE_DIR)), \
63
$(eval $(call SetupCopyFiles, COPY_LIBJLI_JDK, \
64
FILES := $(JDK_IMAGE_DIR)/lib/libjli.dylib, \
65
DEST := $(JDK_MACOSX_CONTENTS_DIR)/MacOS, \
68
$(eval $(call SetupCopyFiles, COPY_LIBJLI_JRE, \
69
FILES := $(JRE_IMAGE_DIR)/lib/libjli.dylib, \
70
DEST := $(JRE_MACOSX_CONTENTS_DIR)/MacOS, \
73
$(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \
74
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist.template, \
75
OUTPUT_FILE := $(JDK_MACOSX_CONTENTS_DIR)/Info.plist, \
77
@@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jdk ; \
78
@@NAME@@ => $(BUNDLE_NAME) ; \
79
@@INFO@@ => $(BUNDLE_INFO) ; \
80
@@VERSION@@ => $(VERSION_NUMBER) ; \
81
@@BUILD_VERSION@@ => $(MACOSX_BUNDLE_BUILD_VERSION) ; \
82
@@VENDOR@@ => $(BUNDLE_VENDOR) ; \
83
@@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
86
$(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \
87
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist.template, \
88
OUTPUT_FILE := $(JRE_MACOSX_CONTENTS_DIR)/Info.plist, \
90
@@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jre ; \
91
@@NAME@@ => $(BUNDLE_NAME) ; \
92
@@INFO@@ => $(BUNDLE_INFO) ; \
93
@@VERSION@@ => $(VERSION_NUMBER) ; \
94
@@BUILD_VERSION@@ => $(BUNDLE_BUILD_VERSION) ; \
95
@@VENDOR@@ => $(BUNDLE_VENDOR) ; \
96
@@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
99
$(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set: $(COPY_JDK_IMAGE)
100
$(SETFILE) -a B $(dir $(JDK_MACOSX_CONTENTS_DIR))
103
$(SUPPORT_OUTPUTDIR)/images/_jre_bundle_attribute_set: $(COPY_JRE_IMAGE)
104
$(SETFILE) -a B $(dir $(JRE_MACOSX_CONTENTS_DIR))
107
jdk-bundle: $(COPY_JDK_IMAGE) $(COPY_LIBJLI_JDK) \
108
$(BUILD_JDK_PLIST) $(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set
110
jre-bundle: $(COPY_JRE_IMAGE) $(COPY_LIBJLI_JRE) \
111
$(BUILD_JRE_PLIST) $(SUPPORT_OUTPUTDIR)/images/_jre_bundle_attribute_set
116
$(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)"
120
.PHONY: jdk-bundle jre-bundle bundles