author | ihse |
Thu, 10 Oct 2013 14:58:04 +0200 | |
changeset 20623 | cb61ea12e375 |
parent 18241 | 3e009b5be123 |
child 20547 | 453837141fac |
permissions | -rw-r--r-- |
12892 | 1 |
# |
18241 | 2 |
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
12892 | 3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
# |
|
5 |
# This code is free software; you can redistribute it and/or modify it |
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
|
7 |
# published by the Free Software Foundation. Oracle designates this |
|
8 |
# particular file as subject to the "Classpath" exception as provided |
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
|
10 |
# |
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
24 |
# |
|
25 |
||
18241 | 26 |
GENSRC_AWT_ICONS := |
27 |
GENSRC_AWT_ICONS_SRC := |
|
28 |
GENSRC_AWT_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc |
|
29 |
GENSRC_AWT_ICONS_DST := $(GENSRC_AWT_ICONS_TMP)/sun/awt/ |
|
12892 | 30 |
|
31 |
ifdef OPENJDK |
|
14231 | 32 |
X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR) |
12892 | 33 |
else |
14231 | 34 |
X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/solaris |
12892 | 35 |
endif |
36 |
||
18241 | 37 |
GENSRC_AWT_ICONS_SRC += \ |
14231 | 38 |
$(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.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 \ |
|
41 |
$(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png |
|
12892 | 42 |
|
43 |
||
18241 | 44 |
AWT_ICONPATH := $(JDK_TOPDIR)/src/share/classes/sun/awt/resources |
12892 | 45 |
|
18241 | 46 |
GENSRC_AWT_ICONS_SRC += \ |
47 |
$(AWT_ICONPATH)/security-icon-bw16.png \ |
|
48 |
$(AWT_ICONPATH)/security-icon-interim16.png \ |
|
49 |
$(AWT_ICONPATH)/security-icon-yellow16.png \ |
|
50 |
$(AWT_ICONPATH)/security-icon-bw24.png \ |
|
51 |
$(AWT_ICONPATH)/security-icon-interim24.png \ |
|
52 |
$(AWT_ICONPATH)/security-icon-yellow24.png \ |
|
53 |
$(AWT_ICONPATH)/security-icon-bw32.png \ |
|
54 |
$(AWT_ICONPATH)/security-icon-interim32.png \ |
|
55 |
$(AWT_ICONPATH)/security-icon-yellow32.png \ |
|
56 |
$(AWT_ICONPATH)/security-icon-bw48.png \ |
|
57 |
$(AWT_ICONPATH)/security-icon-interim48.png \ |
|
58 |
$(AWT_ICONPATH)/security-icon-yellow48.png |
|
12892 | 59 |
|
18241 | 60 |
GENSRC_AWT_ICONS_FILES := $(notdir $(GENSRC_AWT_ICONS_SRC)) |
12892 | 61 |
|
18241 | 62 |
GENSRC_AWT_ICONS_SHORT_NAME = $(subst .,_,$(subst -,_,$(1))) |
63 |
GENSRC_AWT_ICONS_DST_NAME = AWTIcon$(2)_$(subst .,_,$(subst -,_,$(1))) |
|
12892 | 64 |
|
65 |
### |
|
66 |
||
18241 | 67 |
$(GENSRC_AWT_ICONS_TMP)/_the.icons.dir : |
12892 | 68 |
$(ECHO) Generating icon classes |
18241 | 69 |
$(MKDIR) -p $(GENSRC_AWT_ICONS_DST) |
12892 | 70 |
$(TOUCH) $@ |
71 |
||
72 |
### |
|
73 |
||
18241 | 74 |
define SetupGensrcAWTIcon |
12892 | 75 |
# param 1 is for src-file |
76 |
# param 2 is for src-dir |
|
18241 | 77 |
$1_SHORTNAME := $(call GENSRC_AWT_ICONS_SHORT_NAME,$1) |
78 |
$1_NAME32 := $(call GENSRC_AWT_ICONS_DST_NAME,$1,32) |
|
79 |
$1_TARGET32 := $(GENSRC_AWT_ICONS_DST)/$$($1_NAME32).java |
|
80 |
$1_NAME64 := $(call GENSRC_AWT_ICONS_DST_NAME,$1,64) |
|
81 |
$1_TARGET64 := $(GENSRC_AWT_ICONS_DST)/$$($1_NAME64).java |
|
12892 | 82 |
|
18241 | 83 |
$$($1_TARGET32) : $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir |
12892 | 84 |
$(RM) $$@ $$@.tmp |
18241 | 85 |
$(ECHO) "package sun.awt;" > $$@.tmp |
12892 | 86 |
$(ECHO) "public class $$($1_NAME32) {" >> $$@.tmp |
87 |
$(ECHO) "public static int[] $$($1_SHORTNAME) = { " >> $$@.tmp |
|
18241 | 88 |
$(CAT) $$< | $(TOOL_AWT_TOBIN) >> $$@.tmp |
12892 | 89 |
$(ECHO) "}; }" >> $$@.tmp |
90 |
$(MV) $$@.tmp $$@ |
|
91 |
||
18241 | 92 |
GENSRC_AWT_ICONS += $$($1_TARGET32) |
12892 | 93 |
|
18241 | 94 |
$$($1_TARGET64) : $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir |
12892 | 95 |
$(RM) $$@ $$@.tmp |
18241 | 96 |
$(ECHO) "package sun.awt;" > $$@.tmp |
12892 | 97 |
$(ECHO) "public class $$($1_NAME64) {" >> $$@.tmp |
98 |
$(ECHO) "public static long[] $$($1_SHORTNAME) = { " >> $$@.tmp |
|
18241 | 99 |
$(CAT) $$< | $(TOOL_AWT_TOBIN) >> $$@.tmp |
12892 | 100 |
$(ECHO) "}; }" >> $$@.tmp |
101 |
$(MV) $$@.tmp $$@ |
|
102 |
||
18241 | 103 |
GENSRC_AWT_ICONS += $$($1_TARGET64) |
12892 | 104 |
endef |
105 |
||
18241 | 106 |
$(foreach I,$(GENSRC_AWT_ICONS_SRC), $(eval $(call SetupGensrcAWTIcon,$(notdir $(I)),$(dir $(I))))) |
14231 | 107 |
|
108 |
### |
|
109 |
||
110 |
ifeq ($(OPENJDK_TARGET_OS),macosx) |
|
111 |
||
14429
f930c8da4439
8001965: build-infra: Large compare diffs between new and old on mac
tbell
parents:
14231
diff
changeset
|
112 |
GENSRC_OSX_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc |
f930c8da4439
8001965: build-infra: Large compare diffs between new and old on mac
tbell
parents:
14231
diff
changeset
|
113 |
GENSRC_OSX_ICONS_DST := $(GENSRC_OSX_ICONS_TMP)/sun/osxapp |
f930c8da4439
8001965: build-infra: Large compare diffs between new and old on mac
tbell
parents:
14231
diff
changeset
|
114 |
GENSRC_OSX_ICONS := $(GENSRC_OSX_ICONS_DST)/AWTIconData.h |
f930c8da4439
8001965: build-infra: Large compare diffs between new and old on mac
tbell
parents:
14231
diff
changeset
|
115 |
|
f930c8da4439
8001965: build-infra: Large compare diffs between new and old on mac
tbell
parents:
14231
diff
changeset
|
116 |
ifdef OPENJDK |
f930c8da4439
8001965: build-infra: Large compare diffs between new and old on mac
tbell
parents:
14231
diff
changeset
|
117 |
GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/src/macosx/native/sun/osxapp/resource/icons/JavaApp.icns |
f930c8da4439
8001965: build-infra: Large compare diffs between new and old on mac
tbell
parents:
14231
diff
changeset
|
118 |
else |
f930c8da4439
8001965: build-infra: Large compare diffs between new and old on mac
tbell
parents:
14231
diff
changeset
|
119 |
GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/src/closed/macosx/native/sun/osxapp/resource/icons/JavaApp.icns |
f930c8da4439
8001965: build-infra: Large compare diffs between new and old on mac
tbell
parents:
14231
diff
changeset
|
120 |
endif |
f930c8da4439
8001965: build-infra: Large compare diffs between new and old on mac
tbell
parents:
14231
diff
changeset
|
121 |
|
f930c8da4439
8001965: build-infra: Large compare diffs between new and old on mac
tbell
parents:
14231
diff
changeset
|
122 |
$(GENSRC_OSX_ICONS_DST)/AWTIconData.h: $(GENSRC_OSX_ICONS_SRC) |
14231 | 123 |
$(RM) $@ $@.tmp |
124 |
$(MKDIR) -p $(dir $@) |
|
125 |
$(ECHO) "static unsigned char sAWTIconData[] = { " >> $@.tmp |
|
126 |
$(CAT) $< | $(TOOL_OSX_TOBIN) >> $@.tmp |
|
127 |
$(ECHO) "};" >> $@.tmp |
|
128 |
$(MV) $@.tmp $@ |
|
129 |
||
130 |
endif |
|
131 |