jdk/make/gensrc/GensrcIcons.gmk
changeset 25866 82d7101d5cab
parent 25859 3317bb8137f4
child 27736 8c9bd4be4a86
child 27565 729f9700483a
equal deleted inserted replaced
25865:d38d876f1654 25866:82d7101d5cab
    24 #
    24 #
    25 
    25 
    26 GENSRC_AWT_ICONS :=
    26 GENSRC_AWT_ICONS :=
    27 GENSRC_AWT_ICONS_SRC :=
    27 GENSRC_AWT_ICONS_SRC :=
    28 GENSRC_AWT_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc
    28 GENSRC_AWT_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc
    29 GENSRC_AWT_ICONS_DST := $(GENSRC_AWT_ICONS_TMP)/sun/awt/
    29 GENSRC_AWT_ICONS_DST := $(GENSRC_AWT_ICONS_TMP)/java.desktop/sun/awt/
    30 
    30 
    31 ifdef OPENJDK
    31 ifdef OPENJDK
    32   X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)
    32   X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)
    33 else
    33 else
    34   X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/solaris
    34   X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)
    35 endif
    35 endif
    36 
    36 
    37 GENSRC_AWT_ICONS_SRC += \
    37 GENSRC_AWT_ICONS_SRC += \
    38     $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
    38     $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
    39     $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
    39     $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
    40     $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
    40     $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
    41     $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
    41     $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
    42 
    42 
    43 
    43 
    44 AWT_ICONPATH := $(JDK_TOPDIR)/src/share/classes/sun/awt/resources
    44 AWT_ICONPATH := $(JDK_TOPDIR)/src/java.desktop/share/classes/sun/awt/resources
    45 
    45 
    46 GENSRC_AWT_ICONS_SRC += \
    46 GENSRC_AWT_ICONS_SRC += \
    47     $(AWT_ICONPATH)/security-icon-bw16.png \
    47     $(AWT_ICONPATH)/security-icon-bw16.png \
    48     $(AWT_ICONPATH)/security-icon-interim16.png \
    48     $(AWT_ICONPATH)/security-icon-interim16.png \
    49     $(AWT_ICONPATH)/security-icon-yellow16.png \
    49     $(AWT_ICONPATH)/security-icon-yellow16.png \
    78   $1_NAME32 := $(call GENSRC_AWT_ICONS_DST_NAME,$1,32)
    78   $1_NAME32 := $(call GENSRC_AWT_ICONS_DST_NAME,$1,32)
    79   $1_TARGET32 := $(GENSRC_AWT_ICONS_DST)/$$($1_NAME32).java
    79   $1_TARGET32 := $(GENSRC_AWT_ICONS_DST)/$$($1_NAME32).java
    80   $1_NAME64 := $(call GENSRC_AWT_ICONS_DST_NAME,$1,64)
    80   $1_NAME64 := $(call GENSRC_AWT_ICONS_DST_NAME,$1,64)
    81   $1_TARGET64 := $(GENSRC_AWT_ICONS_DST)/$$($1_NAME64).java
    81   $1_TARGET64 := $(GENSRC_AWT_ICONS_DST)/$$($1_NAME64).java
    82 
    82 
    83   $$($1_TARGET32): $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir
    83   $$($1_TARGET32): $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir $(BUILD_TOOLS_JDK)
    84 	$(RM) $$@ $$@.tmp
    84 	$(RM) $$@ $$@.tmp
    85 	$(ECHO) "package sun.awt;" > $$@.tmp
    85 	$(ECHO) "package sun.awt;" > $$@.tmp
    86 	$(ECHO) "public class $$($1_NAME32) {" >> $$@.tmp
    86 	$(ECHO) "public class $$($1_NAME32) {" >> $$@.tmp
    87 	$(ECHO) "public static int[] $$($1_SHORTNAME) = { " >> $$@.tmp
    87 	$(ECHO) "public static int[] $$($1_SHORTNAME) = { " >> $$@.tmp
    88 	$(CAT) $$< | $(TOOL_AWT_TOBIN) >> $$@.tmp
    88 	$(CAT) $$< | $(TOOL_AWT_TOBIN) >> $$@.tmp
    89 	$(ECHO) "}; }" >> $$@.tmp
    89 	$(ECHO) "}; }" >> $$@.tmp
    90 	$(MV) $$@.tmp $$@
    90 	$(MV) $$@.tmp $$@
    91 
    91 
    92   GENSRC_AWT_ICONS += $$($1_TARGET32)
    92   GENSRC_AWT_ICONS += $$($1_TARGET32)
    93 
    93 
    94   $$($1_TARGET64): $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir
    94   $$($1_TARGET64): $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir $(BUILD_TOOLS_JDK)
    95 	$(RM) $$@ $$@.tmp
    95 	$(RM) $$@ $$@.tmp
    96 	$(ECHO) "package sun.awt;" > $$@.tmp
    96 	$(ECHO) "package sun.awt;" > $$@.tmp
    97 	$(ECHO) "public class $$($1_NAME64) {" >> $$@.tmp
    97 	$(ECHO) "public class $$($1_NAME64) {" >> $$@.tmp
    98 	$(ECHO) "public static long[] $$($1_SHORTNAME) = { " >> $$@.tmp
    98 	$(ECHO) "public static long[] $$($1_SHORTNAME) = { " >> $$@.tmp
    99 	$(CAT) $$< | $(TOOL_AWT_TOBIN) >> $$@.tmp
    99 	$(CAT) $$< | $(TOOL_AWT_TOBIN) >> $$@.tmp
   102 
   102 
   103   GENSRC_AWT_ICONS += $$($1_TARGET64)
   103   GENSRC_AWT_ICONS += $$($1_TARGET64)
   104 endef
   104 endef
   105 
   105 
   106 $(foreach I, $(GENSRC_AWT_ICONS_SRC), $(eval $(call SetupGensrcAWTIcon,$(notdir $(I)),$(dir $(I)))))
   106 $(foreach I, $(GENSRC_AWT_ICONS_SRC), $(eval $(call SetupGensrcAWTIcon,$(notdir $(I)),$(dir $(I)))))
       
   107 
       
   108 GENSRC_JAVA_DESKTOP += $(GENSRC_AWT_ICONS)
   107 
   109 
   108 ###
   110 ###
   109 
   111 
   110 ifeq ($(OPENJDK_TARGET_OS), macosx)
   112 ifeq ($(OPENJDK_TARGET_OS), macosx)
   111 
   113 
   116     GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/make/data/macosxicons/JavaApp.icns
   118     GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/make/data/macosxicons/JavaApp.icns
   117   else
   119   else
   118     GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/make/closed/data/macosxicons/JavaApp.icns
   120     GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/make/closed/data/macosxicons/JavaApp.icns
   119   endif
   121   endif
   120 
   122 
   121   $(GENSRC_OSX_ICONS): $(GENSRC_OSX_ICONS_SRC)
   123   $(GENSRC_OSX_ICONS): $(GENSRC_OSX_ICONS_SRC) $(BUILD_TOOLS_JDK)
   122 	$(RM) $@ $@.tmp
   124 	$(RM) $@ $@.tmp
   123 	$(MKDIR) -p $(dir $@)
   125 	$(MKDIR) -p $(dir $@)
   124 	$(ECHO) "static unsigned char sAWTIconData[] = { " >> $@.tmp
   126 	$(ECHO) "static unsigned char sAWTIconData[] = { " >> $@.tmp
   125 	$(CAT) $< | $(TOOL_OSX_TOBIN) >> $@.tmp
   127 	$(CAT) $< | $(TOOL_OSX_TOBIN) >> $@.tmp
   126 	$(ECHO) "};" >> $@.tmp
   128 	$(ECHO) "};" >> $@.tmp
   127 	$(MV) $@.tmp $@
   129 	$(MV) $@.tmp $@
   128 
   130 
       
   131   GENSRC_JAVA_DESKTOP += $(GENSRC_OSX_ICONS)
   129 endif
   132 endif