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 ))
151
152 TARGETS += $($(MODULE)-$(VALUECLASSES_STR))
153
154 $(eval $(call SetupCopyFiles, $(MODULE)-copy-valueclass-jar, \
155 FILES := $(JDK_OUTPUTDIR)/lib/$(VALUECLASSES_STR)/$(MODULE)-$(VALUECLASSES_STR).jar, \
156 DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/$(VALUECLASSES_STR), \
157 ))
158
159 TARGETS += $($(MODULE)-copy-valueclass-jar)
160 endif
161 endif
162
163 # Declare dependencies between java compilations of different modules.
164 # Since the other modules are declared in different invocations of this file,
165 # use the macro to find the correct target file to depend on.
166 # Only the javac compilation actually depends on other modules so limit
167 # dependency declaration to that by using the *_MODFILELIST variable.
168 $($(MODULE)_MODFILELIST): $(foreach d, $(call FindDepsForModule, $(MODULE)), \
169 $(call SetupJavaCompilationApiTarget, $d, \
170 $(if $($d_BIN), $($d_BIN), $(JDK_OUTPUTDIR)/modules/$d)))
171
172 ################################################################################
173 # If this is an imported module, copy the pre built classes and resources into
174 # the modules output dir
175
176 ifneq ($(wildcard $(IMPORT_MODULE_DIR)), )
177 $(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker: \
178 $(call FindFiles, $(IMPORT_MODULE_DIR))
179 $(call MakeDir, $(@D))
180 # Do not delete marker and build meta data files
181 $(RM) -r $(filter-out $(@D)/_%, $(wildcard $(@D)/*))
182 $(CP) -R $(IMPORT_MODULE_DIR)/* $(@D)/
|