make/CreateJmods.gmk
branchihse-setupexecute-branch
changeset 58834 f78e7ce060b0
parent 57230 b3b5ec7737f4
parent 58517 252e7f4c4d92
equal deleted inserted replaced
58833:ed9ef56bc7d5 58834:f78e7ce060b0
    51 INCLUDE_HEADERS_DIR ?= $(firstword $(wildcard $(addsuffix /$(MODULE), \
    51 INCLUDE_HEADERS_DIR ?= $(firstword $(wildcard $(addsuffix /$(MODULE), \
    52     $(SUPPORT_OUTPUTDIR)/modules_include $(IMPORT_MODULES_INCLUDE_HEADERS))))
    52     $(SUPPORT_OUTPUTDIR)/modules_include $(IMPORT_MODULES_INCLUDE_HEADERS))))
    53 MAN_DIR ?= $(firstword $(wildcard $(addsuffix /$(MODULE), \
    53 MAN_DIR ?= $(firstword $(wildcard $(addsuffix /$(MODULE), \
    54     $(SUPPORT_OUTPUTDIR)/modules_man $(IMPORT_MODULES_MAN))))
    54     $(SUPPORT_OUTPUTDIR)/modules_man $(IMPORT_MODULES_MAN))))
    55 
    55 
    56 $(eval $(call FillCacheFind, \
    56 $(call FillFindCache, \
    57     $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR) $(CLASSES_DIR) \
    57     $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR) $(CLASSES_DIR) \
    58 ))
    58 )
    59 
    59 
    60 ifneq ($(LIBS_DIR), )
    60 ifneq ($(LIBS_DIR), )
    61   JMOD_FLAGS += --libs $(LIBS_DIR)
    61   JMOD_FLAGS += --libs $(LIBS_DIR)
    62   DEPS += $(call CacheFind, $(LIBS_DIR))
    62   DEPS += $(call FindFiles, $(LIBS_DIR))
    63 endif
    63 endif
    64 ifneq ($(CMDS_DIR), )
    64 ifneq ($(CMDS_DIR), )
    65   JMOD_FLAGS += --cmds $(CMDS_DIR)
    65   JMOD_FLAGS += --cmds $(CMDS_DIR)
    66   DEPS += $(call CacheFind, $(CMDS_DIR))
    66   DEPS += $(call FindFiles, $(CMDS_DIR))
    67 endif
    67 endif
    68 ifneq ($(CONF_DIR), )
    68 ifneq ($(CONF_DIR), )
    69   JMOD_FLAGS += --config $(CONF_DIR)
    69   JMOD_FLAGS += --config $(CONF_DIR)
    70   DEPS += $(call CacheFind, $(CONF_DIR))
    70   DEPS += $(call FindFiles, $(CONF_DIR))
    71 endif
    71 endif
    72 ifneq ($(CLASSES_DIR), )
    72 ifneq ($(CLASSES_DIR), )
    73   JMOD_FLAGS += --class-path $(CLASSES_DIR)
    73   JMOD_FLAGS += --class-path $(CLASSES_DIR)
    74   DEPS += $(call CacheFind, $(CLASSES_DIR))
    74   DEPS += $(call FindFiles, $(CLASSES_DIR))
    75 endif
    75 endif
    76 ifneq ($(INCLUDE_HEADERS_DIR), )
    76 ifneq ($(INCLUDE_HEADERS_DIR), )
    77   JMOD_FLAGS += --header-files $(INCLUDE_HEADERS_DIR)
    77   JMOD_FLAGS += --header-files $(INCLUDE_HEADERS_DIR)
    78   DEPS += $(call CacheFind, $(INCLUDE_HEADERS_DIR))
    78   DEPS += $(call FindFiles, $(INCLUDE_HEADERS_DIR))
    79 endif
    79 endif
    80 ifneq ($(MAN_DIR), )
    80 ifneq ($(MAN_DIR), )
    81   JMOD_FLAGS += --man-pages $(MAN_DIR)
    81   JMOD_FLAGS += --man-pages $(MAN_DIR)
    82   DEPS += $(call CacheFind, $(MAN_DIR))
    82   DEPS += $(call FindFiles, $(MAN_DIR))
    83 endif
    83 endif
    84 
    84 
    85 # If a specific modules_legal dir exists for this module, only pick up files
    85 # If a specific modules_legal dir exists for this module, only pick up files
    86 # from there. These files were explicitly filtered or modified in <module>-copy
    86 # from there. These files were explicitly filtered or modified in <module>-copy
    87 # targets. For the rest, just pick up everything from the source legal dirs.
    87 # targets. For the rest, just pick up everything from the source legal dirs.
    88 LEGAL_NOTICES := \
    88 LEGAL_NOTICES := \
    89     $(SUPPORT_OUTPUTDIR)/modules_legal/common \
    89     $(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/common) \
    90     $(if $(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)), \
    90     $(if $(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)), \
    91       $(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)), \
    91       $(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)), \
    92       $(call FindModuleLegalSrcDirs, $(MODULE)) \
    92       $(call FindModuleLegalSrcDirs, $(MODULE)) \
    93     )
    93     )
    94 
    94 
    95 LEGAL_NOTICES_PATH := $(call PathList, $(LEGAL_NOTICES))
    95 ifneq ($(strip $(LEGAL_NOTICES)), )
    96 DEPS += $(call CacheFind, $(LEGAL_NOTICES))
    96   LEGAL_NOTICES_PATH := $(call PathList, $(LEGAL_NOTICES))
       
    97   DEPS += $(call FindFiles, $(LEGAL_NOTICES))
    97 
    98 
    98 JMOD_FLAGS += --legal-notices $(LEGAL_NOTICES_PATH)
    99   JMOD_FLAGS += --legal-notices $(LEGAL_NOTICES_PATH)
       
   100 endif
    99 
   101 
   100 ifeq ($(filter-out jdk.incubator.%, $(MODULE)), )
   102 ifeq ($(filter-out jdk.incubator.%, $(MODULE)), )
   101   JMOD_FLAGS += --do-not-resolve-by-default
   103   JMOD_FLAGS += --do-not-resolve-by-default
   102   JMOD_FLAGS += --warn-if-resolved=incubating
   104   JMOD_FLAGS += --warn-if-resolved=incubating
   103 endif
   105 endif
   145 # Changes to the jmod tool itself should also trigger a rebuild of all jmods.
   147 # Changes to the jmod tool itself should also trigger a rebuild of all jmods.
   146 # The variable JMOD_CMD could contain an environment variable assignment before
   148 # The variable JMOD_CMD could contain an environment variable assignment before
   147 # the actual command. Filter that out using wildcard before adding to DEPS.
   149 # the actual command. Filter that out using wildcard before adding to DEPS.
   148 DEPS += $(wildcard $(JMOD_CMD))
   150 DEPS += $(wildcard $(JMOD_CMD))
   149 ifeq ($(EXTERNAL_BUILDJDK), false)
   151 ifeq ($(EXTERNAL_BUILDJDK), false)
   150   DEPS += $(call CacheFind, $(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jmod)
   152   DEPS += $(call FindFiles, $(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jmod)
   151 endif
   153 endif
   152 
   154 
   153 # If creating interim versions of jmods, certain files need to be filtered out
   155 # If creating interim versions of jmods, certain files need to be filtered out
   154 # to avoid false incremental rebuilds.
   156 # to avoid false incremental rebuilds.
   155 ifeq ($(INTERIM_JMOD), true)
   157 ifeq ($(INTERIM_JMOD), true)