1 #
2 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
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
72 # Fill in the languages and package names
73 SED_BASEARGS += -e 's/$(HASH)Lang$(HASH)/Base/' \
74 -e 's/$(HASH)Package$(HASH)/sun.util.locale.provider/'
75 SED_NONBASEARGS += -e 's/$(HASH)Lang$(HASH)/NonBase/' \
76 -e 's/$(HASH)Package$(HASH)/sun.util.resources.provider/'
77
78 # This macro creates a sed expression that substitues for example:
79 # #FormatData_Locales# with: en-US locales.
80 define CaptureLocale
81 $1_LOCALES := $$(subst _,-,$$(filter-out $1, $$(subst $1_,,$$(filter $1_%, $(LOCALE_RESOURCES)))))
82 $1_BASE_LOCALES := $$(filter $(BASE_LOCALES), $$($1_LOCALES))
83 $1_NON_BASE_LOCALES := $$(filter-out $(BASE_LOCALES), $$($1_LOCALES))
84
85 # Special handling for Chinese locales to include implicit scripts
86 $1_NON_BASE_LOCALES := $$(subst zh-CN,zh-CN$$(SPACE)zh-Hans-CN, $$($1_NON_BASE_LOCALES))
87 $1_NON_BASE_LOCALES := $$(subst zh-SG,zh-SG$$(SPACE)zh-Hans-SG, $$($1_NON_BASE_LOCALES))
88 $1_NON_BASE_LOCALES := $$(subst zh-HK,zh-HK$$(SPACE)zh-Hant-HK, $$($1_NON_BASE_LOCALES))
89 $1_NON_BASE_LOCALES := $$(subst zh-MO,zh-MO$$(SPACE)zh-Hant-MO, $$($1_NON_BASE_LOCALES))
90 $1_NON_BASE_LOCALES := $$(subst zh-TW,zh-TW$$(SPACE)zh-Hant-TW, $$($1_NON_BASE_LOCALES))
91
92 # Adding implict locales nn-NO and nb-NO
93 $1_NON_BASE_LOCALES += nn-NO nb-NO
94 $1_NON_BASE_LOCALES := $$(sort $$($1_NON_BASE_LOCALES))
95
96 ALL_BASE_LOCALES += $$($1_BASE_LOCALES)
97 ALL_NON_BASE_LOCALES += $$($1_NON_BASE_LOCALES)
98
99 # Don't sed in a space if there are no locales.
100 SED_BASEARGS += -e 's/$$(HASH)$1_Locales$$(HASH)/$$(if $$($1_BASE_LOCALES),$$(SPACE)$$($1_BASE_LOCALES),)/g'
101 SED_NONBASEARGS += -e 's/$$(HASH)$1_Locales$$(HASH)/$$(if $$($1_NON_BASE_LOCALES),$$(SPACE)$$($1_NON_BASE_LOCALES),)/g'
102 endef
103
104 #sun.text.resources.FormatData
105 $(eval $(call CaptureLocale,FormatData))
106
107 #sun.text.resources.CollationData
108 $(eval $(call CaptureLocale,CollationData))
109
110 #sun.text.resources.BreakIteratorInfo
111 $(eval $(call CaptureLocale,BreakIteratorInfo))
112
113 #sun.text.resources.BreakIteratorRules
|
1 #
2 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
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
72 # Fill in the languages and package names
73 SED_BASEARGS += -e 's/$(HASH)Lang$(HASH)/Base/' \
74 -e 's/$(HASH)Package$(HASH)/sun.util.locale.provider/'
75 SED_NONBASEARGS += -e 's/$(HASH)Lang$(HASH)/NonBase/' \
76 -e 's/$(HASH)Package$(HASH)/sun.util.resources.provider/'
77
78 # This macro creates a sed expression that substitues for example:
79 # #FormatData_Locales# with: en-US locales.
80 define CaptureLocale
81 $1_LOCALES := $$(subst _,-,$$(filter-out $1, $$(subst $1_,,$$(filter $1_%, $(LOCALE_RESOURCES)))))
82 $1_BASE_LOCALES := $$(filter $(BASE_LOCALES), $$($1_LOCALES))
83 $1_NON_BASE_LOCALES := $$(filter-out $(BASE_LOCALES), $$($1_LOCALES))
84
85 # Special handling for Chinese locales to include implicit scripts
86 $1_NON_BASE_LOCALES := $$(subst zh-CN,zh-CN$$(SPACE)zh-Hans-CN, $$($1_NON_BASE_LOCALES))
87 $1_NON_BASE_LOCALES := $$(subst zh-SG,zh-SG$$(SPACE)zh-Hans-SG, $$($1_NON_BASE_LOCALES))
88 $1_NON_BASE_LOCALES := $$(subst zh-HK,zh-HK$$(SPACE)zh-Hant-HK, $$($1_NON_BASE_LOCALES))
89 $1_NON_BASE_LOCALES := $$(subst zh-MO,zh-MO$$(SPACE)zh-Hant-MO, $$($1_NON_BASE_LOCALES))
90 $1_NON_BASE_LOCALES := $$(subst zh-TW,zh-TW$$(SPACE)zh-Hant-TW, $$($1_NON_BASE_LOCALES))
91
92 # Adding implict locales nb nn-NO and nb-NO
93 $1_NON_BASE_LOCALES += nb nn-NO nb-NO
94 $1_NON_BASE_LOCALES := $$(sort $$($1_NON_BASE_LOCALES))
95
96 ALL_BASE_LOCALES += $$($1_BASE_LOCALES)
97 ALL_NON_BASE_LOCALES += $$($1_NON_BASE_LOCALES)
98
99 # Don't sed in a space if there are no locales.
100 SED_BASEARGS += -e 's/$$(HASH)$1_Locales$$(HASH)/$$(if $$($1_BASE_LOCALES),$$(SPACE)$$($1_BASE_LOCALES),)/g'
101 SED_NONBASEARGS += -e 's/$$(HASH)$1_Locales$$(HASH)/$$(if $$($1_NON_BASE_LOCALES),$$(SPACE)$$($1_NON_BASE_LOCALES),)/g'
102 endef
103
104 #sun.text.resources.FormatData
105 $(eval $(call CaptureLocale,FormatData))
106
107 #sun.text.resources.CollationData
108 $(eval $(call CaptureLocale,CollationData))
109
110 #sun.text.resources.BreakIteratorInfo
111 $(eval $(call CaptureLocale,BreakIteratorInfo))
112
113 #sun.text.resources.BreakIteratorRules
|