jdk

Форк
0
/
MacBundles.gmk 
120 строк · 4.2 Кб
1
#
2
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
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
28

29
include CopyFiles.gmk
30
include TextFileProcessing.gmk
31

32
default: bundles
33

34
# Only macosx has bundles defined.
35
ifeq ($(call isTargetOs, macosx), true)
36

37
  bundles: jre-bundle jdk-bundle
38

39
  # JDK_MACOSX_CONTENTS_DIR and JRE_MACOSX_CONTENTS_DIR are defined in SPEC.
40

41
  MACOSX_PLIST_SRC := $(TOPDIR)/make/data/bundle
42

43
  BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
44
  BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
45
  ifeq ($(COMPANY_NAME), N/A)
46
    BUNDLE_VENDOR := UNDEFINED
47
  else
48
    BUNDLE_VENDOR := $(COMPANY_NAME)
49
  endif
50

51
  $(eval $(call SetupCopyFiles, COPY_JDK_IMAGE, \
52
      SRC := $(JDK_IMAGE_DIR), \
53
      DEST := $(JDK_MACOSX_CONTENTS_DIR)/Home, \
54
      FILES := $(call FindFiles, $(JDK_IMAGE_DIR)), \
55
  ))
56

57
  $(eval $(call SetupCopyFiles, COPY_JRE_IMAGE, \
58
      SRC := $(JRE_IMAGE_DIR), \
59
      DEST := $(JRE_MACOSX_CONTENTS_DIR)/Home, \
60
      FILES := $(call FindFiles, $(JRE_IMAGE_DIR)), \
61
  ))
62

63
  $(eval $(call SetupCopyFiles, COPY_LIBJLI_JDK, \
64
      FILES := $(JDK_IMAGE_DIR)/lib/libjli.dylib, \
65
      DEST := $(JDK_MACOSX_CONTENTS_DIR)/MacOS, \
66
  ))
67

68
  $(eval $(call SetupCopyFiles, COPY_LIBJLI_JRE, \
69
      FILES := $(JRE_IMAGE_DIR)/lib/libjli.dylib, \
70
      DEST := $(JRE_MACOSX_CONTENTS_DIR)/MacOS, \
71
  ))
72

73
  $(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \
74
      SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist.template, \
75
      OUTPUT_FILE := $(JDK_MACOSX_CONTENTS_DIR)/Info.plist, \
76
      REPLACEMENTS := \
77
          @@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jdk ; \
78
          @@NAME@@ => $(BUNDLE_NAME) ; \
79
          @@INFO@@ => $(BUNDLE_INFO) ; \
80
          @@VERSION@@ => $(VERSION_NUMBER) ; \
81
          @@BUILD_VERSION@@ => $(MACOSX_BUNDLE_BUILD_VERSION) ; \
82
          @@VENDOR@@ => $(BUNDLE_VENDOR) ; \
83
          @@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
84
  ))
85

86
  $(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \
87
      SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist.template, \
88
      OUTPUT_FILE := $(JRE_MACOSX_CONTENTS_DIR)/Info.plist, \
89
      REPLACEMENTS := \
90
          @@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jre ; \
91
          @@NAME@@ => $(BUNDLE_NAME) ; \
92
          @@INFO@@ => $(BUNDLE_INFO) ; \
93
          @@VERSION@@ => $(VERSION_NUMBER) ; \
94
          @@BUILD_VERSION@@ => $(BUNDLE_BUILD_VERSION) ; \
95
          @@VENDOR@@ => $(BUNDLE_VENDOR) ; \
96
          @@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
97
  ))
98

99
  $(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set: $(COPY_JDK_IMAGE)
100
	$(SETFILE) -a B $(dir $(JDK_MACOSX_CONTENTS_DIR))
101
	$(TOUCH) $@
102

103
  $(SUPPORT_OUTPUTDIR)/images/_jre_bundle_attribute_set: $(COPY_JRE_IMAGE)
104
	$(SETFILE) -a B $(dir $(JRE_MACOSX_CONTENTS_DIR))
105
	$(TOUCH) $@
106

107
  jdk-bundle: $(COPY_JDK_IMAGE) $(COPY_LIBJLI_JDK) \
108
      $(BUILD_JDK_PLIST) $(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set
109

110
  jre-bundle: $(COPY_JRE_IMAGE) $(COPY_LIBJLI_JRE) \
111
      $(BUILD_JRE_PLIST) $(SUPPORT_OUTPUTDIR)/images/_jre_bundle_attribute_set
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
121

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.