78 # 3. Modularize the JDK. It creates one directory for each module
79 # (<outputdir>/modules/<module>) based on the output files
80 # from (1) and also creates a jigsaw module library.
81 #
82 # a. Run Modularizer tool to copy files listed in $m.classlist and
83 # $m.resources to <outputdir>/modules/$m/classes and
84 # <outputdir>/modules/$m/resources respectively.
85 #
86 # For incremental build, Modularizer tool will only copy files
87 # that are modified since the last run (by comparing the timestamp
88 # between the source and destination).
89 #
90 # b. copy all non-class files from its members (such as bin, lib, include)
91 # to <outputdir>/modules/$m.
92 #
93 # modules.list lists the modules to be created for the modules
94 # build and its members.
95 #
96 # c. Install each module in the jigsaw module library
97 #
98 ORB_IDL=$(MODULEPATH_DIR)/$(IDLJ_MODULE)/lib/orb.idl
99 IR_IDL=$(MODULEPATH_DIR)/$(IDLJ_MODULE)/lib/ir.idl
100
101
102 all: $(MODULES_LIST) module-info-classes $(ORB_IDL) $(IR_IDL) modularize
103
104
105 # clean modules build
106 define clean-build
107 $(RM) -rf $(JIGSAW_MODULE_LIB)
108 $(RM) -rf $(MODULEINFO_DIR)
109 $(RM) -rf $(MODULEPATH_DIR)
110 $(RM) -rf $(MODULES_TEMPDIR)
111 $(ECHO) "" > $(MODULES_UPDATE_MARKER)
112 endef
113
114 # Do a clean modules build if any of the input modules.config
115 # files is modified.
116 $(MODULES_LIST):: $(MODULES_CONFIG) $(MODULES_GROUP) \
117 $(MODULES_PROPERTIES) \
118 $(DEP_CONFIG) $(OPTIONAL_DEP_CONFIG) \
119 $(CLASSANALYZER_JAR_FILE)
246 # Install the module if module-info.class is updated
247 # or <module>.summary is updated
248 #
249 $(JIGSAW_MODULE_LIB)/%/$(MODULE_VERSION)/info: $(MODULEPATH_DIR)/%/classes/module-info.class \
250 $(MODULE_CLASSLIST_DIR)/%.summary
251 @if [ $* = "other" ] ; then \
252 $(ECHO) "ERROR: Check module \"other\". modules.config possibly requires update." ; \
253 exit 1; \
254 fi
255 @$(call copy-module-content,$*)
256 @$(call install-module,$*)
257 @$(java-vm-cleanup)
258
259 #
260 # Temporary workaround:
261 # Copy orb.idl and ir.idl to idlj module
262 # The *.idl files are imported during the build
263 #
264 # A better fix would be in make/common/internal/ImportComponents.gmk
265 # to install imported files in a module
266 $(MODULEPATH_DIR)/$(IDLJ_MODULE)/lib/%.idl : $(LIBDIR)/%.idl
267 $(install-non-module-file)
268
269 clean clobber:: classes.clean
270 $(clean-build)
271
272
273 # '<module-name>' development target to update the module content
274 # of a specific module in the jigsaw module library in the outputdir
275 # and also in jdk-module-library if exists.
276 # $ make jdk.boot
277 #
278 # TODO: modify Modularizer to take a parameter to only copy
279 # classes and resources for one module
280 %:
281 @if [ `$(GREP) -c "^$@ " $(MODULES_LIST)` != "1" ] ; then \
282 $(ECHO) 'Invalid target: "$@" expected a valid module name' ; \
283 exit 1; \
284 fi
285 $(call patch-module-classes,$@)
286 $(call install-module,$@)
|
78 # 3. Modularize the JDK. It creates one directory for each module
79 # (<outputdir>/modules/<module>) based on the output files
80 # from (1) and also creates a jigsaw module library.
81 #
82 # a. Run Modularizer tool to copy files listed in $m.classlist and
83 # $m.resources to <outputdir>/modules/$m/classes and
84 # <outputdir>/modules/$m/resources respectively.
85 #
86 # For incremental build, Modularizer tool will only copy files
87 # that are modified since the last run (by comparing the timestamp
88 # between the source and destination).
89 #
90 # b. copy all non-class files from its members (such as bin, lib, include)
91 # to <outputdir>/modules/$m.
92 #
93 # modules.list lists the modules to be created for the modules
94 # build and its members.
95 #
96 # c. Install each module in the jigsaw module library
97 #
98 ORB_IDL=$(MODULEPATH_DIR)/$(IDLJ_MODULE)/etc/orb.idl
99 IR_IDL=$(MODULEPATH_DIR)/$(IDLJ_MODULE)/etc/ir.idl
100
101
102 all: $(MODULES_LIST) module-info-classes $(ORB_IDL) $(IR_IDL) modularize
103
104
105 # clean modules build
106 define clean-build
107 $(RM) -rf $(JIGSAW_MODULE_LIB)
108 $(RM) -rf $(MODULEINFO_DIR)
109 $(RM) -rf $(MODULEPATH_DIR)
110 $(RM) -rf $(MODULES_TEMPDIR)
111 $(ECHO) "" > $(MODULES_UPDATE_MARKER)
112 endef
113
114 # Do a clean modules build if any of the input modules.config
115 # files is modified.
116 $(MODULES_LIST):: $(MODULES_CONFIG) $(MODULES_GROUP) \
117 $(MODULES_PROPERTIES) \
118 $(DEP_CONFIG) $(OPTIONAL_DEP_CONFIG) \
119 $(CLASSANALYZER_JAR_FILE)
246 # Install the module if module-info.class is updated
247 # or <module>.summary is updated
248 #
249 $(JIGSAW_MODULE_LIB)/%/$(MODULE_VERSION)/info: $(MODULEPATH_DIR)/%/classes/module-info.class \
250 $(MODULE_CLASSLIST_DIR)/%.summary
251 @if [ $* = "other" ] ; then \
252 $(ECHO) "ERROR: Check module \"other\". modules.config possibly requires update." ; \
253 exit 1; \
254 fi
255 @$(call copy-module-content,$*)
256 @$(call install-module,$*)
257 @$(java-vm-cleanup)
258
259 #
260 # Temporary workaround:
261 # Copy orb.idl and ir.idl to idlj module
262 # The *.idl files are imported during the build
263 #
264 # A better fix would be in make/common/internal/ImportComponents.gmk
265 # to install imported files in a module
266 $(MODULEPATH_DIR)/$(IDLJ_MODULE)/etc/%.idl : $(LIBDIR)/%.idl
267 $(install-non-module-file)
268
269 clean clobber:: classes.clean
270 $(clean-build)
271
272
273 # '<module-name>' development target to update the module content
274 # of a specific module in the jigsaw module library in the outputdir
275 # and also in jdk-module-library if exists.
276 # $ make jdk.boot
277 #
278 # TODO: modify Modularizer to take a parameter to only copy
279 # classes and resources for one module
280 %:
281 @if [ `$(GREP) -c "^$@ " $(MODULES_LIST)` != "1" ] ; then \
282 $(ECHO) 'Invalid target: "$@" expected a valid module name' ; \
283 exit 1; \
284 fi
285 $(call patch-module-classes,$@)
286 $(call install-module,$@)
|