< prev index next >

make/CopyIntoClasses.gmk

Print this page




 162 # source root (.../classes/META-INF) are automatically copied verbatim by the
 163 # SetupJavaCompilation macro.
 164 #
 165 # Any other META-INF/services configuration file is found here and platform specific comments
 166 # are uncommented and the configuration file is stored in the output META-INF directory.
 167 
 168 # Make sure the output directory is created.
 169 $(eval $(call MakeDir, $(JDK_OUTPUTDIR)/classes/META-INF/services))
 170 # Find all META-INF/services/* files
 171 ALL_META-INF_DIRS_share := $(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF)
 172 ALL_META-INF_DIRS_targetapi := $(shell $(FIND) $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes -type d -a -name META-INF)
 173 # Platform specific overrides shared
 174 ifneq ($(ALL_META-INF_DIRS_targetapi), )
 175   ALL_META-INF_DIRS := $(ALL_META-INF_DIRS_targetapi) \
 176       $(filter-out %$(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes%,%,$(ALL_META-INF_DIRS_targetapi)), \
 177       $(ALL_META-INF_DIRS_share))
 178 else
 179   ALL_META-INF_DIRS := $(ALL_META-INF_DIRS_share)
 180 endif
 181 
 182 ifndef OPENJDK
 183   ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/java2d/cmm/kcms/META-INF
 184 endif
 185 
 186 SRC_SERVICES_FILES := $(wildcard $(addsuffix /services/*, $(ALL_META-INF_DIRS)))
 187 
 188 ifdef OPENJDK
 189   SRC_SERVICES_FILES := $(filter-out %sun/dc/META-INF/services/sun.java2d.pipe.RenderingEngine, $(SRC_SERVICES_FILES))
 190   SRC_SERVICES_FILES := $(filter-out %sun/java2d/cmm/kcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider, $(SRC_SERVICES_FILES))
 191 else
 192   SRC_SERVICES_FILES := $(filter-out %sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine, $(SRC_SERVICES_FILES))
 193   ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), linux-sparc)
 194     SRC_SERVICES_FILES := $(filter-out %sun/java2d/cmm/kcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider, $(SRC_SERVICES_FILES))
 195   else
 196     SRC_SERVICES_FILES := $(filter-out %sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider, $(SRC_SERVICES_FILES))
 197   endif
 198 endif
 199 
 200 # The number of services files are relatively few. If the increase in numbers, then
 201 # we have to use ListPathsSafelyNow here.
 202 # Change $(JDK_TOPDIR)/src/.../META-INF/services/yyyy into $(JDK_OUTPUTDIR)/classes/META-INF/services/yyyy
 203 # The \n in the printf command is needed to make sed work on Solaris.
 204 OUT_SERVICES_FILES := $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/, \
 205     $(shell $(PRINTF) "$(SRC_SERVICES_FILES)\n" | $(SED) -e 's|/[^ ]*/META-INF/services/||g'))
 206 OUT_SERVICES_FILES_COLON := $(addsuffix :, $(OUT_SERVICES_FILES))
 207 # Exception handling for print services with no META-INF directory
 208 SRC_SERVICES_FILES_PRINT = $(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/print/services/*)
 209 OUT_SERVICES_FILES_PRINT = $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/, \
 210     $(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/print/services/%, %, \
 211     $(SRC_SERVICES_FILES_PRINT)))
 212 OUT_SERVICES_FILES_PRINT_COLON = $(addsuffix :, $(OUT_SERVICES_FILES_PRINT))
 213 RULES_SERVICES_PRINT = $(join $(OUT_SERVICES_FILES_PRINT_COLON), $(SRC_SERVICES_FILES_PRINT))
 214 
 215 # Now setup the dependency rules to generate a META-INF/services/... from the correct source.
 216 META-INF_RULES_SERVICES := $(RULES_SERVICES_PRINT) $(join $(OUT_SERVICES_FILES_COLON), $(SRC_SERVICES_FILES))
 217 # Eval the newly created rules to incorporate them into the make tree.




 162 # source root (.../classes/META-INF) are automatically copied verbatim by the
 163 # SetupJavaCompilation macro.
 164 #
 165 # Any other META-INF/services configuration file is found here and platform specific comments
 166 # are uncommented and the configuration file is stored in the output META-INF directory.
 167 
 168 # Make sure the output directory is created.
 169 $(eval $(call MakeDir, $(JDK_OUTPUTDIR)/classes/META-INF/services))
 170 # Find all META-INF/services/* files
 171 ALL_META-INF_DIRS_share := $(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF)
 172 ALL_META-INF_DIRS_targetapi := $(shell $(FIND) $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes -type d -a -name META-INF)
 173 # Platform specific overrides shared
 174 ifneq ($(ALL_META-INF_DIRS_targetapi), )
 175   ALL_META-INF_DIRS := $(ALL_META-INF_DIRS_targetapi) \
 176       $(filter-out %$(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes%,%,$(ALL_META-INF_DIRS_targetapi)), \
 177       $(ALL_META-INF_DIRS_share))
 178 else
 179   ALL_META-INF_DIRS := $(ALL_META-INF_DIRS_share)
 180 endif
 181 




 182 SRC_SERVICES_FILES := $(wildcard $(addsuffix /services/*, $(ALL_META-INF_DIRS)))
 183 
 184 ifdef OPENJDK
 185   SRC_SERVICES_FILES := $(filter-out %sun/dc/META-INF/services/sun.java2d.pipe.RenderingEngine, $(SRC_SERVICES_FILES))

 186 else
 187   SRC_SERVICES_FILES := $(filter-out %sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine, $(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/, \
 195     $(shell $(PRINTF) "$(SRC_SERVICES_FILES)\n" | $(SED) -e 's|/[^ ]*/META-INF/services/||g'))
 196 OUT_SERVICES_FILES_COLON := $(addsuffix :, $(OUT_SERVICES_FILES))
 197 # Exception handling for print services with no META-INF directory
 198 SRC_SERVICES_FILES_PRINT = $(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/print/services/*)
 199 OUT_SERVICES_FILES_PRINT = $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/, \
 200     $(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/print/services/%, %, \
 201     $(SRC_SERVICES_FILES_PRINT)))
 202 OUT_SERVICES_FILES_PRINT_COLON = $(addsuffix :, $(OUT_SERVICES_FILES_PRINT))
 203 RULES_SERVICES_PRINT = $(join $(OUT_SERVICES_FILES_PRINT_COLON), $(SRC_SERVICES_FILES_PRINT))
 204 
 205 # Now setup the dependency rules to generate a META-INF/services/... from the correct source.
 206 META-INF_RULES_SERVICES := $(RULES_SERVICES_PRINT) $(join $(OUT_SERVICES_FILES_COLON), $(SRC_SERVICES_FILES))
 207 # Eval the newly created rules to incorporate them into the make tree.


< prev index next >