< prev index next >

make/common/Modules.gmk

Print this page




 120     jdk.scripting.nashorn.shell \
 121     #
 122 
 123 ifeq ($(OPENJDK_TARGET_OS), windows)
 124   PLATFORM_MODULES += jdk.crypto.mscapi
 125 endif
 126 ifeq ($(OPENJDK_TARGET_OS), solaris)
 127   PLATFORM_MODULES += jdk.crypto.ucrypto
 128 endif
 129 
 130 ################################################################################
 131 # Some platforms don't have the serviceability agent
 132 
 133 ifeq ($(INCLUDE_SA), false)
 134   MODULES_FILTER += jdk.hotspot.agent
 135 endif
 136 
 137 ################################################################################
 138 # Module list macros
 139 
 140 # Use append so that the custom extension may add to this variable
 141 
 142 ALL_TOP_SRC_DIRS += \





 143     $(HOTSPOT_TOPDIR)/src \
 144     $(JDK_TOPDIR)/src \
 145     $(LANGTOOLS_TOPDIR)/src \
 146     $(CORBA_TOPDIR)/src \
 147     $(JAXP_TOPDIR)/src \
 148     $(JAXWS_TOPDIR)/src \
 149     $(NASHORN_TOPDIR)/src \
 150     #
 151 






 152 # Find all module-info.java files for the current build target platform and
 153 # configuration.
 154 # Param 1 - Module to find for, set to * for finding all
 155 FindAllModuleInfos = \
 156     $(wildcard \
 157         $(patsubst %,%/$(strip $1)/$(OPENJDK_TARGET_OS)/classes/module-info.java, $(ALL_TOP_SRC_DIRS)) \
 158         $(patsubst %,%/$(strip $1)/$(OPENJDK_TARGET_OS_TYPE)/classes/module-info.java, $(ALL_TOP_SRC_DIRS)) \
 159         $(patsubst %,%/$(strip $1)/share/classes/module-info.java, $(ALL_TOP_SRC_DIRS)) \
 160         $(patsubst %,%/$(strip $1)/module-info.java, $(IMPORT_MODULES_SRC)))
 161 
 162 # Extract the module names from the paths of module-info.java files. The
 163 # position of the module directory differs depending on if this is an imported
 164 # src dir or not.
 165 GetModuleNameFromModuleInfo = \
 166     $(strip $(foreach mi, $1, \
 167       $(if $(filter $(addsuffix %, $(IMPORT_MODULES_SRC)), $(mi)), \
 168         $(notdir $(patsubst %/,%, $(dir $(mi)))), \
 169         $(notdir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(mi)))))))))))
 170 
 171 # Find all modules by looking for module-info.java files and looking at parent
 172 # directories.
 173 FindAllModules = \
 174     $(sort $(filter-out $(MODULES_FILTER), \
 175     $(call GetModuleNameFromModuleInfo, $(MODULE_INFOS))))
 176 
 177 FindImportedModules = \
 178     $(if $(IMPORT_MODULES_CLASSES), $(notdir $(wildcard $(IMPORT_MODULES_CLASSES)/*)))













 179 
 180 ################################################################################
 181 # Extract module dependencies from module-info.java files.
 182 
 183 MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk
 184 
 185 MODULE_INFOS := $(call FindAllModuleInfos, *)
 186 
 187 $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
 188     $(call DependOnVariable, MODULE_INFOS, $(MAKESUPPORT_OUTPUTDIR)/MODULE_INFOS.vardeps)
 189         $(MKDIR) -p $(@D)
 190         $(RM) $@
 191         $(foreach m, $(MODULE_INFOS), \
 192             ( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) :=" && \
 193               $(NAWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\
 194                   BEGIN      { if (MODULE != "java.base") printf(" java.base"); } \
 195                   /requires/ { sub(/;/, ""); \
 196                                sub(/requires/, ""); \
 197                                sub(/public/, ""); \
 198                                sub(/\/\/.*/, ""); \




 120     jdk.scripting.nashorn.shell \
 121     #
 122 
 123 ifeq ($(OPENJDK_TARGET_OS), windows)
 124   PLATFORM_MODULES += jdk.crypto.mscapi
 125 endif
 126 ifeq ($(OPENJDK_TARGET_OS), solaris)
 127   PLATFORM_MODULES += jdk.crypto.ucrypto
 128 endif
 129 
 130 ################################################################################
 131 # Some platforms don't have the serviceability agent
 132 
 133 ifeq ($(INCLUDE_SA), false)
 134   MODULES_FILTER += jdk.hotspot.agent
 135 endif
 136 
 137 ################################################################################
 138 # Module list macros
 139 
 140 # Use append so that the custom extension may add to these variables
 141 
 142 GENERATED_SRC_DIRS += \
 143     $(SUPPORT_OUTPUTDIR)/gensrc \
 144     #
 145 
 146 TOP_SRC_DIRS += \
 147     $(CORBA_TOPDIR)/src \
 148     $(HOTSPOT_TOPDIR)/src \
 149     $(JDK_TOPDIR)/src \
 150     $(LANGTOOLS_TOPDIR)/src \

 151     $(JAXP_TOPDIR)/src \
 152     $(JAXWS_TOPDIR)/src \
 153     $(NASHORN_TOPDIR)/src \
 154     #
 155 
 156 SRC_SUBDIRS += $(OPENJDK_TARGET_OS)/classes
 157 ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE))
 158   SRC_SUBDIRS += $(OPENJDK_TARGET_OS_TYPE)/classes
 159 endif
 160 SRC_SUBDIRS += share/classes
 161 
 162 # Find all module-info.java files for the current build target platform and
 163 # configuration.
 164 # Param 1 - Module to find for, set to * for finding all
 165 FindAllModuleInfos = \
 166     $(wildcard \
 167         $(foreach sub, $(SRC_SUBDIRS), \
 168           $(patsubst %,%/$(strip $1)/$(sub)/module-info.java, $(TOP_SRC_DIRS))) \

 169         $(patsubst %,%/$(strip $1)/module-info.java, $(IMPORT_MODULES_SRC)))
 170 
 171 # Extract the module names from the paths of module-info.java files. The
 172 # position of the module directory differs depending on if this is an imported
 173 # src dir or not.
 174 GetModuleNameFromModuleInfo = \
 175     $(strip $(foreach mi, $1, \
 176       $(if $(filter $(addsuffix %, $(IMPORT_MODULES_SRC)), $(mi)), \
 177         $(notdir $(patsubst %/,%, $(dir $(mi)))), \
 178         $(notdir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(mi)))))))))))
 179 
 180 # Find all modules by looking for module-info.java files and looking at parent
 181 # directories.
 182 FindAllModules = \
 183     $(sort $(filter-out $(MODULES_FILTER), \
 184     $(call GetModuleNameFromModuleInfo, $(MODULE_INFOS))))
 185 
 186 FindImportedModules = \
 187     $(if $(IMPORT_MODULES_CLASSES), $(notdir $(wildcard $(IMPORT_MODULES_CLASSES)/*)))
 188 
 189 # Find all source dirs for a particular module
 190 # $1 - Module to find source dirs for
 191 FindModuleSrcDirs = \
 192     $(strip $(wildcard \
 193         $(addsuffix /$(strip $1), $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \
 194         $(foreach sub, $(SRC_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
 195 
 196 # Construct the complete module source path
 197 GetModuleSrcPath = \
 198     $(call PathList, \
 199         $(addsuffix /*, $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \
 200         $(foreach sub, $(SRC_SUBDIRS), $(addsuffix /*/$(sub), $(TOP_SRC_DIRS))))
 201 
 202 ################################################################################
 203 # Extract module dependencies from module-info.java files.
 204 
 205 MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk
 206 
 207 MODULE_INFOS := $(call FindAllModuleInfos, *)
 208 
 209 $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
 210     $(call DependOnVariable, MODULE_INFOS, $(MAKESUPPORT_OUTPUTDIR)/MODULE_INFOS.vardeps)
 211         $(MKDIR) -p $(@D)
 212         $(RM) $@
 213         $(foreach m, $(MODULE_INFOS), \
 214             ( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) :=" && \
 215               $(NAWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\
 216                   BEGIN      { if (MODULE != "java.base") printf(" java.base"); } \
 217                   /requires/ { sub(/;/, ""); \
 218                                sub(/requires/, ""); \
 219                                sub(/public/, ""); \
 220                                sub(/\/\/.*/, ""); \


< prev index next >