< prev index next >

make/CopyImportModules.gmk

Print this page




  24 #
  25 
  26 # This makefile is called for every imported module to copy the non class
  27 # contents into the exploded jdk image.
  28 
  29 default: all
  30 
  31 include $(SPEC)
  32 include MakeBase.gmk
  33 
  34 LIBS_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_LIBS)))
  35 CMDS_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CMDS)))
  36 CONF_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CONF)))
  37 
  38 $(eval $(call FillCacheFind, $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR)))
  39 
  40 ifneq ($(LIBS_DIR), )
  41   ifeq ($(OPENJDK_TARGET_OS), windows)
  42     TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map
  43 
  44     $(eval $(call SetupCopyFiles,COPY_LIBS_TO_BIN, \
  45         SRC := $(LIBS_DIR), \
  46         DEST := $(JDK_OUTPUTDIR)/bin, \
  47         FILES := $(filter $(TO_BIN_FILTER), \
  48             $(call CacheFind, $(LIBS_DIR))) \
  49     ))
  50 
  51     $(eval $(call SetupCopyFiles,COPY_LIBS_TO_LIB, \
  52         SRC := $(LIBS_DIR), \
  53         DEST := $(JDK_OUTPUTDIR)/lib, \
  54         FILES := $(filter-out $(TO_BIN_FILTER), \
  55             $(call CacheFind, $(LIBS_DIR))) \
  56     ))
  57     TARGETS += $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB)
  58   else
  59     $(eval $(call SetupCopyFiles, COPY_LIBS, \
  60         SRC := $(LIBS_DIR), \
  61         DEST := $(JDK_OUTPUTDIR)/lib, \
  62         FILES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(LIBS_DIR))), \
  63     ))
  64 
  65     # Use relative links if the import dir is inside the OUTPUT_ROOT, otherwise
  66     # copy to avoid having automated systems following symlinks when deleting files,
  67     # or risk invalidating the build output from external changes.
  68     ifeq ($(filter $(OUTPUT_ROOT)/%, $(LIBS_DIR)), )
  69       LINK_MACRO := install-file
  70     else
  71       LINK_MACRO := link-file-relative




  24 #
  25 
  26 # This makefile is called for every imported module to copy the non class
  27 # contents into the exploded jdk image.
  28 
  29 default: all
  30 
  31 include $(SPEC)
  32 include MakeBase.gmk
  33 
  34 LIBS_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_LIBS)))
  35 CMDS_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CMDS)))
  36 CONF_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CONF)))
  37 
  38 $(eval $(call FillCacheFind, $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR)))
  39 
  40 ifneq ($(LIBS_DIR), )
  41   ifeq ($(OPENJDK_TARGET_OS), windows)
  42     TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map
  43 
  44     $(eval $(call SetupCopyFiles, COPY_LIBS_TO_BIN, \
  45         SRC := $(LIBS_DIR), \
  46         DEST := $(JDK_OUTPUTDIR)/bin, \
  47         FILES := $(filter $(TO_BIN_FILTER), \
  48             $(call CacheFind, $(LIBS_DIR))) \
  49     ))
  50 
  51     $(eval $(call SetupCopyFiles, COPY_LIBS_TO_LIB, \
  52         SRC := $(LIBS_DIR), \
  53         DEST := $(JDK_OUTPUTDIR)/lib, \
  54         FILES := $(filter-out $(TO_BIN_FILTER), \
  55             $(call CacheFind, $(LIBS_DIR))) \
  56     ))
  57     TARGETS += $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB)
  58   else
  59     $(eval $(call SetupCopyFiles, COPY_LIBS, \
  60         SRC := $(LIBS_DIR), \
  61         DEST := $(JDK_OUTPUTDIR)/lib, \
  62         FILES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(LIBS_DIR))), \
  63     ))
  64 
  65     # Use relative links if the import dir is inside the OUTPUT_ROOT, otherwise
  66     # copy to avoid having automated systems following symlinks when deleting files,
  67     # or risk invalidating the build output from external changes.
  68     ifeq ($(filter $(OUTPUT_ROOT)/%, $(LIBS_DIR)), )
  69       LINK_MACRO := install-file
  70     else
  71       LINK_MACRO := link-file-relative


< prev index next >