< prev index next >

make/CompileJavaModules.gmk

Print this page

 73 $(JDK_OUTPUTDIR)/modules/%_zh_HK.properties: $(JDK_OUTPUTDIR)/modules/%_zh_TW.properties
 74 	$(install-file)
 75 
 76 CreateHkTargets = \
 77     $(call FilterExcludedTranslations, \
 78        $(patsubst $(TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
 79          $(subst /share/classes,, \
 80             $(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1)) \
 81          ) \
 82        ), \
 83        .properties \
 84     )
 85 
 86 ################################################################################
 87 # Include module specific build settings
 88 
 89 -include Java.gmk
 90 
 91 ################################################################################
 92 # Setup the main compilation
 93 
 94 $(eval $(call SetupJavaCompilation, $(MODULE), \
 95     SMALL_JAVA := false, \
 96     MODULE := $(MODULE), \
 97     SRC := $(wildcard $(MODULE_SRC_DIRS)), \
 98     INCLUDES := $(JDK_USER_DEFINED_FILTER), \
 99     FAIL_NO_SRC := $(FAIL_NO_SRC), \
100     BIN := $(if $($(MODULE)_BIN), $($(MODULE)_BIN), $(JDK_OUTPUTDIR)/modules), \
101     HEADERS := $(SUPPORT_OUTPUTDIR)/headers, \
102     CREATE_API_DIGEST := true, \
103     CLEAN := $(CLEAN), \
104     CLEAN_FILES := $(CLEAN_FILES), \
105     COPY := $(COPY), \
106     DISABLED_WARNINGS := $(DISABLED_WARNINGS_java), \
107     EXCLUDES := $(EXCLUDES), \
108     EXCLUDE_FILES := $(EXCLUDE_FILES), \
109     KEEP_ALL_TRANSLATIONS := $(KEEP_ALL_TRANSLATIONS), \
110     JAVAC_FLAGS := \
111         $(DOCLINT) \
112         $(JAVAC_FLAGS) \
113         --module-source-path $(MODULESOURCEPATH) \
114         --module-path $(MODULEPATH) \
115         --system none, \
116 ))
117 
118 TARGETS += $($(MODULE))
119 













































120 # Declare dependencies between java compilations of different modules.
121 # Since the other modules are declared in different invocations of this file,
122 # use the macro to find the correct target file to depend on.
123 # Only the javac compilation actually depends on other modules so limit
124 # dependency declaration to that by using the *_MODFILELIST variable.
125 $($(MODULE)_MODFILELIST): $(foreach d, $(call FindDepsForModule, $(MODULE)), \
126     $(call SetupJavaCompilationApiTarget, $d, \
127         $(if $($d_BIN), $($d_BIN), $(JDK_OUTPUTDIR)/modules/$d)))
128 
129 ################################################################################
130 # If this is an imported module, copy the pre built classes and resources into
131 # the modules output dir
132 
133 ifneq ($(wildcard $(IMPORT_MODULE_DIR)), )
134   $(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker: \
135       $(call FindFiles, $(IMPORT_MODULE_DIR))
136 	$(call MakeDir, $(@D))
137         # Do not delete marker and build meta data files
138 	$(RM) -r $(filter-out $(@D)/_%, $(wildcard $(@D)/*))
139 	$(CP) -R $(IMPORT_MODULE_DIR)/* $(@D)/

 73 $(JDK_OUTPUTDIR)/modules/%_zh_HK.properties: $(JDK_OUTPUTDIR)/modules/%_zh_TW.properties
 74 	$(install-file)
 75 
 76 CreateHkTargets = \
 77     $(call FilterExcludedTranslations, \
 78        $(patsubst $(TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
 79          $(subst /share/classes,, \
 80             $(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1)) \
 81          ) \
 82        ), \
 83        .properties \
 84     )
 85 
 86 ################################################################################
 87 # Include module specific build settings
 88 
 89 -include Java.gmk
 90 
 91 ################################################################################
 92 # Setup the main compilation

 93 $(eval $(call SetupJavaCompilation, $(MODULE), \
 94     SMALL_JAVA := false, \
 95     MODULE := $(MODULE), \
 96     SRC := $(wildcard $(MODULE_SRC_DIRS)), \
 97     INCLUDES := $(JDK_USER_DEFINED_FILTER), \
 98     FAIL_NO_SRC := $(FAIL_NO_SRC), \
 99     BIN := $(if $($(MODULE)_BIN), $($(MODULE)_BIN), $(JDK_OUTPUTDIR)/modules), \
100     HEADERS := $(SUPPORT_OUTPUTDIR)/headers, \
101     CREATE_API_DIGEST := true, \
102     CLEAN := $(CLEAN), \
103     CLEAN_FILES := $(CLEAN_FILES), \
104     COPY := $(COPY), \
105     DISABLED_WARNINGS := $(DISABLED_WARNINGS_java), \
106     EXCLUDES := $(EXCLUDES), \
107     EXCLUDE_FILES := $(EXCLUDE_FILES), \
108     KEEP_ALL_TRANSLATIONS := $(KEEP_ALL_TRANSLATIONS), \
109     JAVAC_FLAGS := \
110         $(DOCLINT) \
111         $(JAVAC_FLAGS) \
112         --module-source-path $(MODULESOURCEPATH) \
113         --module-path $(MODULEPATH) \
114         --system none, \
115 ))
116 
117 TARGETS += $($(MODULE))
118 
119 ################################################################################
120 # Setup compilation for value classes in the module
121 # TBD: When $(DOCLINT) was included there was an NPE in JavacTypes.getOverriddenMethods
122 
123 # Directory and file name suffix for jar file containing value classes
124 VALUECLASSES_STR := valueclasses
125 
126 ifneq ($(COMPILER), bootjdk)
127   MODULE_VALUECLASS_SRC_DIRS := $(call FindModuleValueClassSrcDirs, $(MODULE))
128   MODULE_VALUECLASS_SOURCEPATH := $(call GetModuleValueClassSrcPath)
129 
130   ifneq ($(MODULE_VALUECLASS_SRC_DIRS),)
131     $(eval $(call SetupJavaCompilation, $(MODULE)-$(VALUECLASSES_STR), \
132         SMALL_JAVA := false, \
133         MODULE := $(MODULE), \
134         SRC := $(wildcard $(MODULE_VALUECLASS_SRC_DIRS)), \
135         INCLUDES := $(JDK_USER_DEFINED_FILTER), \
136         FAIL_NO_SRC := $(FAIL_NO_SRC), \
137         BIN := $(SUPPORT_OUTPUTDIR)/$(VALUECLASSES_STR)/, \
138         JAR := $(JDK_OUTPUTDIR)/lib/$(VALUECLASSES_STR)/$(MODULE)-$(VALUECLASSES_STR).jar, \
139         HEADERS := $(SUPPORT_OUTPUTDIR)/headers, \
140         DISABLED_WARNINGS := $(DISABLED_WARNINGS_java), \
141         EXCLUDES := $(EXCLUDES), \
142         EXCLUDE_FILES := $(EXCLUDE_FILES) \
143         KEEP_ALL_TRANSLATIONS := $(KEEP_ALL_TRANSLATIONS), \
144         DEPENDS := $($(MODULE)), \
145         JAVAC_FLAGS := \
146             $(JAVAC_FLAGS) \
147             --module-source-path $(MODULE_VALUECLASS_SOURCEPATH) \
148             --module-path $(JDK_OUTPUTDIR)/modules \
149             --system none \
150             --enable-preview -source $(JDK_SOURCE_TARGET_VERSION), \
151     ))
152 
153     TARGETS += $($(MODULE)-$(VALUECLASSES_STR))
154 
155     $(eval $(call SetupCopyFiles, $(MODULE)-copy-valueclass-jar, \
156         FILES := $(JDK_OUTPUTDIR)/lib/$(VALUECLASSES_STR)/$(MODULE)-$(VALUECLASSES_STR).jar, \
157         DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/$(VALUECLASSES_STR), \
158     ))
159 
160     TARGETS += $($(MODULE)-copy-valueclass-jar)
161   endif
162 endif
163 
164 # Declare dependencies between java compilations of different modules.
165 # Since the other modules are declared in different invocations of this file,
166 # use the macro to find the correct target file to depend on.
167 # Only the javac compilation actually depends on other modules so limit
168 # dependency declaration to that by using the *_MODFILELIST variable.
169 $($(MODULE)_MODFILELIST): $(foreach d, $(call FindDepsForModule, $(MODULE)), \
170     $(call SetupJavaCompilationApiTarget, $d, \
171         $(if $($d_BIN), $($d_BIN), $(JDK_OUTPUTDIR)/modules/$d)))
172 
173 ################################################################################
174 # If this is an imported module, copy the pre built classes and resources into
175 # the modules output dir
176 
177 ifneq ($(wildcard $(IMPORT_MODULE_DIR)), )
178   $(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker: \
179       $(call FindFiles, $(IMPORT_MODULE_DIR))
180 	$(call MakeDir, $(@D))
181         # Do not delete marker and build meta data files
182 	$(RM) -r $(filter-out $(@D)/_%, $(wildcard $(@D)/*))
183 	$(CP) -R $(IMPORT_MODULE_DIR)/* $(@D)/
< prev index next >