author | lana |
Thu, 02 Jun 2016 20:33:33 +0000 | |
changeset 38800 | 06f53fa48037 |
parent 37525 | 4f8679a3077d |
child 39884 | 9a543219d0bb |
permissions | -rw-r--r-- |
25859 | 1 |
# |
37525 | 2 |
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. |
25859 | 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 CopyCommon.gmk |
|
27 |
||
28 |
$(eval $(call IncludeCustomExtension, jdk, copy/Copy-java.base.gmk)) |
|
29 |
||
30 |
################################################################################ |
|
31 |
# |
|
32 |
# Copy exported header files to outputdir. |
|
33 |
# |
|
27565 | 34 |
TARGETS += \ |
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25859
diff
changeset
|
35 |
$(INCLUDE_DST_DIR)/jni.h \ |
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25859
diff
changeset
|
36 |
$(INCLUDE_DST_DIR)/jvmti.h \ |
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25859
diff
changeset
|
37 |
$(INCLUDE_DST_DIR)/jvmticmlr.h \ |
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25859
diff
changeset
|
38 |
$(INCLUDE_DST_DIR)/classfile_constants.h \ |
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25859
diff
changeset
|
39 |
$(INCLUDE_DST_OS_DIR)/jni_md.h \ |
25859 | 40 |
# |
41 |
||
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25859
diff
changeset
|
42 |
$(INCLUDE_DST_DIR)/%.h: $(JDK_TOPDIR)/src/java.base/share/native/include/%.h |
25859 | 43 |
$(call install-file) |
44 |
||
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25859
diff
changeset
|
45 |
$(INCLUDE_DST_OS_DIR)/%.h: \ |
25859 | 46 |
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include/%.h |
47 |
$(call install-file) |
|
48 |
||
49 |
################################################################################ |
|
50 |
||
51 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),) |
|
52 |
||
53 |
TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf |
|
54 |
||
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25859
diff
changeset
|
55 |
$(LIB_DST_DIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings |
25859 | 56 |
$(call install-file) |
57 |
||
27565 | 58 |
TARGETS += $(LIB_DST_DIR)/tzmappings |
25859 | 59 |
|
60 |
endif |
|
61 |
||
62 |
################################################################################ |
|
28984
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
63 |
# Copy the microsoft runtime libraries on windows |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
64 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
25859 | 65 |
|
66 |
# Chmod to avoid permission issues if bundles are unpacked on unix platforms. |
|
28984
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
67 |
define copy-and-chmod |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
68 |
$(install-file) |
25859 | 69 |
$(CHMOD) a+rx $@ |
28984
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
70 |
endef |
27565 | 71 |
|
28984
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
72 |
# Use separate macro calls in case the source files are not in the same |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
73 |
# directory. |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
74 |
$(eval $(call SetupCopyFiles,COPY_MSVCR, \ |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
75 |
DEST := $(LIB_DST_DIR), \ |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
76 |
FILES := $(MSVCR_DLL), \ |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
77 |
MACRO := copy-and-chmod)) |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
78 |
|
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
79 |
$(eval $(call SetupCopyFiles,COPY_MSVCP, \ |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
80 |
DEST := $(LIB_DST_DIR), \ |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
81 |
FILES := $(MSVCP_DLL), \ |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
82 |
MACRO := copy-and-chmod)) |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
83 |
|
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
84 |
TARGETS += $(COPY_MSVCR) $(COPY_MSVCP) |
25859 | 85 |
endif |
86 |
||
87 |
################################################################################ |
|
88 |
# |
|
89 |
# How to install jvm.cfg. |
|
90 |
# |
|
37525 | 91 |
ifeq ($(call check-jvm-variant, zero zeroshark), true) |
25859 | 92 |
JVMCFG_ARCH := zero |
93 |
else |
|
94 |
JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY) |
|
95 |
endif |
|
96 |
||
97 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
98 |
JVMCFG_SRC := $(JDK_TOPDIR)/src/java.base/macosx/conf/$(JVMCFG_ARCH)/jvm.cfg |
|
99 |
else |
|
27736
8c9bd4be4a86
8058631: Rename posix to unix in build system to match file name changes
ihse
parents:
27286
diff
changeset
|
100 |
JVMCFG_SRC := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/$(JVMCFG_ARCH)/jvm.cfg |
29718
d0e9a4ece867
8072740: move closed jvm.cfg files out of open repo
dholmes
parents:
28984
diff
changeset
|
101 |
# Allow override by ALT_JVMCFG_SRC if it exists |
37525 | 102 |
JVMCFG_SRC := $(if $(wildcard $(ALT_JVMCFG_SRC)),$(ALT_JVMCFG_SRC),$(JVMCFG_SRC)) |
25859 | 103 |
endif |
27565 | 104 |
JVMCFG_DIR := $(LIB_DST_DIR)$(OPENJDK_TARGET_CPU_LIBDIR) |
25859 | 105 |
JVMCFG := $(JVMCFG_DIR)/jvm.cfg |
106 |
||
107 |
# To do: should this also support -zeroshark? |
|
108 |
||
109 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) |
|
110 |
COPY_JVM_CFG_FILE := true |
|
111 |
else |
|
112 |
# On 32-bit machines we have three potential VMs: client, server and minimal. |
|
113 |
# Historically we usually have both client and server and so that is what the |
|
114 |
# committed jvm.cfg expects (including platform specific ergonomics switches |
|
115 |
# to decide whether to use client or server by default). So when we have anything |
|
116 |
# other than client and server we need to define a new jvm.cfg file. |
|
117 |
# The main problem is deciding whether to use aliases for the VMs that are not |
|
118 |
# present and the current position is that we add aliases for client and server, but |
|
119 |
# not for minimal. |
|
37525 | 120 |
CLIENT_AND_SERVER := $(call check-jvm-variant, client)+$(call check-jvm-variant, server) |
121 |
ifeq ($(CLIENT_AND_SERVER), true+true) |
|
25859 | 122 |
COPY_JVM_CFG_FILE := true |
123 |
else |
|
124 |
# For zero, the default jvm.cfg file is sufficient |
|
37525 | 125 |
ifeq ($(call check-jvm-variant, zero zeroshark), true) |
25859 | 126 |
COPY_JVM_CFG_FILE := true |
127 |
endif |
|
128 |
endif |
|
129 |
endif |
|
130 |
||
131 |
ifeq ($(COPY_JVM_CFG_FILE), true) |
|
132 |
$(JVMCFG): $(JVMCFG_SRC) |
|
133 |
$(call install-file) |
|
134 |
else |
|
135 |
$(JVMCFG): |
|
136 |
$(MKDIR) -p $(@D) |
|
137 |
$(RM) $(@) |
|
138 |
# Now check for other permutations |
|
37525 | 139 |
ifeq ($(call check-jvm-variant, server), true) |
25859 | 140 |
$(PRINTF) "-server KNOWN\n">>$(@) |
141 |
$(PRINTF) "-client ALIASED_TO -server\n">>$(@) |
|
37525 | 142 |
ifeq ($(call check-jvm-variant, minimal), true) |
25859 | 143 |
$(PRINTF) "-minimal KNOWN\n">>$(@) |
144 |
endif |
|
145 |
else |
|
37525 | 146 |
ifeq ($(call check-jvm-variant, client), true) |
25859 | 147 |
$(PRINTF) "-client KNOWN\n">>$(@) |
148 |
$(PRINTF) "-server ALIASED_TO -client\n">>$(@) |
|
37525 | 149 |
ifeq ($(call check-jvm-variant, minimal), true) |
25859 | 150 |
$(PRINTF) "-minimal KNOWN\n">>$(@) |
151 |
endif |
|
152 |
else |
|
37525 | 153 |
ifeq ($(call check-jvm-variant, minimal), true) |
25859 | 154 |
$(PRINTF) "-minimal KNOWN\n">>$(@) |
155 |
$(PRINTF) "-server ALIASED_TO -minimal\n">>$(@) |
|
156 |
$(PRINTF) "-client ALIASED_TO -minimal\n">>$(@) |
|
157 |
endif |
|
158 |
endif |
|
159 |
endif |
|
160 |
endif |
|
161 |
||
27565 | 162 |
TARGETS += $(JVMCFG) |
25859 | 163 |
|
164 |
################################################################################ |
|
165 |
||
166 |
POLICY_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/java.policy |
|
27565 | 167 |
POLICY_DST := $(CONF_DST_DIR)/security/java.policy |
25859 | 168 |
|
169 |
POLICY_SRC_LIST := |
|
170 |
||
171 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
172 |
POLICY_SRC_LIST += $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy |
|
173 |
endif |
|
174 |
||
36511 | 175 |
# Allow imported modules to modify the java.policy |
176 |
ifneq ($(IMPORT_MODULES_CONF), ) |
|
177 |
POLICY_SRC_LIST += $(wildcard $(IMPORT_MODULES_CONF)/java.base/security/java.policy.extra) |
|
178 |
endif |
|
179 |
||
25859 | 180 |
POLICY_SRC_LIST += $(POLICY_SRC) |
181 |
||
182 |
$(POLICY_DST): $(POLICY_SRC_LIST) |
|
183 |
$(MKDIR) -p $(@D) |
|
184 |
$(RM) $@ $@.tmp |
|
185 |
$(foreach f,$(POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;) |
|
186 |
$(MV) $@.tmp $@ |
|
187 |
||
27565 | 188 |
TARGETS += $(POLICY_DST) |
25859 | 189 |
|
190 |
################################################################################ |
|
191 |
||
192 |
ifeq ($(CACERTS_FILE), ) |
|
193 |
CACERTS_FILE := $(JDK_TOPDIR)/src/java.base/share/conf/security/cacerts |
|
194 |
endif |
|
35241 | 195 |
|
27565 | 196 |
CACERTS_DST := $(LIB_DST_DIR)/security/cacerts |
25859 | 197 |
|
198 |
$(CACERTS_DST): $(CACERTS_FILE) |
|
35241 | 199 |
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%, %, $@)) |
25859 | 200 |
$(call install-file) |
201 |
||
27565 | 202 |
TARGETS += $(CACERTS_DST) |
25859 | 203 |
|
204 |
################################################################################ |
|
205 |
||
35241 | 206 |
$(eval $(call SetupCopyFiles, COPY_NET_PROPERTIES, \ |
207 |
FILES := $(JDK_TOPDIR)/src/java.base/share/conf/net.properties, \ |
|
208 |
DEST := $(CONF_DST_DIR), \ |
|
209 |
)) |
|
25859 | 210 |
|
35241 | 211 |
TARGETS += $(COPY_NET_PROPERTIES) |
25859 | 212 |
|
213 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
35241 | 214 |
$(eval $(call SetupCopyFiles, COPY_SDP_CONF, \ |
215 |
FILES := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \ |
|
216 |
DEST := $(CONF_DST_DIR)/sdp, \ |
|
217 |
)) |
|
25859 | 218 |
|
35241 | 219 |
TARGETS += $(COPY_SDP_CONF) |
25859 | 220 |
endif |
221 |
||
222 |
################################################################################ |