diff -r 5dbaa8f0f72e -r 3ef14bab6254 jdk/makefiles/CopyIntoClasses.gmk --- a/jdk/makefiles/CopyIntoClasses.gmk Thu Jun 07 20:40:02 2012 -0700 +++ b/jdk/makefiles/CopyIntoClasses.gmk Thu Jun 07 20:40:50 2012 -0700 @@ -83,6 +83,83 @@ COPY_FILES += \ $(JDK_TOPDIR)/src/share/classes/sun/net/idn/uidna.spp +# +# Swing plaf resources +# +SWING_PLAF_WINDOWS_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows +COPY_FILES += \ + $(wildcard $(SWING_PLAF_WINDOWS_RESOURCES_DIR)/icons/*.gif) \ + $(wildcard $(SWING_PLAF_WINDOWS_RESOURCES_DIR)/icons/*.png) + +ifndef OPENJDK + SWING_PLAF_WINDOWS_RESOURCES_DIR_CLOSED = $(JDK_TOPDIR)/src/closed/share/classes/com/sun/java/swing/plaf/windows + # Filter out JavaCup32.png from OpenJDK + COPY_FILES := $(filter-out $(SWING_PLAF_WINDOWS_RESOURCES_DIR)/icons/JavaCup32.png, $(COPY_FILES)) + # Alter JavaCup32.png from ClosedJDK + COPY_FILES += \ + $(SWING_PLAF_WINDOWS_RESOURCES_DIR_CLOSED)/icons/JavaCup32.png +endif + +SWING_PLAF_BASIC_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/basic +COPY_FILES += \ + $(wildcard $(SWING_PLAF_BASIC_RESOURCES_DIR)/icons/*.png) + +ifndef OPENJDK + SWING_PLAF_BASIC_RESOURCES_DIR_CLOSED = $(JDK_TOPDIR)/src/closed/share/classes/javax/swing/plaf/basic + # Filter out JavaCup16.png from OpenJDK + COPY_FILES := $(filter-out $(SWING_PLAF_BASIC_RESOURCES_DIR)/icons/JavaCup16.png, $(COPY_FILES)) + # Alter JavaCup16.png from ClosedJDK + COPY_FILES += \ + $(SWING_PLAF_BASIC_RESOURCES_DIR_CLOSED)/icons/JavaCup16.png +endif + +ifdef OPENJDK + SWING_PLAF_MOTIF_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif + COPY_FILES += \ + $(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR)/icons/*.gif) \ + $(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR)/icons/*.png) +else + SWING_PLAF_MOTIF_RESOURCES_DIR_CLOSED = $(JDK_TOPDIR)/src/closed/share/classes/com/sun/java/swing/plaf/motif + COPY_FILES += \ + $(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR_CLOSED)/icons/*.gif) \ + $(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR_CLOSED)/icons/*.png) +endif + +SWING_PLAF_METAL_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/metal +COPY_FILES += \ + $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/*.gif) \ + $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/*.png) \ + $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/ocean/*.gif) \ + $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/ocean/*.png) \ + $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/sounds/*.wav) + +ifneq ($(PLATFORM), windows) + # Only copy GTK resources on Solaris/Linux + SWING_PLAF_GTK_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk + COPY_FILES += \ + $(wildcard $(SWING_PLAF_GTK_RESOURCES_DIR)/icons/*.gif) \ + $(wildcard $(SWING_PLAF_GTK_RESOURCES_DIR)/icons/*.png) \ + $(wildcard $(SWING_PLAF_GTK_RESOURCES_DIR)/resources/metacity/SwingFallbackTheme/metacity-1/*.xml) +endif +# END: Swing plaf resources + +# The exception handling of swing beaninfo +# These resources violates the convention of having code and resources together under +# $(JDK_TOPDIR)/src/.../classes directories +SWING_BEANINFO_RESOURCES_SRC_DIR = $(JDK_TOPDIR)/make/tools/swing-beans/beaninfo/images +SWING_BEANINFO_RESOURCES_SRC = $(wildcard $(SWING_BEANINFO_RESOURCES_SRC_DIR)/*.gif) +OUT_BEANINFO_RESOURCES = $(addprefix $(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/,\ + $(shell $(PRINTF) "$(SWING_BEANINFO_RESOURCES_SRC)\n" | $(SED) -e 's|/[^ ]*/beaninfo/images/||g')) + +COPY_EXTRA += $(OUT_BEANINFO_RESOURCES) +# END: Swing beaninfo resources + +# Swing text resources +SWING_TEXT_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/javax/swing/text +COPY_FILES += \ + $(SWING_TEXT_RESOURCEDIR)/html/default.css \ + $(wildcard $(SWING_TEXT_RESOURCEDIR)/rtf/charsets/*.txt) + ########################################################################################## # # Copy the META-INF/services configuration files that are scattered around the source tree @@ -94,7 +171,7 @@ # are uncommented and the configuration file is stored in the output META-INF directory. # Make sure the output directory is created. -$(shell $(MKDIR) -p $(JDK_OUTPUTDIR)/newclasses/META-INF/services) +$(shell $(MKDIR) -p $(JDK_OUTPUTDIR)/classes/META-INF/services) # Find all META-INF/services/* files ALL_META-INF_DIRS_share:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF) ALL_META-INF_DIRS_hostapi:=$(shell $(FIND) $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes -type d -a -name META-INF) @@ -107,12 +184,22 @@ ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_share) endif # Filter out META-INF dirs that shouldn't be included -ALL_META-INF_DIRS:=$(filter-out %sun/nio/cs/ext/META-INF,$(ALL_META-INF_DIRS)) ifdef OPENJDK ALL_META-INF_DIRS:=$(filter-out %com/sun/script/javascript/META-INF,$(ALL_META-INF_DIRS)) endif +ifndef OPENJDK +ifneq ($(PLATFORM), macosx) + ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/jdbc/odbc/META-INF +endif +endif + +ifndef OPENJDK + ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/java2d/cmm/kcms/META-INF +endif + SRC_SERVICES_FILES:=$(wildcard $(addsuffix /services/*,$(ALL_META-INF_DIRS))) + ifdef OPENJDK SRC_SERVICES_FILES:=$(filter-out %sun/dc/META-INF/services/sun.java2d.pipe.RenderingEngine,$(SRC_SERVICES_FILES)) SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/kcms/META-INF/services/sun.java2d.cmm.PCMM,$(SRC_SERVICES_FILES)) @@ -120,16 +207,17 @@ SRC_SERVICES_FILES:=$(filter-out %sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine,$(SRC_SERVICES_FILES)) SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.PCMM,$(SRC_SERVICES_FILES)) endif + # The number of services files are relatively few. If the increase in numbers, then # we have to use ListPathsSafelyNow here. -# Change $(JDK_TOPDIR)/src/.../META-INF/services/yyyy into $(JDK_OUTPUTDIR)/newclasses/META-INF/services/yyyy +# Change $(JDK_TOPDIR)/src/.../META-INF/services/yyyy into $(JDK_OUTPUTDIR)/classes/META-INF/services/yyyy # The \n in the printf command is needed to make sed work on Solaris. -OUT_SERVICES_FILES:=$(addprefix $(JDK_OUTPUTDIR)/newclasses/META-INF/services/,\ +OUT_SERVICES_FILES:=$(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/,\ $(shell $(PRINTF) "$(SRC_SERVICES_FILES)\n" | $(SED) -e 's|/[^ ]*/META-INF/services/||g')) OUT_SERVICES_FILES_COLON:=$(addsuffix :,$(OUT_SERVICES_FILES)) # Exception handling for print services with no META-INF directory SRC_SERVICES_FILES_PRINT = $(wildcard $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/print/services/*) -OUT_SERVICES_FILES_PRINT = $(addprefix $(JDK_OUTPUTDIR)/newclasses/META-INF/services/,\ +OUT_SERVICES_FILES_PRINT = $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/,\ $(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/print/services/%,%,\ $(SRC_SERVICES_FILES_PRINT))) OUT_SERVICES_FILES_PRINT_COLON = $(addsuffix :,$(OUT_SERVICES_FILES_PRINT)) @@ -148,3 +236,45 @@ COPY_EXTRA += $(OUT_SERVICES_FILES) COPY_EXTRA += $(OUT_SERVICES_FILES_PRINT) + +### + +$(JDK_OUTPUTDIR)/classes/sun/nio/cs/ext/sjis0213.dat : $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs/ext/sjis0213.dat + $(MKDIR) -p $(@D) + $(RM) $@ + $(CP) $< $(@) + +COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/sun/nio/cs/ext/sjis0213.dat + +### + +JAVAX_SOUND_SRC := $(JDK_TOPDIR)/src/share/classes/com/sun/media/sound/services + +JAVAX_SOUND_SRC_FILES := \ + javax.sound.midi.spi.MidiDeviceProvider \ + javax.sound.midi.spi.MidiFileReader \ + javax.sound.midi.spi.MidiFileWriter \ + javax.sound.midi.spi.SoundbankReader \ + javax.sound.sampled.spi.AudioFileReader \ + javax.sound.sampled.spi.AudioFileWriter \ + javax.sound.sampled.spi.FormatConversionProvider + +COPY_EXTRA += $(foreach F,$(notdir $(JAVAX_SOUND_SRC_FILES)),$(JDK_OUTPUTDIR)/classes/META-INF/services/${F}) + +ifeq ($(PLATFORM)-$(ARCH),windows-ia64) + JAVAX_SOUND_SRC_FILES += windows-ia64/javax.sound.sampled.spi.MixerProvider + COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider +else ifeq ($(PLATFORM),windows) + JAVAX_SOUND_SRC_FILES += windows-i586/javax.sound.sampled.spi.MixerProvider + COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider +else ifeq ($(PLATFORM)-$(ARCH),linux-i586) + JAVAX_SOUND_SRC_FILES += linux-i586/javax.sound.sampled.spi.MixerProvider + COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider +else + JAVAX_SOUND_SRC_FILES += javax.sound.sampled.spi.MixerProvider + COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider +endif + +JAVAX_SOUND_RULES := $(foreach F,$(JAVAX_SOUND_SRC_FILES),$(JDK_OUTPUTDIR)/classes/META-INF/services/$(notdir $F):$(JAVAX_SOUND_SRC)/$F) + +$(foreach R,$(JAVAX_SOUND_RULES),$(eval $(call addto_meta-inf_services,$R)))