jdk/makefiles/GensrcIcons.gmk
author sundar
Mon, 13 May 2013 22:23:17 +0530
changeset 17460 19eb5d62770a
parent 14429 f930c8da4439
child 18241 3e009b5be123
permissions -rw-r--r--
8012975: Remove rhino from jdk8 Reviewed-by: alanb, tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     1
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     2
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     4
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    10
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    15
# accompanied this code).
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    16
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    20
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    23
# questions.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    24
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    25
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    26
GENSRC_X11_ICONS :=
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    27
GENSRC_X11_ICONS_SRC :=
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    28
GENSRC_X11_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    29
GENSRC_X11_ICONS_DST := $(GENSRC_X11_ICONS_TMP)/sun/awt/X11
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    30
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    31
ifdef OPENJDK
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    32
  X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    33
else
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    34
  X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/solaris
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    35
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    36
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    37
GENSRC_X11_ICONS_SRC += \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    38
    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    39
    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    40
    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    41
    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    42
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    43
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    44
X11_ICONPATH := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/awt/X11
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    45
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    46
GENSRC_X11_ICONS_SRC += \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    47
   $(X11_ICONPATH)/security-icon-bw16.png \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    48
   $(X11_ICONPATH)/security-icon-interim16.png \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    49
   $(X11_ICONPATH)/security-icon-yellow16.png \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    50
   $(X11_ICONPATH)/security-icon-bw24.png \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    51
   $(X11_ICONPATH)/security-icon-interim24.png \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    52
   $(X11_ICONPATH)/security-icon-yellow24.png \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    53
   $(X11_ICONPATH)/security-icon-bw32.png \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    54
   $(X11_ICONPATH)/security-icon-interim32.png \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    55
   $(X11_ICONPATH)/security-icon-yellow32.png \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    56
   $(X11_ICONPATH)/security-icon-bw48.png \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    57
   $(X11_ICONPATH)/security-icon-interim48.png \
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    58
   $(X11_ICONPATH)/security-icon-yellow48.png
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    59
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    60
GENSRC_X11_ICONS_FILES := $(notdir $(GENSRC_X11_ICONS_SRC))
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    61
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    62
GENSRC_X11_ICONS_SHORT_NAME = $(subst .,_,$(subst -,_,$(1)))
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    63
GENSRC_X11_ICONS_DST_NAME = XAWTIcon$(2)_$(subst .,_,$(subst -,_,$(1)))
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    64
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    65
###
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    66
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    67
$(GENSRC_X11_ICONS_TMP)/_the.icons.dir :
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    68
	$(ECHO) Generating icon classes
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    69
	$(MKDIR) -p $(GENSRC_X11_ICONS_DST)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    70
	$(TOUCH) $@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    71
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    72
###
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    73
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    74
define SetupGensrcX11Icon
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    75
        # param 1 is for src-file
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    76
        # param 2 is for src-dir
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    77
	$1_SHORTNAME := $(call GENSRC_X11_ICONS_SHORT_NAME,$1)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    78
	$1_NAME32 := $(call GENSRC_X11_ICONS_DST_NAME,$1,32)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    79
	$1_TARGET32 := $(GENSRC_X11_ICONS_DST)/$$($1_NAME32).java
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    80
	$1_NAME64 := $(call GENSRC_X11_ICONS_DST_NAME,$1,64)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    81
	$1_TARGET64 := $(GENSRC_X11_ICONS_DST)/$$($1_NAME64).java
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    82
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    83
$$($1_TARGET32) : $2/$1 $(GENSRC_X11_ICONS_TMP)/_the.icons.dir
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    84
	$(RM) $$@ $$@.tmp
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    85
	$(ECHO) "package sun.awt.X11;" > $$@.tmp
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    86
	$(ECHO) "public class $$($1_NAME32) {" >> $$@.tmp
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    87
	$(ECHO) "public static int[] $$($1_SHORTNAME) = { " >> $$@.tmp
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    88
	$(CAT) $$< | $(TOOL_X11_TOBIN) >> $$@.tmp
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    89
	$(ECHO) "}; }" >> $$@.tmp
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    90
	$(MV) $$@.tmp $$@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    91
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    92
GENSRC_X11_ICONS += $$($1_TARGET32)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    93
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    94
$$($1_TARGET64) : $2/$1 $(GENSRC_X11_ICONS_TMP)/_the.icons.dir
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    95
	$(RM) $$@ $$@.tmp
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    96
	$(ECHO) "package sun.awt.X11;" > $$@.tmp
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    97
	$(ECHO) "public class $$($1_NAME64) {" >> $$@.tmp
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    98
	$(ECHO) "public static long[] $$($1_SHORTNAME) = { " >> $$@.tmp
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    99
	$(CAT) $$< | $(TOOL_X11_TOBIN) >> $$@.tmp
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   100
	$(ECHO) "}; }" >> $$@.tmp
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   101
	$(MV) $$@.tmp $$@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   102
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   103
GENSRC_X11_ICONS += $$($1_TARGET64)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   104
endef
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   105
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   106
$(foreach I,$(GENSRC_X11_ICONS_SRC), $(eval $(call SetupGensrcX11Icon,$(notdir $(I)),$(dir $(I)))))
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   107
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   108
###
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   109
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   110
ifeq ($(OPENJDK_TARGET_OS),macosx)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   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
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   123
	$(RM) $@ $@.tmp
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   124
	$(MKDIR) -p $(dir $@)
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   125
	$(ECHO) "static unsigned char sAWTIconData[] = { " >> $@.tmp
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   126
	$(CAT) $< | $(TOOL_OSX_TOBIN) >> $@.tmp
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   127
	$(ECHO) "};" >> $@.tmp
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   128
	$(MV) $@.tmp $@
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   129
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   130
endif
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   131