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. |
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 LEGAL_NOTICES_PATH := $(call PathList, $(LEGAL_NOTICES)) |
96 DEPS += $(call CacheFind, $(LEGAL_NOTICES)) |
96 DEPS += $(call FindFiles, $(LEGAL_NOTICES)) |
97 |
97 |
98 JMOD_FLAGS += --legal-notices $(LEGAL_NOTICES_PATH) |
98 JMOD_FLAGS += --legal-notices $(LEGAL_NOTICES_PATH) |
99 |
99 |
100 ifeq ($(filter-out jdk.incubator.%, $(MODULE)), ) |
100 ifeq ($(filter-out jdk.incubator.%, $(MODULE)), ) |
101 JMOD_FLAGS += --do-not-resolve-by-default |
101 JMOD_FLAGS += --do-not-resolve-by-default |
145 # Changes to the jmod tool itself should also trigger a rebuild of all jmods. |
145 # 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 |
146 # The variable JMOD_CMD could contain an environment variable assignment before |
147 # the actual command. Filter that out using wildcard before adding to DEPS. |
147 # the actual command. Filter that out using wildcard before adding to DEPS. |
148 DEPS += $(wildcard $(JMOD_CMD)) |
148 DEPS += $(wildcard $(JMOD_CMD)) |
149 ifeq ($(EXTERNAL_BUILDJDK), false) |
149 ifeq ($(EXTERNAL_BUILDJDK), false) |
150 DEPS += $(call CacheFind, $(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jmod) |
150 DEPS += $(call FindFiles, $(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jmod) |
151 endif |
151 endif |
152 |
152 |
153 # If creating interim versions of jmods, certain files need to be filtered out |
153 # If creating interim versions of jmods, certain files need to be filtered out |
154 # to avoid false incremental rebuilds. |
154 # to avoid false incremental rebuilds. |
155 ifeq ($(INTERIM_JMOD), true) |
155 ifeq ($(INTERIM_JMOD), true) |