2014-12-03 14:20:21 +00:00
|
|
|
#
|
2017-10-24 08:41:45 +00:00
|
|
|
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
2014-12-03 14:20:21 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
|
|
# published by the Free Software Foundation. Oracle designates this
|
|
|
|
# particular file as subject to the "Classpath" exception as provided
|
|
|
|
# by Oracle in the LICENSE file that accompanied this code.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(SPEC)
|
|
|
|
include MakeBase.gmk
|
2015-06-18 15:00:44 +00:00
|
|
|
include TextFileProcessing.gmk
|
2014-12-03 14:20:21 +00:00
|
|
|
|
|
|
|
default: bundles
|
|
|
|
|
|
|
|
# Only macosx has bundles defined.
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetOs, macosx), true)
|
2014-12-03 14:20:21 +00:00
|
|
|
|
|
|
|
bundles: jre-bundle jdk-bundle
|
|
|
|
|
2016-05-04 13:29:01 +00:00
|
|
|
# JDK_MACOSX_CONTENTS_DIR and JRE_MACOSX_CONTENTS_DIR are defined in SPEC.
|
2014-12-03 14:20:21 +00:00
|
|
|
|
2017-09-12 17:03:56 +00:00
|
|
|
MACOSX_PLIST_SRC := $(TOPDIR)/make/data/bundle
|
2014-12-03 14:20:21 +00:00
|
|
|
|
2015-06-10 22:21:56 +00:00
|
|
|
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
|
|
|
|
BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
|
2014-12-03 14:20:21 +00:00
|
|
|
ifeq ($(COMPANY_NAME), N/A)
|
|
|
|
BUNDLE_VENDOR := UNDEFINED
|
|
|
|
else
|
|
|
|
BUNDLE_VENDOR := $(COMPANY_NAME)
|
|
|
|
endif
|
|
|
|
|
2017-10-13 11:42:10 +00:00
|
|
|
$(eval $(call SetupCopyFiles, COPY_JDK_IMAGE, \
|
|
|
|
SRC := $(JDK_IMAGE_DIR), \
|
|
|
|
DEST := $(JDK_MACOSX_CONTENTS_DIR)/Home, \
|
2017-10-24 08:41:45 +00:00
|
|
|
FILES := $(call FindFiles, $(JDK_IMAGE_DIR)), \
|
2017-10-13 11:42:10 +00:00
|
|
|
))
|
2014-12-03 14:20:21 +00:00
|
|
|
|
2017-10-13 11:42:10 +00:00
|
|
|
$(eval $(call SetupCopyFiles, COPY_JRE_IMAGE, \
|
|
|
|
SRC := $(JRE_IMAGE_DIR), \
|
|
|
|
DEST := $(JRE_MACOSX_CONTENTS_DIR)/Home, \
|
2017-10-24 08:41:45 +00:00
|
|
|
FILES := $(call FindFiles, $(JRE_IMAGE_DIR)), \
|
2017-10-13 11:42:10 +00:00
|
|
|
))
|
2014-12-03 14:20:21 +00:00
|
|
|
|
2019-12-12 19:35:57 +00:00
|
|
|
$(eval $(call SetupCopyFiles, COPY_LIBJLI_JDK, \
|
|
|
|
FILES := $(JDK_IMAGE_DIR)/lib/libjli.dylib, \
|
|
|
|
DEST := $(JDK_MACOSX_CONTENTS_DIR)/MacOS, \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupCopyFiles, COPY_LIBJLI_JRE, \
|
|
|
|
FILES := $(JRE_IMAGE_DIR)/lib/libjli.dylib, \
|
|
|
|
DEST := $(JRE_MACOSX_CONTENTS_DIR)/MacOS, \
|
|
|
|
))
|
2014-12-03 14:20:21 +00:00
|
|
|
|
2015-05-06 08:47:21 +00:00
|
|
|
$(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \
|
|
|
|
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
|
2016-05-04 13:29:01 +00:00
|
|
|
OUTPUT_FILE := $(JDK_MACOSX_CONTENTS_DIR)/Info.plist, \
|
2015-05-06 08:47:21 +00:00
|
|
|
REPLACEMENTS := \
|
2020-08-28 13:23:41 +00:00
|
|
|
@@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jdk ; \
|
2015-05-06 08:47:21 +00:00
|
|
|
@@NAME@@ => $(BUNDLE_NAME) ; \
|
|
|
|
@@INFO@@ => $(BUNDLE_INFO) ; \
|
2020-08-28 13:23:41 +00:00
|
|
|
@@VERSION@@ => $(VERSION_NUMBER) ; \
|
|
|
|
@@BUILD_VERSION@@ => $(MACOSX_BUNDLE_BUILD_VERSION) ; \
|
|
|
|
@@VENDOR@@ => $(BUNDLE_VENDOR) ; \
|
|
|
|
@@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
|
2015-05-06 08:47:21 +00:00
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \
|
|
|
|
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \
|
2016-05-04 13:29:01 +00:00
|
|
|
OUTPUT_FILE := $(JRE_MACOSX_CONTENTS_DIR)/Info.plist, \
|
2015-05-06 08:47:21 +00:00
|
|
|
REPLACEMENTS := \
|
2020-08-28 13:23:41 +00:00
|
|
|
@@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jre ; \
|
2015-05-06 08:47:21 +00:00
|
|
|
@@NAME@@ => $(BUNDLE_NAME) ; \
|
|
|
|
@@INFO@@ => $(BUNDLE_INFO) ; \
|
2020-08-28 13:23:41 +00:00
|
|
|
@@VERSION@@ => $(VERSION_NUMBER) ; \
|
|
|
|
@@BUILD_VERSION@@ => $(BUNDLE_BUILD_VERSION) ; \
|
|
|
|
@@VENDOR@@ => $(BUNDLE_VENDOR) ; \
|
|
|
|
@@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
|
2015-05-06 08:47:21 +00:00
|
|
|
))
|
|
|
|
|
2019-12-12 19:35:57 +00:00
|
|
|
$(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set: $(COPY_JDK_IMAGE)
|
2016-05-04 13:29:01 +00:00
|
|
|
$(SETFILE) -a B $(dir $(JDK_MACOSX_CONTENTS_DIR))
|
2019-12-12 19:35:57 +00:00
|
|
|
$(TOUCH) $@
|
2015-05-06 08:47:21 +00:00
|
|
|
|
2019-12-12 19:35:57 +00:00
|
|
|
$(SUPPORT_OUTPUTDIR)/images/_jre_bundle_attribute_set: $(COPY_JRE_IMAGE)
|
2016-05-04 13:29:01 +00:00
|
|
|
$(SETFILE) -a B $(dir $(JRE_MACOSX_CONTENTS_DIR))
|
2019-12-12 19:35:57 +00:00
|
|
|
$(TOUCH) $@
|
|
|
|
|
|
|
|
jdk-bundle: $(COPY_JDK_IMAGE) $(COPY_LIBJLI_JDK) \
|
|
|
|
$(BUILD_JDK_PLIST) $(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set
|
|
|
|
|
|
|
|
jre-bundle: $(COPY_JRE_IMAGE) $(COPY_LIBJLI_JRE) \
|
|
|
|
$(BUILD_JRE_PLIST) $(SUPPORT_OUTPUTDIR)/images/_jre_bundle_attribute_set
|
2014-12-03 14:20:21 +00:00
|
|
|
|
|
|
|
else # Not macosx
|
|
|
|
|
|
|
|
bundles:
|
|
|
|
$(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)"
|
|
|
|
|
|
|
|
endif # macosx
|
|
|
|
|
|
|
|
.PHONY: jdk-bundle jre-bundle bundles
|