annotate make/copy/Copy-java.base.gmk @ 10444:f08705540498

8054834: Modular Source Code Reviewed-by: alanb, chegar, ihse, mduigou Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, chris.hegarty@oracle.com, erik.joelsson@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, magnus.ihse.bursie@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, paul.sandoz@oracle.com
author chegar
date Sun, 17 Aug 2014 15:54:13 +0100
parents
children b8f27b54cc51
rev   line source
chegar@10444 1 #
chegar@10444 2 # Copyright (c) 2014, 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@10444 34 JAVA_BASE_HEADERS := \
chegar@10444 35 $(INCLUDEDIR)/jni.h \
chegar@10444 36 $(INCLUDEDIR)/jvmti.h \
chegar@10444 37 $(INCLUDEDIR)/jvmticmlr.h \
chegar@10444 38 $(INCLUDEDIR)/classfile_constants.h \
chegar@10444 39 $(OPENJDK_TARGET_OS_INCLUDE)/jni_md.h \
chegar@10444 40 #
chegar@10444 41
chegar@10444 42 $(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/java.base/share/native/include/%.h
chegar@10444 43 $(call install-file)
chegar@10444 44
chegar@10444 45 $(OPENJDK_TARGET_OS_INCLUDE)/%.h: \
chegar@10444 46 $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include/%.h
chegar@10444 47 $(call install-file)
chegar@10444 48
chegar@10444 49 ################################################################################
chegar@10444 50
chegar@10444 51 CALENDARS_SRC := $(JDK_TOPDIR)/src/java.base/share/conf
chegar@10444 52
chegar@10444 53 $(LIBDIR)/calendars.properties: $(CALENDARS_SRC)/calendars.properties
chegar@10444 54 $(call install-file)
chegar@10444 55
chegar@10444 56 BASE_CONF_FILES += $(LIBDIR)/calendars.properties
chegar@10444 57
chegar@10444 58 $(LIBDIR)/hijrah-config-umalqura.properties: $(CALENDARS_SRC)/hijrah-config-umalqura.properties
chegar@10444 59 $(MKDIR) -p $(@D)
chegar@10444 60 $(RM) $@
chegar@10444 61 $(CP) $< $@
chegar@10444 62
chegar@10444 63 BASE_CONF_FILES += $(LIBDIR)/hijrah-config-umalqura.properties
chegar@10444 64
chegar@10444 65 ################################################################################
chegar@10444 66
chegar@10444 67 ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),)
chegar@10444 68
chegar@10444 69 TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf
chegar@10444 70
chegar@10444 71 $(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
chegar@10444 72 $(call install-file)
chegar@10444 73
chegar@10444 74 BASE_CONF_FILES += $(LIBDIR)/tzmappings
chegar@10444 75
chegar@10444 76 endif
chegar@10444 77
chegar@10444 78 ################################################################################
chegar@10444 79 # Copy msvcrXX.dll on windows
chegar@10444 80
chegar@10444 81 ifeq ($(OPENJDK_TARGET_OS), windows)
chegar@10444 82 MSVCR_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCR_DLL))
chegar@10444 83 # Chmod to avoid permission issues if bundles are unpacked on unix platforms.
chegar@10444 84 $(MSVCR_TARGET): $(MSVCR_DLL)
chegar@10444 85 $(call install-file)
chegar@10444 86 $(CHMOD) a+rx $@
chegar@10444 87 endif
chegar@10444 88
chegar@10444 89 ################################################################################
chegar@10444 90 #
chegar@10444 91 # How to install jvm.cfg.
chegar@10444 92 #
chegar@10444 93 ifeq ($(JVM_VARIANT_ZERO), true)
chegar@10444 94 JVMCFG_ARCH := zero
chegar@10444 95 else
chegar@10444 96 JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
chegar@10444 97 endif
chegar@10444 98
chegar@10444 99 ifeq ($(OPENJDK_TARGET_OS), macosx)
chegar@10444 100 JVMCFG_SRC := $(JDK_TOPDIR)/src/java.base/macosx/conf/$(JVMCFG_ARCH)/jvm.cfg
chegar@10444 101 else
chegar@10444 102 JVMCFG_SRC := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/conf/$(JVMCFG_ARCH)/jvm.cfg
chegar@10444 103 endif
chegar@10444 104 JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
chegar@10444 105 JVMCFG := $(JVMCFG_DIR)/jvm.cfg
chegar@10444 106
chegar@10444 107 # To do: should this also support -zeroshark?
chegar@10444 108
chegar@10444 109 ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
chegar@10444 110 COPY_JVM_CFG_FILE := true
chegar@10444 111 else
chegar@10444 112 # On 32-bit machines we have three potential VMs: client, server and minimal.
chegar@10444 113 # Historically we usually have both client and server and so that is what the
chegar@10444 114 # committed jvm.cfg expects (including platform specific ergonomics switches
chegar@10444 115 # to decide whether to use client or server by default). So when we have anything
chegar@10444 116 # other than client and server we need to define a new jvm.cfg file.
chegar@10444 117 # The main problem is deciding whether to use aliases for the VMs that are not
chegar@10444 118 # present and the current position is that we add aliases for client and server, but
chegar@10444 119 # not for minimal.
chegar@10444 120 CLIENT_AND_SERVER := $(and $(findstring true, $(JVM_VARIANT_SERVER)), $(findstring true, $(JVM_VARIANT_CLIENT)))
chegar@10444 121 ifeq ($(CLIENT_AND_SERVER), true)
chegar@10444 122 COPY_JVM_CFG_FILE := true
chegar@10444 123 else
chegar@10444 124 # For zero, the default jvm.cfg file is sufficient
chegar@10444 125 ifeq ($(JVM_VARIANT_ZERO), true)
chegar@10444 126 COPY_JVM_CFG_FILE := true
chegar@10444 127 endif
chegar@10444 128 endif
chegar@10444 129 endif
chegar@10444 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
chegar@10444 139 ifeq ($(JVM_VARIANT_SERVER), true)
chegar@10444 140 $(PRINTF) "-server KNOWN\n">>$(@)
chegar@10444 141 $(PRINTF) "-client ALIASED_TO -server\n">>$(@)
chegar@10444 142 ifeq ($(JVM_VARIANT_MINIMAL1), true)
chegar@10444 143 $(PRINTF) "-minimal KNOWN\n">>$(@)
chegar@10444 144 endif
chegar@10444 145 else
chegar@10444 146 ifeq ($(JVM_VARIANT_CLIENT), true)
chegar@10444 147 $(PRINTF) "-client KNOWN\n">>$(@)
chegar@10444 148 $(PRINTF) "-server ALIASED_TO -client\n">>$(@)
chegar@10444 149 ifeq ($(JVM_VARIANT_MINIMAL1), true)
chegar@10444 150 $(PRINTF) "-minimal KNOWN\n">>$(@)
chegar@10444 151 endif
chegar@10444 152 else
chegar@10444 153 ifeq ($(JVM_VARIANT_MINIMAL1), 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@10444 162 BASE_CONF_FILES += $(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@10444 167 POLICY_DST := $(JDK_OUTPUTDIR)/lib/security/java.policy
chegar@10444 168
chegar@10444 169 POLICY_SRC_LIST :=
chegar@10444 170
chegar@10444 171 ifeq ($(OPENJDK_TARGET_OS), windows)
chegar@10444 172 POLICY_SRC_LIST += $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy
chegar@10444 173 endif
chegar@10444 174 ifndef OPENJDK
chegar@10444 175 ifeq ($(OPENJDK_TARGET_OS), windows)
chegar@10444 176 ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
chegar@10444 177 POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy-win32
chegar@10444 178 else
chegar@10444 179 POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy-win64
chegar@10444 180 endif
chegar@10444 181 endif
chegar@10444 182 ifeq ($(OPENJDK_TARGET_OS), solaris)
chegar@10444 183 POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy
chegar@10444 184 endif
chegar@10444 185 endif
chegar@10444 186
chegar@10444 187 POLICY_SRC_LIST += $(POLICY_SRC)
chegar@10444 188
chegar@10444 189 $(POLICY_DST): $(POLICY_SRC_LIST)
chegar@10444 190 $(MKDIR) -p $(@D)
chegar@10444 191 $(RM) $@ $@.tmp
chegar@10444 192 $(foreach f,$(POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
chegar@10444 193 $(MV) $@.tmp $@
chegar@10444 194
chegar@10444 195 BASE_CONF_FILES += $(POLICY_DST)
chegar@10444 196
chegar@10444 197 ################################################################################
chegar@10444 198
chegar@10444 199 ifeq ($(CACERTS_FILE), )
chegar@10444 200 CACERTS_FILE := $(JDK_TOPDIR)/src/java.base/share/conf/security/cacerts
chegar@10444 201 endif
chegar@10444 202 CACERTS_DST := $(JDK_OUTPUTDIR)/lib/security/cacerts
chegar@10444 203
chegar@10444 204 $(CACERTS_DST): $(CACERTS_FILE)
chegar@10444 205 $(call install-file)
chegar@10444 206
chegar@10444 207 BASE_CONF_FILES += $(CACERTS_DST)
chegar@10444 208
chegar@10444 209 ################################################################################
chegar@10444 210
chegar@10444 211 ifeq ($(OPENJDK_TARGET_OS), solaris)
chegar@10444 212
chegar@10444 213 SUNPKCS11_CFG_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/sunpkcs11-solaris.cfg
chegar@10444 214 SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
chegar@10444 215
chegar@10444 216 $(SUNPKCS11_CFG_DST): $(SUNPKCS11_CFG_SRC)
chegar@10444 217 $(call install-file)
chegar@10444 218
chegar@10444 219 BASE_CONF_FILES += $(SUNPKCS11_CFG_DST)
chegar@10444 220
chegar@10444 221 endif
chegar@10444 222
chegar@10444 223 ################################################################################
chegar@10444 224
chegar@10444 225 $(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/java.base/share/conf/net.properties
chegar@10444 226 $(ECHO) $(LOG_INFO) Copying $(@F)
chegar@10444 227 $(call install-file)
chegar@10444 228
chegar@10444 229 NET_CONF_FILES += $(JDK_OUTPUTDIR)/lib/net.properties
chegar@10444 230
chegar@10444 231 ifeq ($(OPENJDK_TARGET_OS), solaris)
chegar@10444 232 $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template: $(JDK_TOPDIR)/src/java.base/${OPENJDK_TARGET_OS_API_DIR}/conf/sdp/sdp.conf.template
chegar@10444 233 $(ECHO) $(LOG_INFO) Copying $(@F)
chegar@10444 234 $(call install-file)
chegar@10444 235
chegar@10444 236 NET_CONF_FILES += $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template
chegar@10444 237 endif
chegar@10444 238
chegar@10444 239 ################################################################################
chegar@10444 240
chegar@10444 241 java.base: $(BASE_CONF_FILES) $(NET_CONF_FILES) $(JAVA_BASE_HEADERS) $(MSVCR_TARGET)
chegar@10444 242
chegar@10444 243 all: java.base
chegar@10444 244
chegar@10444 245 .PHONY: all java.base