62 ifneq ($(CLASSES_DIR), ) |
62 ifneq ($(CLASSES_DIR), ) |
63 JMOD_FLAGS += --class-path $(CLASSES_DIR) |
63 JMOD_FLAGS += --class-path $(CLASSES_DIR) |
64 DEPS += $(call CacheFind, $(CLASSES_DIR)) |
64 DEPS += $(call CacheFind, $(CLASSES_DIR)) |
65 endif |
65 endif |
66 |
66 |
67 # Add dependencies on other jmod files |
67 # Add dependencies on other jmod files. Only java.base needs access to other |
68 DEPS += $(patsubst %, $(IMAGES_OUTPUTDIR)/jmods/%.jmod, \ |
68 # jmods. |
69 $(call FindDepsForModule, $(MODULE))) |
69 ifeq ($(MODULE), java.base) |
|
70 DEPS += $(patsubst %, $(IMAGES_OUTPUTDIR)/jmods/%.jmod, \ |
|
71 $(filter-out java.base, $(call FindAllModules))) |
|
72 |
|
73 # TODO: find modules that directly and indrectly on upgradeable modules |
|
74 EXCLUDE_HASH_MODULES := $(UPGRADEABLE_MODULES) \ |
|
75 java.se.ee \ |
|
76 jdk.rmic \ |
|
77 jdk.xml.bind \ |
|
78 jdk.xml.ws \ |
|
79 # |
|
80 |
|
81 EXCLUDE_PATTERN := $(strip $(subst $(SPACE),|,$(strip $(EXCLUDE_HASH_MODULES)))) |
|
82 |
|
83 JMOD_FLAGS += --modulepath $(IMAGES_OUTPUTDIR)/jmods \ |
|
84 --hash-modules '^(?!$(EXCLUDE_PATTERN))' |
|
85 endif |
70 |
86 |
71 # TODO: What about headers? |
87 # TODO: What about headers? |
72 # Create jmods in a temp dir and then move them into place to keep the |
88 # Create jmods in a temp dir and then move them into place to keep the |
73 # module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times. |
89 # module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times. |
74 $(IMAGES_OUTPUTDIR)/jmods/$(MODULE).jmod: $(DEPS) |
90 $(IMAGES_OUTPUTDIR)/jmods/$(MODULE).jmod: $(DEPS) |
78 $(JMOD) create \ |
94 $(JMOD) create \ |
79 --module-version $(VERSION_SHORT) \ |
95 --module-version $(VERSION_SHORT) \ |
80 --os-name $(REQUIRED_OS_NAME) \ |
96 --os-name $(REQUIRED_OS_NAME) \ |
81 --os-arch $(OPENJDK_TARGET_CPU_LEGACY) \ |
97 --os-arch $(OPENJDK_TARGET_CPU_LEGACY) \ |
82 --os-version $(REQUIRED_OS_VERSION) \ |
98 --os-version $(REQUIRED_OS_VERSION) \ |
83 --modulepath $(IMAGES_OUTPUTDIR)/jmods\ |
99 --modulepath $(IMAGES_OUTPUTDIR)/jmods\ |
84 --hash-dependencies '.*' \ |
|
85 --exclude '**{_the.*,*.diz,*.debuginfo,*.dSYM/**,*.pdb,*.map}' \ |
100 --exclude '**{_the.*,*.diz,*.debuginfo,*.dSYM/**,*.pdb,*.map}' \ |
86 $(JMOD_FLAGS) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) |
101 $(JMOD_FLAGS) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) |
87 $(MV) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) $@ |
102 $(MV) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) $@ |
88 |
103 |
89 TARGETS += $(IMAGES_OUTPUTDIR)/jmods/$(MODULE).jmod |
104 TARGETS += $(IMAGES_OUTPUTDIR)/jmods/$(MODULE).jmod |