blob: 5ac2425f9af5d63e62f8e967cb1e4936fb9d3bf3 [file] [log] [blame]
erikje78df742012-06-07 20:40:50 -07001#
simonis57366f62013-11-08 18:17:06 +01002# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
erikje78df742012-06-07 20:40:50 -07003# 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
26GENDATA_FONT_CONFIG_DST := $(JDK_OUTPUTDIR)/lib
27
erikjaf85fc42012-07-03 16:10:44 -070028ifeq ($(OPENJDK_TARGET_OS), windows)
ihsea29e6222013-10-10 15:06:21 +020029 GENDATA_FONT_CONFIG_SRC_DIR := $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows
30 GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
31 GENDATA_FONT_CONFIG_SRC_PREFIX :=
erikje78df742012-06-07 20:40:50 -070032endif
33
erikjaf85fc42012-07-03 16:10:44 -070034ifeq ($(OPENJDK_TARGET_OS), linux)
ohair46fcac92012-09-18 11:29:24 -070035 GENDATA_FONT_CONFIG_SRC_PREFIX := linux.
36 ifdef OPENJDK
ihsea29e6222013-10-10 15:06:21 +020037 GENDATA_FONT_CONFIG_SRC_DIR := \
ohair46fcac92012-09-18 11:29:24 -070038 $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
andrewcce11712013-05-30 16:50:31 +010039 # This is placeholder for possible fonconfig files which may
ihsea29e6222013-10-10 15:06:21 +020040 # useful for some highly specialized Linux distributions
Alexey Ushakov18f52ca2016-10-05 15:29:21 +030041 GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
42 GENDATA_FONT_CONFIG_SRC_PREFIX := linux.
ohair46fcac92012-09-18 11:29:24 -070043 else
ihsea29e6222013-10-10 15:06:21 +020044 GENDATA_FONT_CONFIG_SRC_DIR := \
ohair46fcac92012-09-18 11:29:24 -070045 $(JDK_TOPDIR)/src/closed/solaris/classes/sun/awt/fontconfigs
46 GENDATA_FONT_CONFIG_SRC_FILES := \
ihsea29e6222013-10-10 15:06:21 +020047 fontconfig.properties \
48 fontconfig.RedHat.5.properties \
49 fontconfig.RedHat.6.properties \
50 fontconfig.Turbo.properties \
51 fontconfig.SuSE.10.properties \
52 fontconfig.SuSE.11.properties
ohair46fcac92012-09-18 11:29:24 -070053 endif
erikje78df742012-06-07 20:40:50 -070054endif
55
erikjaf85fc42012-07-03 16:10:44 -070056ifeq ($(OPENJDK_TARGET_OS), solaris)
ihsea29e6222013-10-10 15:06:21 +020057 GENDATA_FONT_CONFIG_SRC_DIR := \
ohair46fcac92012-09-18 11:29:24 -070058 $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
ihsea29e6222013-10-10 15:06:21 +020059 GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
ohair46fcac92012-09-18 11:29:24 -070060 GENDATA_FONT_CONFIG_SRC_PREFIX := solaris.
erikje78df742012-06-07 20:40:50 -070061endif
62
erikjaf85fc42012-07-03 16:10:44 -070063ifeq ($(OPENJDK_TARGET_OS), macosx)
ihsea29e6222013-10-10 15:06:21 +020064 GENDATA_FONT_CONFIG_SRC_DIR := \
ohair46fcac92012-09-18 11:29:24 -070065 $(JDK_TOPDIR)/src/macosx/classes/sun/awt/fontconfigs
ihsea29e6222013-10-10 15:06:21 +020066 GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
ohair46fcac92012-09-18 11:29:24 -070067 GENDATA_FONT_CONFIG_SRC_PREFIX := macosx.
68endif
erikje78df742012-06-07 20:40:50 -070069
simonis1321a6c2013-09-17 14:48:14 +020070ifeq ($(OPENJDK_TARGET_OS), aix)
71 GENDATA_FONT_CONFIG_SRC_DIR := \
simonis57366f62013-11-08 18:17:06 +010072 $(JDK_TOPDIR)/src/aix/classes/sun/awt/fontconfigs
simonis1321a6c2013-09-17 14:48:14 +020073 GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
74 GENDATA_FONT_CONFIG_SRC_PREFIX := aix.
75endif
76
erikje78df742012-06-07 20:40:50 -070077###
78
ihsea29e6222013-10-10 15:06:21 +020079$(GENDATA_FONT_CONFIG_DST)/%.src: \
ohair46fcac92012-09-18 11:29:24 -070080 $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%
erikj10d96fb2013-04-05 09:39:10 +020081 $(call install-file)
erikje78df742012-06-07 20:40:50 -070082
ihsea29e6222013-10-10 15:06:21 +020083$(GENDATA_FONT_CONFIG_DST)/%.bfc: \
ohair46fcac92012-09-18 11:29:24 -070084 $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%.properties
erikje78df742012-06-07 20:40:50 -070085 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -070086 $(RM) $@
erikje78df742012-06-07 20:40:50 -070087 $(TOOL_COMPILEFONTCONFIG) $< $@
erikjaf85fc42012-07-03 16:10:44 -070088 $(CHMOD) 444 $@
erikje78df742012-06-07 20:40:50 -070089
90###
91
92GENDATA_FONT_CONFIGS := $(GENDATA_FONT_CONFIG_SRC_FILES:%=$(GENDATA_FONT_CONFIG_DST)/%.src)
93GENDATA_BFONT_CONFIGS := $(GENDATA_FONT_CONFIG_SRC_FILES:%.properties=$(GENDATA_FONT_CONFIG_DST)/%.bfc)
94
95GENDATA_FONT_CONFIG := $(GENDATA_FONT_CONFIGS) $(GENDATA_BFONT_CONFIGS)
96
97###