author | lana |
Wed, 23 Mar 2016 19:33:45 -0700 | |
changeset 36704 | bc8cf6f28aea |
parent 35008 | ef0cd710989f |
child 37972 | e1fa5c2e62a0 |
permissions | -rw-r--r-- |
27560 | 1 |
# |
30094 | 2 |
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
27560 | 3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
# |
|
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. |
|
10 |
# |
|
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). |
|
16 |
# |
|
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. |
|
20 |
# |
|
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 |
|
23 |
# questions. |
|
24 |
# |
|
25 |
||
26 |
include $(SPEC) |
|
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 | 29 |
|
30 |
default: bundles |
|
31 |
||
32 |
# Only macosx has bundles defined. |
|
33 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
34 |
||
35 |
bundles: jre-bundle jdk-bundle |
|
36 |
||
30094 | 37 |
# JDK_MACOSX_BUNDLE_DIR and JRE_MACOSX_BUNDLE_DIR are defined in SPEC. |
27560 | 38 |
|
39 |
MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle |
|
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) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
30094
diff
changeset
|
44 |
BUNDLE_PLATFORM_VERSION := $(VERSION_MAJOR).$(VERSION_MINOR) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
30094
diff
changeset
|
45 |
BUNDLE_VERSION := $(VERSION_NUMBER) |
27560 | 46 |
ifeq ($(COMPANY_NAME), N/A) |
47 |
BUNDLE_VENDOR := UNDEFINED |
|
48 |
else |
|
49 |
BUNDLE_VENDOR := $(COMPANY_NAME) |
|
50 |
endif |
|
51 |
||
52 |
JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR)) |
|
53 |
JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR)) |
|
54 |
||
30094 | 55 |
JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_MACOSX_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST)) |
56 |
JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_MACOSX_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST)) |
|
27560 | 57 |
|
58 |
# Copy empty directories (jre/lib/applet). |
|
30094 | 59 |
$(JDK_MACOSX_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/% |
35008 | 60 |
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 61 |
$(MKDIR) -p $(@D) |
62 |
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi |
|
63 |
||
30094 | 64 |
$(JRE_MACOSX_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/% |
35008 | 65 |
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 66 |
$(MKDIR) -p $(@D) |
67 |
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi |
|
68 |
||
30094 | 69 |
$(JDK_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib: |
35008 | 70 |
$(call LogInfo, Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 71 |
$(MKDIR) -p $(@D) |
72 |
$(RM) $@ |
|
73 |
$(LN) -s ../Home/lib/jli/libjli.dylib $@ |
|
74 |
||
30094 | 75 |
$(JRE_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib: |
35008 | 76 |
$(call LogInfo, Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
27560 | 77 |
$(MKDIR) -p $(@D) |
78 |
$(RM) $@ |
|
79 |
$(LN) -s ../Home/lib/jli/libjli.dylib $@ |
|
80 |
||
30094 | 81 |
$(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \ |
82 |
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \ |
|
83 |
OUTPUT_FILE := $(JDK_MACOSX_BUNDLE_DIR)/Info.plist, \ |
|
84 |
REPLACEMENTS := \ |
|
85 |
@@ID@@ => $(BUNDLE_ID).jdk ; \ |
|
86 |
@@NAME@@ => $(BUNDLE_NAME) ; \ |
|
87 |
@@INFO@@ => $(BUNDLE_INFO) ; \ |
|
88 |
@@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \ |
|
89 |
@@VERSION@@ => $(BUNDLE_VERSION) ; \ |
|
90 |
@@VENDOR@@ => $(BUNDLE_VENDOR) , \ |
|
91 |
)) |
|
27560 | 92 |
|
30094 | 93 |
$(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \ |
94 |
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \ |
|
95 |
OUTPUT_FILE := $(JRE_MACOSX_BUNDLE_DIR)/Info.plist, \ |
|
96 |
REPLACEMENTS := \ |
|
97 |
@@ID@@ => $(BUNDLE_ID).jre ; \ |
|
98 |
@@NAME@@ => $(BUNDLE_NAME) ; \ |
|
99 |
@@INFO@@ => $(BUNDLE_INFO) ; \ |
|
100 |
@@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \ |
|
101 |
@@VERSION@@ => $(BUNDLE_VERSION) ; \ |
|
102 |
@@VENDOR@@ => $(BUNDLE_VENDOR) , \ |
|
103 |
)) |
|
27560 | 104 |
|
30094 | 105 |
jdk-bundle: $(JDK_TARGET_LIST) $(JDK_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib \ |
106 |
$(BUILD_JDK_PLIST) |
|
107 |
$(SETFILE) -a B $(dir $(JDK_MACOSX_BUNDLE_DIR)) |
|
27560 | 108 |
|
30094 | 109 |
jre-bundle: $(JRE_TARGET_LIST) $(JRE_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib \ |
110 |
$(BUILD_JRE_PLIST) |
|
111 |
$(SETFILE) -a B $(dir $(JRE_MACOSX_BUNDLE_DIR)) |
|
27560 | 112 |
|
113 |
else # Not macosx |
|
114 |
||
115 |
bundles: |
|
116 |
$(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)" |
|
117 |
||
118 |
endif # macosx |
|
119 |
||
120 |
.PHONY: jdk-bundle jre-bundle bundles |