23 # questions. |
23 # questions. |
24 # |
24 # |
25 |
25 |
26 ifndef _MODULES_GMK |
26 ifndef _MODULES_GMK |
27 _MODULES_GMK := 1 |
27 _MODULES_GMK := 1 |
28 |
|
29 include JavaCompilation.gmk |
|
30 include SetupJavaCompilers.gmk |
|
31 |
28 |
32 ################################################################################ |
29 ################################################################################ |
33 # Some platforms don't have the serviceability agent |
30 # Some platforms don't have the serviceability agent |
34 ifeq ($(INCLUDE_SA), false) |
31 ifeq ($(INCLUDE_SA), false) |
35 MODULES_FILTER += jdk.hotspot.agent |
32 MODULES_FILTER += jdk.hotspot.agent |
65 $(patsubst %, %/*/$(OPENJDK_TARGET_OS), $(ALL_TOP_SRC_DIRS)) \ |
62 $(patsubst %, %/*/$(OPENJDK_TARGET_OS), $(ALL_TOP_SRC_DIRS)) \ |
66 $(patsubst %, %/*/$(OPENJDK_TARGET_OS_TYPE), $(ALL_TOP_SRC_DIRS)))))))) |
63 $(patsubst %, %/*/$(OPENJDK_TARGET_OS_TYPE), $(ALL_TOP_SRC_DIRS)))))))) |
67 endef |
64 endef |
68 |
65 |
69 ################################################################################ |
66 ################################################################################ |
70 |
67 # The module deps makefile is generated in make/GenerateModuleDeps.gmk |
71 $(eval $(call SetupJavaCompilation,BUILD_GENMODULESLIST, \ |
|
72 SETUP := BOOT_JAVAC, \ |
|
73 SRC := $(JDK_TOPDIR)/make/src/classes, \ |
|
74 INCLUDES := build/tools/module, \ |
|
75 EXCLUDE_FILES := ImageBuilder.java ModuleArchive.java, \ |
|
76 BIN := $(MAKESUPPORT_OUTPUTDIR)/bt_classes_moduleslist, \ |
|
77 DISABLE_SJAVAC := true)) |
|
78 |
|
79 TOOL_GENMODULESLIST = $(JAVA_SMALL) \ |
|
80 -cp "$(MAKESUPPORT_OUTPUTDIR)/bt_classes_moduleslist" \ |
|
81 build.tools.module.GenModulesList |
|
82 |
|
83 MODULES_LIST_FILE := $(MAKESUPPORT_OUTPUTDIR)/modules.list |
|
84 MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk |
68 MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk |
85 |
|
86 $(MODULES_LIST_FILE): $(SRC_ROOT)/modules.xml \ |
|
87 $(BUILD_GENMODULESLIST) |
|
88 $(TOOL_GENMODULESLIST) -o $@ $(filter %.xml, $^) |
|
89 |
|
90 $(MODULE_DEPS_MAKEFILE): $(MODULES_LIST_FILE) |
|
91 $(CAT) $^ | $(SED) -e 's/^\([^:]*\):/DEPS_\1 :=/g' > $@ |
|
92 |
|
93 -include $(MODULE_DEPS_MAKEFILE) |
69 -include $(MODULE_DEPS_MAKEFILE) |
94 |
70 |
95 # Param 1: Module to find deps for |
71 # Param 1: Module to find deps for |
96 define FindDepsForModule |
72 define FindDepsForModule |
97 $(DEPS_$(strip $1)) |
73 $(DEPS_$(strip $1)) |