annotate make/MacBundles.gmk @ 51844:e3632b4706c4

8210931: JLI and launchers normalization and cleanup Reviewed-by: alanb, erikj
author ihse
date Thu, 20 Sep 2018 21:05:00 +0200
parents d2a837cf9ff1
children dea8a62cdfc3
rev   line source
chegar@27560 1 #
ihse@51844 2 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
chegar@27560 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
chegar@27560 4 #
chegar@27560 5 # This code is free software; you can redistribute it and/or modify it
chegar@27560 6 # under the terms of the GNU General Public License version 2 only, as
chegar@27560 7 # published by the Free Software Foundation. Oracle designates this
chegar@27560 8 # particular file as subject to the "Classpath" exception as provided
chegar@27560 9 # by Oracle in the LICENSE file that accompanied this code.
chegar@27560 10 #
chegar@27560 11 # This code is distributed in the hope that it will be useful, but WITHOUT
chegar@27560 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
chegar@27560 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
chegar@27560 14 # version 2 for more details (a copy is included in the LICENSE file that
chegar@27560 15 # accompanied this code).
chegar@27560 16 #
chegar@27560 17 # You should have received a copy of the GNU General Public License version
chegar@27560 18 # 2 along with this work; if not, write to the Free Software Foundation,
chegar@27560 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
chegar@27560 20 #
chegar@27560 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
chegar@27560 22 # or visit www.oracle.com if you need additional information or have any
chegar@27560 23 # questions.
chegar@27560 24 #
chegar@27560 25
chegar@27560 26 include $(SPEC)
chegar@27560 27 include MakeBase.gmk
erikj@31125 28 include TextFileProcessing.gmk
chegar@27560 29
chegar@27560 30 default: bundles
chegar@27560 31
chegar@27560 32 # Only macosx has bundles defined.
chegar@27560 33 ifeq ($(OPENJDK_TARGET_OS), macosx)
chegar@27560 34
chegar@27560 35 bundles: jre-bundle jdk-bundle
chegar@27560 36
erikj@37972 37 # JDK_MACOSX_CONTENTS_DIR and JRE_MACOSX_CONTENTS_DIR are defined in SPEC.
chegar@27560 38
erikj@47217 39 MACOSX_PLIST_SRC := $(TOPDIR)/make/data/bundle
chegar@27560 40
ihse@33926 41 BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(VERSION_SHORT)
ihse@33926 42 BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
ihse@33926 43 BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
mr@48328 44 BUNDLE_PLATFORM_VERSION := $(VERSION_FEATURE).$(VERSION_INTERIM)
ihse@33926 45 BUNDLE_VERSION := $(VERSION_NUMBER)
chegar@27560 46 ifeq ($(COMPANY_NAME), N/A)
chegar@27560 47 BUNDLE_VENDOR := UNDEFINED
chegar@27560 48 else
chegar@27560 49 BUNDLE_VENDOR := $(COMPANY_NAME)
chegar@27560 50 endif
chegar@27560 51
erikj@47334 52 $(eval $(call SetupCopyFiles, COPY_JDK_IMAGE, \
erikj@47334 53 SRC := $(JDK_IMAGE_DIR), \
erikj@47334 54 DEST := $(JDK_MACOSX_CONTENTS_DIR)/Home, \
erikj@47334 55 FILES := $(call CacheFind, $(JDK_IMAGE_DIR)), \
erikj@47334 56 ))
chegar@27560 57
erikj@47334 58 $(eval $(call SetupCopyFiles, COPY_JRE_IMAGE, \
erikj@47334 59 SRC := $(JRE_IMAGE_DIR), \
erikj@47334 60 DEST := $(JRE_MACOSX_CONTENTS_DIR)/Home, \
erikj@47334 61 FILES := $(call CacheFind, $(JRE_IMAGE_DIR)), \
erikj@47334 62 ))
chegar@27560 63
erikj@37972 64 $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib:
ihse@47253 65 $(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@))
chegar@27560 66 $(MKDIR) -p $(@D)
chegar@27560 67 $(RM) $@
ihse@51844 68 $(LN) -s ../Home/lib/libjli.dylib $@
chegar@27560 69
erikj@37972 70 $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib:
ihse@47253 71 $(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@))
chegar@27560 72 $(MKDIR) -p $(@D)
chegar@27560 73 $(RM) $@
ihse@51844 74 $(LN) -s ../Home/lib/libjli.dylib $@
chegar@27560 75
ihse@30094 76 $(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \
ihse@30094 77 SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
erikj@37972 78 OUTPUT_FILE := $(JDK_MACOSX_CONTENTS_DIR)/Info.plist, \
ihse@30094 79 REPLACEMENTS := \
ihse@30094 80 @@ID@@ => $(BUNDLE_ID).jdk ; \
ihse@30094 81 @@NAME@@ => $(BUNDLE_NAME) ; \
ihse@30094 82 @@INFO@@ => $(BUNDLE_INFO) ; \
ihse@30094 83 @@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
ihse@30094 84 @@VERSION@@ => $(BUNDLE_VERSION) ; \
ihse@30094 85 @@VENDOR@@ => $(BUNDLE_VENDOR) , \
ihse@30094 86 ))
chegar@27560 87
ihse@30094 88 $(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \
ihse@30094 89 SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \
erikj@37972 90 OUTPUT_FILE := $(JRE_MACOSX_CONTENTS_DIR)/Info.plist, \
ihse@30094 91 REPLACEMENTS := \
ihse@30094 92 @@ID@@ => $(BUNDLE_ID).jre ; \
ihse@30094 93 @@NAME@@ => $(BUNDLE_NAME) ; \
ihse@30094 94 @@INFO@@ => $(BUNDLE_INFO) ; \
ihse@30094 95 @@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
ihse@30094 96 @@VERSION@@ => $(BUNDLE_VERSION) ; \
ihse@30094 97 @@VENDOR@@ => $(BUNDLE_VENDOR) , \
ihse@30094 98 ))
chegar@27560 99
erikj@47334 100 jdk-bundle: $(COPY_JDK_IMAGE) $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \
ihse@30094 101 $(BUILD_JDK_PLIST)
erikj@37972 102 $(SETFILE) -a B $(dir $(JDK_MACOSX_CONTENTS_DIR))
chegar@27560 103
erikj@47334 104 jre-bundle: $(COPY_JRE_IMAGE) $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \
ihse@30094 105 $(BUILD_JRE_PLIST)
erikj@37972 106 $(SETFILE) -a B $(dir $(JRE_MACOSX_CONTENTS_DIR))
chegar@27560 107
chegar@27560 108 else # Not macosx
chegar@27560 109
chegar@27560 110 bundles:
chegar@27560 111 $(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)"
chegar@27560 112
chegar@27560 113 endif # macosx
chegar@27560 114
chegar@27560 115 .PHONY: jdk-bundle jre-bundle bundles