60 ifneq ($(CONF_DIR), ) 61 JMOD_FLAGS += --config $(CONF_DIR) 62 DEPS += $(call CacheFind, $(CONF_DIR)) 63 endif 64 ifneq ($(CLASSES_DIR), ) 65 JMOD_FLAGS += --class-path $(CLASSES_DIR) 66 DEPS += $(call CacheFind, $(CLASSES_DIR)) 67 endif 68 69 # Add dependencies on other jmod files. Only java.base needs access to other 70 # jmods. 71 ifeq ($(MODULE), java.base) 72 ALL_UPGRADEABLE_MODULES = $(call FindAllUpgradeableModules) 73 # When creating a BUILDJDK, we don't need to add hashes to java.base 74 ifneq ($(CREATING_BUILDJDK), true) 75 DEPS += $(patsubst %, $(JMODS_DIR)/%.jmod, \ 76 $(filter-out java.base $(ALL_UPGRADEABLE_MODULES), $(call FindAllModules))) 77 78 EXCLUDE_PATTERN := $(strip $(subst $(SPACE),|,$(strip $(ALL_UPGRADEABLE_MODULES)))) 79 80 JMOD_FLAGS += --modulepath $(JMODS_DIR) \ 81 --hash-modules '^(?!$(EXCLUDE_PATTERN))' 82 endif 83 endif 84 85 # Changes to the jmod tool itself should also trigger a rebuild of all jmods. 86 # The variable JMOD_CMD could contain an environment variable assignment before 87 # the actual command. Filter that out using wildcard before adding to DEPS. 88 DEPS += $(wildcard $(JMOD_CMD)) 89 ifeq ($(EXTERNAL_BUILDJDK), false) 90 DEPS += $(call CacheFind, $(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jmod) 91 endif 92 93 # TODO: What about headers? 94 # Create jmods in a temp dir and then move them into place to keep the 95 # module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times. 96 $(JMODS_DIR)/$(MODULE).jmod: $(DEPS) 97 $(call LogWarn, Creating $(patsubst $(OUTPUT_ROOT)/%, %, $@)) 98 $(call MakeDir, $(@D) $(SUPPORT_OUTPUTDIR)/jmods) 99 $(RM) $@ $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) 100 $(JMOD) create \ 101 --module-version $(VERSION_SHORT) \ 102 --os-name $(REQUIRED_OS_NAME) \ 103 --os-arch $(OPENJDK_TARGET_CPU_LEGACY) \ 104 --os-version $(REQUIRED_OS_VERSION) \ 105 --modulepath $(JMODS_DIR) \ 106 --exclude '**{_the.*,*.diz,*.debuginfo,*.dSYM/**,*.pdb,*.map}' \ 107 $(JMOD_FLAGS) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) 108 $(MV) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) $@ 109 110 TARGETS += $(IMAGES_OUTPUTDIR)/jmods/$(MODULE).jmod 111 112 ################################################################################ 113 114 all: $(TARGETS) 115 116 ################################################################################ | 60 ifneq ($(CONF_DIR), ) 61 JMOD_FLAGS += --config $(CONF_DIR) 62 DEPS += $(call CacheFind, $(CONF_DIR)) 63 endif 64 ifneq ($(CLASSES_DIR), ) 65 JMOD_FLAGS += --class-path $(CLASSES_DIR) 66 DEPS += $(call CacheFind, $(CLASSES_DIR)) 67 endif 68 69 # Add dependencies on other jmod files. Only java.base needs access to other 70 # jmods. 71 ifeq ($(MODULE), java.base) 72 ALL_UPGRADEABLE_MODULES = $(call FindAllUpgradeableModules) 73 # When creating a BUILDJDK, we don't need to add hashes to java.base 74 ifneq ($(CREATING_BUILDJDK), true) 75 DEPS += $(patsubst %, $(JMODS_DIR)/%.jmod, \ 76 $(filter-out java.base $(ALL_UPGRADEABLE_MODULES), $(call FindAllModules))) 77 78 EXCLUDE_PATTERN := $(strip $(subst $(SPACE),|,$(strip $(ALL_UPGRADEABLE_MODULES)))) 79 80 JMOD_FLAGS += --module-path $(JMODS_DIR) \ 81 --hash-modules '^(?!$(EXCLUDE_PATTERN))' 82 endif 83 endif 84 85 # Changes to the jmod tool itself should also trigger a rebuild of all jmods. 86 # The variable JMOD_CMD could contain an environment variable assignment before 87 # the actual command. Filter that out using wildcard before adding to DEPS. 88 DEPS += $(wildcard $(JMOD_CMD)) 89 ifeq ($(EXTERNAL_BUILDJDK), false) 90 DEPS += $(call CacheFind, $(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jmod) 91 endif 92 93 # TODO: What about headers? 94 # Create jmods in a temp dir and then move them into place to keep the 95 # module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times. 96 $(JMODS_DIR)/$(MODULE).jmod: $(DEPS) 97 $(call LogWarn, Creating $(patsubst $(OUTPUT_ROOT)/%, %, $@)) 98 $(call MakeDir, $(@D) $(SUPPORT_OUTPUTDIR)/jmods) 99 $(RM) $@ $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) 100 $(JMOD) create \ 101 --module-version $(VERSION_SHORT) \ 102 --os-name $(REQUIRED_OS_NAME) \ 103 --os-arch $(OPENJDK_TARGET_CPU_LEGACY) \ 104 --os-version $(REQUIRED_OS_VERSION) \ 105 --module-path $(JMODS_DIR) \ 106 --exclude '**{_the.*,*.diz,*.debuginfo,*.dSYM/**,*.pdb,*.map}' \ 107 $(JMOD_FLAGS) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) 108 $(MV) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) $@ 109 110 TARGETS += $(IMAGES_OUTPUTDIR)/jmods/$(MODULE).jmod 111 112 ################################################################################ 113 114 all: $(TARGETS) 115 116 ################################################################################ |