< prev index next >

make/copy/Copy-java.base.gmk

Print this page

        

@@ -58,20 +58,32 @@
   TARGETS += $(LIB_DST_DIR)/tzmappings
 
 endif
 
 ################################################################################
-# Copy msvcrXX.dll on windows
-
+# Copy the microsoft runtime libraries on windows
 ifeq ($(OPENJDK_TARGET_OS), windows)
-  MSVCR_TARGET := $(LIB_DST_DIR)/$(notdir $(MSVCR_DLL))
+
   # Chmod to avoid permission issues if bundles are unpacked on unix platforms.
-  $(MSVCR_TARGET): $(MSVCR_DLL)
-        $(call install-file)
+  define copy-and-chmod
+        $(install-file)
         $(CHMOD) a+rx $@
+  endef
+
+  # Use separate macro calls in case the source files are not in the same
+  # directory.
+  $(eval $(call SetupCopyFiles,COPY_MSVCR, \
+      DEST := $(LIB_DST_DIR), \
+      FILES := $(MSVCR_DLL), \
+      MACRO := copy-and-chmod))
+
+  $(eval $(call SetupCopyFiles,COPY_MSVCP, \
+      DEST := $(LIB_DST_DIR), \
+      FILES := $(MSVCP_DLL), \
+      MACRO := copy-and-chmod))
 
-  TARGETS += $(MSVCR_TARGET)
+  TARGETS += $(COPY_MSVCR) $(COPY_MSVCP)
 endif
 
 ################################################################################
 #
 # How to install jvm.cfg.
< prev index next >