annotate make/copy/Copy-java.base.gmk @ 17465:c1b052eebb2a

8139303: aarch32: add support for ARM aarch32 Summary: Initial port of template interpreter to aarch32 Reviewed-by: duke Contributed-by: joseph.joyce@linaro.org
author enevill
date Mon, 07 Dec 2015 21:26:25 +0000
parents 4696b1eea8e9
children 2f3b5fbdc74f
rev   line source
chegar@10444 1 #
ihse@16809 2 # Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
chegar@10444 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
chegar@10444 4 #
chegar@10444 5 # This code is free software; you can redistribute it and/or modify it
chegar@10444 6 # under the terms of the GNU General Public License version 2 only, as
chegar@10444 7 # published by the Free Software Foundation. Oracle designates this
chegar@10444 8 # particular file as subject to the "Classpath" exception as provided
chegar@10444 9 # by Oracle in the LICENSE file that accompanied this code.
chegar@10444 10 #
chegar@10444 11 # This code is distributed in the hope that it will be useful, but WITHOUT
chegar@10444 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
chegar@10444 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
chegar@10444 14 # version 2 for more details (a copy is included in the LICENSE file that
chegar@10444 15 # accompanied this code).
chegar@10444 16 #
chegar@10444 17 # You should have received a copy of the GNU General Public License version
chegar@10444 18 # 2 along with this work; if not, write to the Free Software Foundation,
chegar@10444 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
chegar@10444 20 #
chegar@10444 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
chegar@10444 22 # or visit www.oracle.com if you need additional information or have any
chegar@10444 23 # questions.
chegar@10444 24 #
chegar@10444 25
chegar@10444 26 include CopyCommon.gmk
chegar@10444 27
chegar@10444 28 $(eval $(call IncludeCustomExtension, jdk, copy/Copy-java.base.gmk))
chegar@10444 29
chegar@10444 30 ################################################################################
chegar@10444 31 #
chegar@10444 32 # Copy exported header files to outputdir.
chegar@10444 33 #
chegar@10967 34 TARGETS += \
erikj@10526 35 $(INCLUDE_DST_DIR)/jni.h \
erikj@10526 36 $(INCLUDE_DST_DIR)/jvmticmlr.h \
erikj@10526 37 $(INCLUDE_DST_DIR)/classfile_constants.h \
erikj@10526 38 $(INCLUDE_DST_OS_DIR)/jni_md.h \
chegar@10444 39 #
chegar@10444 40
erikj@10526 41 $(INCLUDE_DST_DIR)/%.h: $(JDK_TOPDIR)/src/java.base/share/native/include/%.h
chegar@10444 42 $(call install-file)
chegar@10444 43
erikj@10526 44 $(INCLUDE_DST_OS_DIR)/%.h: \
chegar@10444 45 $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include/%.h
chegar@10444 46 $(call install-file)
chegar@10444 47
chegar@10444 48 ################################################################################
chegar@10444 49
chegar@10444 50 ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),)
chegar@10444 51
chegar@10444 52 TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf
chegar@10444 53
erikj@10526 54 $(LIB_DST_DIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
chegar@10444 55 $(call install-file)
chegar@10444 56
chegar@10967 57 TARGETS += $(LIB_DST_DIR)/tzmappings
chegar@10444 58
chegar@10444 59 endif
chegar@10444 60
chegar@10444 61 ################################################################################
erikj@11422 62 # Copy the microsoft runtime libraries on windows
erikj@11422 63 ifeq ($(OPENJDK_TARGET_OS), windows)
chegar@10444 64
chegar@10444 65 # Chmod to avoid permission issues if bundles are unpacked on unix platforms.
erikj@11422 66 define copy-and-chmod
erikj@11422 67 $(install-file)
chegar@10444 68 $(CHMOD) a+rx $@
erikj@11422 69 endef
chegar@10967 70
erikj@11422 71 # Use separate macro calls in case the source files are not in the same
erikj@11422 72 # directory.
erikj@11422 73 $(eval $(call SetupCopyFiles,COPY_MSVCR, \
erikj@11422 74 DEST := $(LIB_DST_DIR), \
erikj@11422 75 FILES := $(MSVCR_DLL), \
erikj@11422 76 MACRO := copy-and-chmod))
erikj@11422 77
erikj@11422 78 $(eval $(call SetupCopyFiles,COPY_MSVCP, \
erikj@11422 79 DEST := $(LIB_DST_DIR), \
erikj@11422 80 FILES := $(MSVCP_DLL), \
erikj@11422 81 MACRO := copy-and-chmod))
erikj@11422 82
erikj@11422 83 TARGETS += $(COPY_MSVCR) $(COPY_MSVCP)
chegar@10444 84 endif
chegar@10444 85
chegar@10444 86 ################################################################################
chegar@10444 87 #
chegar@10444 88 # How to install jvm.cfg.
chegar@10444 89 #
erikj@14197 90 ifeq ($(call check-jvm-variant, zero zeroshark), true)
chegar@10444 91 JVMCFG_ARCH := zero
chegar@10444 92 else
chegar@10444 93 JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
chegar@10444 94 endif
chegar@10444 95
chegar@10444 96 ifeq ($(OPENJDK_TARGET_OS), macosx)
chegar@10444 97 JVMCFG_SRC := $(JDK_TOPDIR)/src/java.base/macosx/conf/$(JVMCFG_ARCH)/jvm.cfg
chegar@10444 98 else
ihse@10990 99 JVMCFG_SRC := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/$(JVMCFG_ARCH)/jvm.cfg
dholmes@11689 100 # Allow override by ALT_JVMCFG_SRC if it exists
erikj@14197 101 JVMCFG_SRC := $(if $(wildcard $(ALT_JVMCFG_SRC)),$(ALT_JVMCFG_SRC),$(JVMCFG_SRC))
chegar@10444 102 endif
erikj@16338 103 JVMCFG := $(LIB_DST_DIR)/jvm.cfg
chegar@10444 104
chegar@10444 105 # To do: should this also support -zeroshark?
chegar@10444 106
chegar@10444 107 ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
chegar@10444 108 COPY_JVM_CFG_FILE := true
chegar@10444 109 else
chegar@10444 110 # On 32-bit machines we have three potential VMs: client, server and minimal.
chegar@10444 111 # Historically we usually have both client and server and so that is what the
chegar@10444 112 # committed jvm.cfg expects (including platform specific ergonomics switches
chegar@10444 113 # to decide whether to use client or server by default). So when we have anything
chegar@10444 114 # other than client and server we need to define a new jvm.cfg file.
chegar@10444 115 # The main problem is deciding whether to use aliases for the VMs that are not
chegar@10444 116 # present and the current position is that we add aliases for client and server, but
chegar@10444 117 # not for minimal.
erikj@14197 118 CLIENT_AND_SERVER := $(call check-jvm-variant, client)+$(call check-jvm-variant, server)
erikj@14197 119 ifeq ($(CLIENT_AND_SERVER), true+true)
chegar@10444 120 COPY_JVM_CFG_FILE := true
chegar@10444 121 else
chegar@10444 122 # For zero, the default jvm.cfg file is sufficient
erikj@14197 123 ifeq ($(call check-jvm-variant, zero zeroshark), true)
chegar@10444 124 COPY_JVM_CFG_FILE := true
chegar@10444 125 endif
chegar@10444 126 endif
chegar@10444 127 endif
chegar@10444 128
enevill@17465 129 COPY_JVM_CFG_FILE := true
enevill@17465 130
chegar@10444 131 ifeq ($(COPY_JVM_CFG_FILE), true)
chegar@10444 132 $(JVMCFG): $(JVMCFG_SRC)
chegar@10444 133 $(call install-file)
chegar@10444 134 else
chegar@10444 135 $(JVMCFG):
chegar@10444 136 $(MKDIR) -p $(@D)
chegar@10444 137 $(RM) $(@)
chegar@10444 138 # Now check for other permutations
erikj@14197 139 ifeq ($(call check-jvm-variant, server), true)
chegar@10444 140 $(PRINTF) "-server KNOWN\n">>$(@)
chegar@10444 141 $(PRINTF) "-client ALIASED_TO -server\n">>$(@)
erikj@14197 142 ifeq ($(call check-jvm-variant, minimal), true)
chegar@10444 143 $(PRINTF) "-minimal KNOWN\n">>$(@)
chegar@10444 144 endif
chegar@10444 145 else
erikj@14197 146 ifeq ($(call check-jvm-variant, client), true)
chegar@10444 147 $(PRINTF) "-client KNOWN\n">>$(@)
chegar@10444 148 $(PRINTF) "-server ALIASED_TO -client\n">>$(@)
erikj@14197 149 ifeq ($(call check-jvm-variant, minimal), true)
chegar@10444 150 $(PRINTF) "-minimal KNOWN\n">>$(@)
chegar@10444 151 endif
chegar@10444 152 else
erikj@14197 153 ifeq ($(call check-jvm-variant, minimal), true)
chegar@10444 154 $(PRINTF) "-minimal KNOWN\n">>$(@)
chegar@10444 155 $(PRINTF) "-server ALIASED_TO -minimal\n">>$(@)
chegar@10444 156 $(PRINTF) "-client ALIASED_TO -minimal\n">>$(@)
chegar@10444 157 endif
chegar@10444 158 endif
chegar@10444 159 endif
chegar@10444 160 endif
chegar@10444 161
chegar@10967 162 TARGETS += $(JVMCFG)
chegar@10444 163
chegar@10444 164 ################################################################################
chegar@10444 165
chegar@10444 166 POLICY_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/java.policy
chegar@10967 167 POLICY_DST := $(CONF_DST_DIR)/security/java.policy
chegar@10444 168
mullan@15206 169 POLICY_SRC_LIST := $(POLICY_SRC)
chegar@10444 170
chegar@10444 171 $(POLICY_DST): $(POLICY_SRC_LIST)
chegar@10444 172 $(MKDIR) -p $(@D)
chegar@10444 173 $(RM) $@ $@.tmp
chegar@10444 174 $(foreach f,$(POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
chegar@10444 175 $(MV) $@.tmp $@
chegar@10444 176
chegar@10967 177 TARGETS += $(POLICY_DST)
chegar@10444 178
chegar@10444 179 ################################################################################
chegar@10444 180
mullan@15206 181 DEF_POLICY_SRC := $(JDK_TOPDIR)/src/java.base/share/lib/security/default.policy
mullan@15206 182 DEF_POLICY_DST := $(LIB_DST_DIR)/security/default.policy
mullan@15206 183
mullan@15206 184 DEF_POLICY_SRC_LIST := $(DEF_POLICY_SRC)
prr@16148 185 DEF_POLICY_SRC_LIST += $(CUSTOM_POLICY_SRC_LIST)
mullan@15206 186
mullan@15366 187 ifneq ($(filter $(OPENJDK_TARGET_OS), windows solaris), )
mullan@15206 188 DEF_POLICY_SRC_LIST += $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/lib/security/default.policy
mullan@15206 189 endif
mullan@15206 190
mullan@15206 191 # Allow imported modules to modify the java.policy
mullan@15206 192 ifneq ($(IMPORT_MODULES_CONF), )
mullan@15206 193 DEF_POLICY_SRC_LIST += $(wildcard $(IMPORT_MODULES_CONF)/java.base/security/java.policy.extra)
mullan@15206 194 endif
mullan@15206 195
mullan@15206 196 $(DEF_POLICY_DST): $(DEF_POLICY_SRC_LIST)
mullan@15206 197 $(MKDIR) -p $(@D)
mullan@15206 198 $(RM) $@ $@.tmp
mullan@15206 199 $(foreach f,$(DEF_POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
mullan@15206 200 $(MV) $@.tmp $@
mullan@15206 201
mullan@15206 202 TARGETS += $(DEF_POLICY_DST)
mullan@15206 203
mullan@15206 204 ################################################################################
mullan@15206 205
chegar@10444 206 ifeq ($(CACERTS_FILE), )
weijun@15325 207 CACERTS_FILE := $(JDK_TOPDIR)/src/java.base/share/lib/security/cacerts
chegar@10444 208 endif
erikj@13471 209
chegar@10967 210 CACERTS_DST := $(LIB_DST_DIR)/security/cacerts
chegar@10444 211
chegar@10444 212 $(CACERTS_DST): $(CACERTS_FILE)
erikj@13471 213 $(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%, %, $@))
chegar@10444 214 $(call install-file)
chegar@10444 215
chegar@10967 216 TARGETS += $(CACERTS_DST)
chegar@10444 217
chegar@10444 218 ################################################################################
chegar@10444 219
erikj@13471 220 $(eval $(call SetupCopyFiles, COPY_NET_PROPERTIES, \
erikj@13471 221 FILES := $(JDK_TOPDIR)/src/java.base/share/conf/net.properties, \
erikj@13471 222 DEST := $(CONF_DST_DIR), \
erikj@13471 223 ))
chegar@10444 224
erikj@13471 225 TARGETS += $(COPY_NET_PROPERTIES)
chegar@10444 226
chegar@10444 227 ifeq ($(OPENJDK_TARGET_OS), solaris)
erikj@13471 228 $(eval $(call SetupCopyFiles, COPY_SDP_CONF, \
erikj@13471 229 FILES := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \
erikj@13471 230 DEST := $(CONF_DST_DIR)/sdp, \
erikj@13471 231 ))
chegar@10444 232
erikj@13471 233 TARGETS += $(COPY_SDP_CONF)
chegar@10444 234 endif
chegar@10444 235
chegar@10444 236 ################################################################################
mchung@16255 237
mchung@16255 238 # JDK license and assembly exception files to be packaged in JMOD
mchung@16255 239
erikj@16873 240 # The license files may not be present if the source has been obtained using a
erikj@16873 241 # different license.
erikj@16873 242 JDK_LICENSE ?= $(wildcard $(TOPDIR)/LICENSE)
erikj@16873 243 JDK_NOTICE ?= $(wildcard $(TOPDIR)/ASSEMBLY_EXCEPTION)
erikj@17451 244 JDK_ADDITIONAL_LICENSE_INFO ?= $(wildcard $(TOPDIR)/ADDITIONAL_LICENSE_INFO)
mchung@16255 245
mchung@16255 246 $(eval $(call SetupCopyFiles, COPY_JDK_NOTICES, \
erikj@17451 247 FILES := $(JDK_LICENSE) $(JDK_NOTICE) $(JDK_ADDITIONAL_LICENSE_INFO), \
mchung@16255 248 DEST := $(LEGAL_DST_DIR), \
mchung@16255 249 FLATTEN := true, \
mchung@16255 250 ))
mchung@16255 251
mchung@16255 252 TARGETS += $(COPY_JDK_NOTICES)