< prev index next >

make/copy/Copy-java.base.gmk

Print this page




  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 include Modules.gmk
  28 include TextFileProcessing.gmk
  29 
  30 $(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
  31 
  32 ################################################################################
  33 
  34 ifeq ($(OPENJDK_TARGET_OS), aix)
  35 
  36   TZMAPPINGS_SRC := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf
  37 
  38   $(LIB_DST_DIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
  39         $(call install-file)
  40 
  41   TARGETS += $(LIB_DST_DIR)/tzmappings
  42 
  43 endif
  44 
  45 ################################################################################
  46 # Copy the microsoft runtime libraries on windows
  47 ifeq ($(OPENJDK_TARGET_OS), windows)
  48 
  49   # Chmod to avoid permission issues if bundles are unpacked on unix platforms.
  50   define copy-and-chmod
  51         $(install-file)
  52         $(CHMOD) a+rx $@
  53   endef
  54 
  55   # Use separate macro calls in case the source files are not in the same
  56   # directory.
  57   $(eval $(call SetupCopyFiles,COPY_MSVCR, \
  58       DEST := $(LIB_DST_DIR), \
  59       FILES := $(MSVCR_DLL), \
  60       MACRO := copy-and-chmod))
  61 
  62   $(eval $(call SetupCopyFiles,COPY_MSVCP, \
  63       DEST := $(LIB_DST_DIR), \
  64       FILES := $(MSVCP_DLL), \
  65       MACRO := copy-and-chmod))
  66 
  67   TARGETS += $(COPY_MSVCR) $(COPY_MSVCP)
  68 
  69   ifneq ($(UCRT_DLL_DIR), )
  70     $(eval $(call SetupCopyFiles, COPY_UCRT_DLLS, \
  71         DEST := $(LIB_DST_DIR), \
  72         SRC := $(UCRT_DLL_DIR), \
  73         FILES := $(wildcard $(UCRT_DLL_DIR)/*.dll), \
  74         MACRO := copy-and-chmod, \
  75     ))
  76 
  77     TARGETS += $(COPY_UCRT_DLLS)
  78   endif
  79 endif
  80 
  81 ################################################################################
  82 # In jvm.cfg, the first listed KNOWN variant is the default. On most build
  83 # configurations, that is the server variant.
  84 ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), windows-x86)
  85   DEFAULT_CFG_VARIANT ?= client
  86 endif
  87 DEFAULT_CFG_VARIANT ?= server
  88 
  89 # Any variant other than server, client or minimal is represented as server in
  90 # the cfg file.
  91 VALID_CFG_VARIANTS := server client minimal
  92 CFG_VARIANTS := $(filter $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)) \
  93     $(if $(filter-out $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)), server)
  94 
  95 # Change the order to put the default variant first if present.
  96 ORDERED_CFG_VARIANTS := \
  97     $(if $(filter $(DEFAULT_CFG_VARIANT), $(CFG_VARIANTS)), $(DEFAULT_CFG_VARIANT)) \
  98     $(filter-out $(DEFAULT_CFG_VARIANT), $(CFG_VARIANTS))
  99 
 100 JVMCFG := $(LIB_DST_DIR)/jvm.cfg
 101 
 102 define print-cfg-line
 103         $(call LogInfo, Adding -$1 $2 to jvm.cfg)
 104         $(PRINTF) -- "-$1 $2\n" >> $@ $(NEWLINE)


 126 POLICY_DST := $(CONF_DST_DIR)/security/java.policy
 127 
 128 POLICY_SRC_LIST := $(POLICY_SRC)
 129 
 130 $(POLICY_DST): $(POLICY_SRC_LIST)
 131         $(call MakeTargetDir)
 132         $(RM) $@ $@.tmp
 133         $(foreach f,$(POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
 134         $(MV) $@.tmp $@
 135 
 136 TARGETS += $(POLICY_DST)
 137 
 138 ################################################################################
 139 
 140 DEF_POLICY_SRC := $(TOPDIR)/src/java.base/share/lib/security/default.policy
 141 DEF_POLICY_DST := $(LIB_DST_DIR)/security/default.policy
 142 
 143 DEF_POLICY_SRC_LIST := $(DEF_POLICY_SRC)
 144 DEF_POLICY_SRC_LIST += $(CUSTOM_POLICY_SRC_LIST)
 145 
 146 ifneq ($(filter $(OPENJDK_TARGET_OS), windows solaris), )
 147   DEF_POLICY_SRC_LIST += $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/lib/security/default.policy
 148 endif
 149 
 150 # Allow imported modules to modify the java.policy
 151 ifneq ($(IMPORT_MODULES_CONF), )
 152   DEF_POLICY_SRC_LIST += $(wildcard $(IMPORT_MODULES_CONF)/java.base/security/java.policy.extra)
 153 endif
 154 
 155 $(DEF_POLICY_DST): $(DEF_POLICY_SRC_LIST)
 156         $(call MakeTargetDir)
 157         $(RM) $@ $@.tmp
 158         $(foreach f,$(DEF_POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
 159         $(MV) $@.tmp $@
 160 
 161 TARGETS += $(DEF_POLICY_DST)
 162 
 163 ################################################################################
 164 
 165 ifeq ($(CACERTS_FILE), )
 166   CACERTS_FILE := $(TOPDIR)/src/java.base/share/lib/security/cacerts
 167 endif
 168 
 169 CACERTS_DST := $(LIB_DST_DIR)/security/cacerts
 170 
 171 $(CACERTS_DST): $(CACERTS_FILE)
 172         $(call LogInfo, Copying $(patsubst $(OUTPUTDIR)/%, %, $@))
 173         $(call install-file)
 174 
 175 TARGETS += $(CACERTS_DST)
 176 
 177 ################################################################################
 178 
 179 $(eval $(call SetupCopyFiles, COPY_NET_PROPERTIES, \
 180     FILES := $(TOPDIR)/src/java.base/share/conf/net.properties, \
 181     DEST := $(CONF_DST_DIR), \
 182 ))
 183 
 184 TARGETS += $(COPY_NET_PROPERTIES)
 185 
 186 ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux), )
 187   $(eval $(call SetupCopyFiles, COPY_SDP_CONF, \
 188       FILES := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \
 189       DEST := $(CONF_DST_DIR)/sdp, \
 190   ))
 191 
 192   TARGETS += $(COPY_SDP_CONF)
 193 endif
 194 
 195 ################################################################################
 196 
 197 # JDK license and assembly exception files to be packaged in JMOD
 198 
 199 # The license files may not be present if the source has been obtained using a
 200 # different license.
 201 JDK_LICENSE ?= $(wildcard $(TOPDIR)/LICENSE)
 202 JDK_NOTICE  ?= $(wildcard $(TOPDIR)/ASSEMBLY_EXCEPTION)
 203 JDK_ADDITIONAL_LICENSE_INFO  ?= $(wildcard $(TOPDIR)/ADDITIONAL_LICENSE_INFO)
 204 
 205 $(eval $(call SetupCopyFiles, COPY_JDK_NOTICES, \
 206     FILES := $(JDK_LICENSE) $(JDK_NOTICE) $(JDK_ADDITIONAL_LICENSE_INFO), \




  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 include Modules.gmk
  28 include TextFileProcessing.gmk
  29 
  30 $(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
  31 
  32 ################################################################################
  33 
  34 ifeq ($(call isTargetOs, aix), true)
  35 
  36   TZMAPPINGS_SRC := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf
  37 
  38   $(LIB_DST_DIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
  39         $(call install-file)
  40 
  41   TARGETS += $(LIB_DST_DIR)/tzmappings
  42 
  43 endif
  44 
  45 ################################################################################
  46 # Copy the microsoft runtime libraries on windows
  47 ifeq ($(call isTargetOs, windows), true)
  48 
  49   # Chmod to avoid permission issues if bundles are unpacked on unix platforms.
  50   define copy-and-chmod
  51         $(install-file)
  52         $(CHMOD) a+rx $@
  53   endef
  54 
  55   # Use separate macro calls in case the source files are not in the same
  56   # directory.
  57   $(eval $(call SetupCopyFiles,COPY_MSVCR, \
  58       DEST := $(LIB_DST_DIR), \
  59       FILES := $(MSVCR_DLL), \
  60       MACRO := copy-and-chmod))
  61 
  62   $(eval $(call SetupCopyFiles,COPY_MSVCP, \
  63       DEST := $(LIB_DST_DIR), \
  64       FILES := $(MSVCP_DLL), \
  65       MACRO := copy-and-chmod))
  66 
  67   TARGETS += $(COPY_MSVCR) $(COPY_MSVCP)
  68 
  69   ifneq ($(UCRT_DLL_DIR), )
  70     $(eval $(call SetupCopyFiles, COPY_UCRT_DLLS, \
  71         DEST := $(LIB_DST_DIR), \
  72         SRC := $(UCRT_DLL_DIR), \
  73         FILES := $(wildcard $(UCRT_DLL_DIR)/*.dll), \
  74         MACRO := copy-and-chmod, \
  75     ))
  76 
  77     TARGETS += $(COPY_UCRT_DLLS)
  78   endif
  79 endif
  80 
  81 ################################################################################
  82 # In jvm.cfg, the first listed KNOWN variant is the default. On most build
  83 # configurations, that is the server variant.
  84 ifeq ($(call isTargetOs, windows)+$(call isTargetCpu, x86), true+true)
  85   DEFAULT_CFG_VARIANT ?= client
  86 endif
  87 DEFAULT_CFG_VARIANT ?= server
  88 
  89 # Any variant other than server, client or minimal is represented as server in
  90 # the cfg file.
  91 VALID_CFG_VARIANTS := server client minimal
  92 CFG_VARIANTS := $(filter $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)) \
  93     $(if $(filter-out $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)), server)
  94 
  95 # Change the order to put the default variant first if present.
  96 ORDERED_CFG_VARIANTS := \
  97     $(if $(filter $(DEFAULT_CFG_VARIANT), $(CFG_VARIANTS)), $(DEFAULT_CFG_VARIANT)) \
  98     $(filter-out $(DEFAULT_CFG_VARIANT), $(CFG_VARIANTS))
  99 
 100 JVMCFG := $(LIB_DST_DIR)/jvm.cfg
 101 
 102 define print-cfg-line
 103         $(call LogInfo, Adding -$1 $2 to jvm.cfg)
 104         $(PRINTF) -- "-$1 $2\n" >> $@ $(NEWLINE)


 126 POLICY_DST := $(CONF_DST_DIR)/security/java.policy
 127 
 128 POLICY_SRC_LIST := $(POLICY_SRC)
 129 
 130 $(POLICY_DST): $(POLICY_SRC_LIST)
 131         $(call MakeTargetDir)
 132         $(RM) $@ $@.tmp
 133         $(foreach f,$(POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
 134         $(MV) $@.tmp $@
 135 
 136 TARGETS += $(POLICY_DST)
 137 
 138 ################################################################################
 139 
 140 DEF_POLICY_SRC := $(TOPDIR)/src/java.base/share/lib/security/default.policy
 141 DEF_POLICY_DST := $(LIB_DST_DIR)/security/default.policy
 142 
 143 DEF_POLICY_SRC_LIST := $(DEF_POLICY_SRC)
 144 DEF_POLICY_SRC_LIST += $(CUSTOM_POLICY_SRC_LIST)
 145 
 146 ifeq ($(call isTargetOs, windows solaris), true)
 147   DEF_POLICY_SRC_LIST += $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/lib/security/default.policy
 148 endif
 149 
 150 # Allow imported modules to modify the java.policy
 151 ifneq ($(IMPORT_MODULES_CONF), )
 152   DEF_POLICY_SRC_LIST += $(wildcard $(IMPORT_MODULES_CONF)/java.base/security/java.policy.extra)
 153 endif
 154 
 155 $(DEF_POLICY_DST): $(DEF_POLICY_SRC_LIST)
 156         $(call MakeTargetDir)
 157         $(RM) $@ $@.tmp
 158         $(foreach f,$(DEF_POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
 159         $(MV) $@.tmp $@
 160 
 161 TARGETS += $(DEF_POLICY_DST)
 162 
 163 ################################################################################
 164 
 165 ifeq ($(CACERTS_FILE), )
 166   CACERTS_FILE := $(TOPDIR)/src/java.base/share/lib/security/cacerts
 167 endif
 168 
 169 CACERTS_DST := $(LIB_DST_DIR)/security/cacerts
 170 
 171 $(CACERTS_DST): $(CACERTS_FILE)
 172         $(call LogInfo, Copying $(patsubst $(OUTPUTDIR)/%, %, $@))
 173         $(call install-file)
 174 
 175 TARGETS += $(CACERTS_DST)
 176 
 177 ################################################################################
 178 
 179 $(eval $(call SetupCopyFiles, COPY_NET_PROPERTIES, \
 180     FILES := $(TOPDIR)/src/java.base/share/conf/net.properties, \
 181     DEST := $(CONF_DST_DIR), \
 182 ))
 183 
 184 TARGETS += $(COPY_NET_PROPERTIES)
 185 
 186 ifeq ($(call isTargetOs, solaris linux), true)
 187   $(eval $(call SetupCopyFiles, COPY_SDP_CONF, \
 188       FILES := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \
 189       DEST := $(CONF_DST_DIR)/sdp, \
 190   ))
 191 
 192   TARGETS += $(COPY_SDP_CONF)
 193 endif
 194 
 195 ################################################################################
 196 
 197 # JDK license and assembly exception files to be packaged in JMOD
 198 
 199 # The license files may not be present if the source has been obtained using a
 200 # different license.
 201 JDK_LICENSE ?= $(wildcard $(TOPDIR)/LICENSE)
 202 JDK_NOTICE  ?= $(wildcard $(TOPDIR)/ASSEMBLY_EXCEPTION)
 203 JDK_ADDITIONAL_LICENSE_INFO  ?= $(wildcard $(TOPDIR)/ADDITIONAL_LICENSE_INFO)
 204 
 205 $(eval $(call SetupCopyFiles, COPY_JDK_NOTICES, \
 206     FILES := $(JDK_LICENSE) $(JDK_NOTICE) $(JDK_ADDITIONAL_LICENSE_INFO), \


< prev index next >