author | michaelm |
Thu, 14 Nov 2019 10:16:28 +0000 | |
branch | unixdomainchannels |
changeset 59076 | 998df1368cca |
parent 54380 | e297c7bb6469 |
permissions | -rw-r--r-- |
27560 | 1 |
# |
54380 | 2 |
# Copyright (c) 2011, 2019, 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. |
|
53683 | 33 |
ifeq ($(call isTargetOs, macosx), true) |
27560 | 34 |
|
35 |
bundles: jre-bundle jdk-bundle |
|
36 |
||
37972 | 37 |
# JDK_MACOSX_CONTENTS_DIR and JRE_MACOSX_CONTENTS_DIR are defined in SPEC. |
27560 | 38 |
|
47217 | 39 |
MACOSX_PLIST_SRC := $(TOPDIR)/make/data/bundle |
27560 | 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) |
48327 | 44 |
BUNDLE_PLATFORM_VERSION := $(VERSION_FEATURE).$(VERSION_INTERIM) |
33926
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 |
||
47334
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47253
diff
changeset
|
52 |
$(eval $(call SetupCopyFiles, COPY_JDK_IMAGE, \ |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47253
diff
changeset
|
53 |
SRC := $(JDK_IMAGE_DIR), \ |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47253
diff
changeset
|
54 |
DEST := $(JDK_MACOSX_CONTENTS_DIR)/Home, \ |
54380 | 55 |
FILES := $(call FindFiles, $(JDK_IMAGE_DIR)), \ |
47334
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47253
diff
changeset
|
56 |
)) |
27560 | 57 |
|
47334
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47253
diff
changeset
|
58 |
$(eval $(call SetupCopyFiles, COPY_JRE_IMAGE, \ |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47253
diff
changeset
|
59 |
SRC := $(JRE_IMAGE_DIR), \ |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47253
diff
changeset
|
60 |
DEST := $(JRE_MACOSX_CONTENTS_DIR)/Home, \ |
54380 | 61 |
FILES := $(call FindFiles, $(JRE_IMAGE_DIR)), \ |
47334
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47253
diff
changeset
|
62 |
)) |
27560 | 63 |
|
37972 | 64 |
$(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib: |
47253
92fd0e04e0e1
8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents:
47217
diff
changeset
|
65 |
$(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@)) |
52065
dea8a62cdfc3
8211724: Change mkdir -p to MakeDir macro where possible
erikj
parents:
51825
diff
changeset
|
66 |
$(call MakeTargetDir) |
27560 | 67 |
$(RM) $@ |
51825
e3632b4706c4
8210931: JLI and launchers normalization and cleanup
ihse
parents:
48327
diff
changeset
|
68 |
$(LN) -s ../Home/lib/libjli.dylib $@ |
27560 | 69 |
|
37972 | 70 |
$(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib: |
47253
92fd0e04e0e1
8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents:
47217
diff
changeset
|
71 |
$(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@)) |
52065
dea8a62cdfc3
8211724: Change mkdir -p to MakeDir macro where possible
erikj
parents:
51825
diff
changeset
|
72 |
$(call MakeTargetDir) |
27560 | 73 |
$(RM) $@ |
51825
e3632b4706c4
8210931: JLI and launchers normalization and cleanup
ihse
parents:
48327
diff
changeset
|
74 |
$(LN) -s ../Home/lib/libjli.dylib $@ |
27560 | 75 |
|
30094 | 76 |
$(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \ |
77 |
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \ |
|
37972 | 78 |
OUTPUT_FILE := $(JDK_MACOSX_CONTENTS_DIR)/Info.plist, \ |
30094 | 79 |
REPLACEMENTS := \ |
80 |
@@ID@@ => $(BUNDLE_ID).jdk ; \ |
|
81 |
@@NAME@@ => $(BUNDLE_NAME) ; \ |
|
82 |
@@INFO@@ => $(BUNDLE_INFO) ; \ |
|
83 |
@@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \ |
|
84 |
@@VERSION@@ => $(BUNDLE_VERSION) ; \ |
|
85 |
@@VENDOR@@ => $(BUNDLE_VENDOR) , \ |
|
86 |
)) |
|
27560 | 87 |
|
30094 | 88 |
$(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \ |
89 |
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \ |
|
37972 | 90 |
OUTPUT_FILE := $(JRE_MACOSX_CONTENTS_DIR)/Info.plist, \ |
30094 | 91 |
REPLACEMENTS := \ |
92 |
@@ID@@ => $(BUNDLE_ID).jre ; \ |
|
93 |
@@NAME@@ => $(BUNDLE_NAME) ; \ |
|
94 |
@@INFO@@ => $(BUNDLE_INFO) ; \ |
|
95 |
@@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \ |
|
96 |
@@VERSION@@ => $(BUNDLE_VERSION) ; \ |
|
97 |
@@VENDOR@@ => $(BUNDLE_VENDOR) , \ |
|
98 |
)) |
|
27560 | 99 |
|
47334
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47253
diff
changeset
|
100 |
jdk-bundle: $(COPY_JDK_IMAGE) $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \ |
30094 | 101 |
$(BUILD_JDK_PLIST) |
37972 | 102 |
$(SETFILE) -a B $(dir $(JDK_MACOSX_CONTENTS_DIR)) |
27560 | 103 |
|
47334
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47253
diff
changeset
|
104 |
jre-bundle: $(COPY_JRE_IMAGE) $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \ |
30094 | 105 |
$(BUILD_JRE_PLIST) |
37972 | 106 |
$(SETFILE) -a B $(dir $(JRE_MACOSX_CONTENTS_DIR)) |
27560 | 107 |
|
108 |
else # Not macosx |
|
109 |
||
110 |
bundles: |
|
111 |
$(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)" |
|
112 |
||
113 |
endif # macosx |
|
114 |
||
115 |
.PHONY: jdk-bundle jre-bundle bundles |