annotate make/MacBundles.gmk @ 47524:97569cf468f4

8187040: ThreadCritical crashes on Solaris if used between os::init and os::init_2 Reviewed-by: dholmes, stuefe
author mgerdin
date Mon, 25 Sep 2017 21:25:46 -0400
parents 72e3ae9a25eb
children 09d386ddaa42
rev   line source
chegar@27560 1 #
ihse@41458 2 # Copyright (c) 2011, 2016, 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)
ihse@33926 44 BUNDLE_PLATFORM_VERSION := $(VERSION_MAJOR).$(VERSION_MINOR)
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
chegar@27560 52 JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR))
chegar@27560 53 JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR))
chegar@27560 54
erikj@37972 55 JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_MACOSX_CONTENTS_DIR)/Home/,$(JDK_FILE_LIST))
erikj@37972 56 JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_MACOSX_CONTENTS_DIR)/Home/,$(JRE_FILE_LIST))
chegar@27560 57
chegar@27560 58 # Copy empty directories (jre/lib/applet).
erikj@37972 59 $(JDK_MACOSX_CONTENTS_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
ihse@47253 60 $(call LogInfo, Copying $(patsubst $(OUTPUTDIR)/%,%,$@))
chegar@27560 61 $(MKDIR) -p $(@D)
chegar@27560 62 if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
chegar@27560 63
erikj@37972 64 $(JRE_MACOSX_CONTENTS_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
ihse@47253 65 $(call LogInfo, Copying $(patsubst $(OUTPUTDIR)/%,%,$@))
chegar@27560 66 $(MKDIR) -p $(@D)
chegar@27560 67 if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
chegar@27560 68
erikj@37972 69 $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib:
ihse@47253 70 $(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@))
chegar@27560 71 $(MKDIR) -p $(@D)
chegar@27560 72 $(RM) $@
chegar@27560 73 $(LN) -s ../Home/lib/jli/libjli.dylib $@
chegar@27560 74
erikj@37972 75 $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib:
ihse@47253 76 $(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@))
chegar@27560 77 $(MKDIR) -p $(@D)
chegar@27560 78 $(RM) $@
chegar@27560 79 $(LN) -s ../Home/lib/jli/libjli.dylib $@
chegar@27560 80
ihse@30094 81 $(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \
ihse@30094 82 SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
erikj@37972 83 OUTPUT_FILE := $(JDK_MACOSX_CONTENTS_DIR)/Info.plist, \
ihse@30094 84 REPLACEMENTS := \
ihse@30094 85 @@ID@@ => $(BUNDLE_ID).jdk ; \
ihse@30094 86 @@NAME@@ => $(BUNDLE_NAME) ; \
ihse@30094 87 @@INFO@@ => $(BUNDLE_INFO) ; \
ihse@30094 88 @@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
ihse@30094 89 @@VERSION@@ => $(BUNDLE_VERSION) ; \
ihse@30094 90 @@VENDOR@@ => $(BUNDLE_VENDOR) , \
ihse@30094 91 ))
chegar@27560 92
ihse@30094 93 $(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \
ihse@30094 94 SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \
erikj@37972 95 OUTPUT_FILE := $(JRE_MACOSX_CONTENTS_DIR)/Info.plist, \
ihse@30094 96 REPLACEMENTS := \
ihse@30094 97 @@ID@@ => $(BUNDLE_ID).jre ; \
ihse@30094 98 @@NAME@@ => $(BUNDLE_NAME) ; \
ihse@30094 99 @@INFO@@ => $(BUNDLE_INFO) ; \
ihse@30094 100 @@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
ihse@30094 101 @@VERSION@@ => $(BUNDLE_VERSION) ; \
ihse@30094 102 @@VENDOR@@ => $(BUNDLE_VENDOR) , \
ihse@30094 103 ))
chegar@27560 104
erikj@37972 105 jdk-bundle: $(JDK_TARGET_LIST) $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \
ihse@30094 106 $(BUILD_JDK_PLIST)
erikj@37972 107 $(SETFILE) -a B $(dir $(JDK_MACOSX_CONTENTS_DIR))
chegar@27560 108
erikj@37972 109 jre-bundle: $(JRE_TARGET_LIST) $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \
ihse@30094 110 $(BUILD_JRE_PLIST)
erikj@37972 111 $(SETFILE) -a B $(dir $(JRE_MACOSX_CONTENTS_DIR))
chegar@27560 112
chegar@27560 113 else # Not macosx
chegar@27560 114
chegar@27560 115 bundles:
chegar@27560 116 $(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)"
chegar@27560 117
chegar@27560 118 endif # macosx
chegar@27560 119
chegar@27560 120 .PHONY: jdk-bundle jre-bundle bundles