155 # into classes/META-INF/services. Be aware that META-INF directories that are located at a 156 # source root (.../classes/META-INF) are automatically copied verbatim by the 157 # SetupJavaCompilation macro. 158 # 159 # Any other META-INF/services configuration file is found here and platform specific comments 160 # are uncommented and the configuration file is stored in the output META-INF directory. 161 162 # Make sure the output directory is created. 163 $(eval $(call MakeDir,$(JDK_OUTPUTDIR)/classes/META-INF/services)) 164 # Find all META-INF/services/* files 165 ALL_META-INF_DIRS_share:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF) 166 ALL_META-INF_DIRS_targetapi:=$(shell $(FIND) $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes -type d -a -name META-INF) 167 # Platform specific overrides shared 168 ifneq ($(ALL_META-INF_DIRS_targetapi),) 169 ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_targetapi) \ 170 $(filter-out %$(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes%,%,$(ALL_META-INF_DIRS_targetapi)),\ 171 $(ALL_META-INF_DIRS_share)) 172 else 173 ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_share) 174 endif 175 # Filter out META-INF dirs that shouldn't be included 176 ifdef OPENJDK 177 ALL_META-INF_DIRS:=$(filter-out %com/sun/script/javascript/META-INF,$(ALL_META-INF_DIRS)) 178 endif 179 180 ifndef OPENJDK 181 ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/java2d/cmm/kcms/META-INF 182 endif 183 184 SRC_SERVICES_FILES:=$(wildcard $(addsuffix /services/*,$(ALL_META-INF_DIRS))) 185 186 ifdef OPENJDK 187 SRC_SERVICES_FILES:=$(filter-out %sun/dc/META-INF/services/sun.java2d.pipe.RenderingEngine,$(SRC_SERVICES_FILES)) 188 SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/kcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider,$(SRC_SERVICES_FILES)) 189 else 190 SRC_SERVICES_FILES:=$(filter-out %sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine,$(SRC_SERVICES_FILES)) 191 SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider,$(SRC_SERVICES_FILES)) 192 endif 193 194 # The number of services files are relatively few. If the increase in numbers, then 195 # we have to use ListPathsSafelyNow here. 196 # Change $(JDK_TOPDIR)/src/.../META-INF/services/yyyy into $(JDK_OUTPUTDIR)/classes/META-INF/services/yyyy 197 # The \n in the printf command is needed to make sed work on Solaris. 198 OUT_SERVICES_FILES:=$(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/,\ | 155 # into classes/META-INF/services. Be aware that META-INF directories that are located at a 156 # source root (.../classes/META-INF) are automatically copied verbatim by the 157 # SetupJavaCompilation macro. 158 # 159 # Any other META-INF/services configuration file is found here and platform specific comments 160 # are uncommented and the configuration file is stored in the output META-INF directory. 161 162 # Make sure the output directory is created. 163 $(eval $(call MakeDir,$(JDK_OUTPUTDIR)/classes/META-INF/services)) 164 # Find all META-INF/services/* files 165 ALL_META-INF_DIRS_share:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF) 166 ALL_META-INF_DIRS_targetapi:=$(shell $(FIND) $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes -type d -a -name META-INF) 167 # Platform specific overrides shared 168 ifneq ($(ALL_META-INF_DIRS_targetapi),) 169 ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_targetapi) \ 170 $(filter-out %$(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes%,%,$(ALL_META-INF_DIRS_targetapi)),\ 171 $(ALL_META-INF_DIRS_share)) 172 else 173 ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_share) 174 endif 175 176 ifndef OPENJDK 177 ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/java2d/cmm/kcms/META-INF 178 endif 179 180 SRC_SERVICES_FILES:=$(wildcard $(addsuffix /services/*,$(ALL_META-INF_DIRS))) 181 182 ifdef OPENJDK 183 SRC_SERVICES_FILES:=$(filter-out %sun/dc/META-INF/services/sun.java2d.pipe.RenderingEngine,$(SRC_SERVICES_FILES)) 184 SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/kcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider,$(SRC_SERVICES_FILES)) 185 else 186 SRC_SERVICES_FILES:=$(filter-out %sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine,$(SRC_SERVICES_FILES)) 187 SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider,$(SRC_SERVICES_FILES)) 188 endif 189 190 # The number of services files are relatively few. If the increase in numbers, then 191 # we have to use ListPathsSafelyNow here. 192 # Change $(JDK_TOPDIR)/src/.../META-INF/services/yyyy into $(JDK_OUTPUTDIR)/classes/META-INF/services/yyyy 193 # The \n in the printf command is needed to make sed work on Solaris. 194 OUT_SERVICES_FILES:=$(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/,\ |