blob: 9535e040ff72c9a20f2b6a4e8beb6a40749696bd [file] [log] [blame]
Roozbeh Pournader01be41a2015-04-06 20:07:40 -07001# Copyright (C) 2015 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
Keun-young Park5ef5cc02016-01-29 12:17:48 -080015#disable build in PDK
16ifneq ($(TARGET_BUILD_PDK),true)
17
Raph Levien9c07dd32015-09-03 16:18:30 -070018LOCAL_PATH := $(call my-dir)
Roozbeh Pournader01be41a2015-04-06 20:07:40 -070019
Roozbeh Pournader7104a912015-05-01 10:46:58 -070020pattern_locales := \
Calvin Pan638add32021-12-13 23:47:13 +080021 af/af \
Calvin Pan2705f4e2021-10-13 11:02:28 +080022 am/mul-ethi \
Jungshik Shindedeff62016-03-18 15:54:40 -070023 as/as \
Roozbeh Pournader68ce7802017-10-13 14:30:55 -070024 be/be \
Jungshik Shindedeff62016-03-18 15:54:40 -070025 bn/bn \
Roozbeh Pournaderff853262017-02-22 18:05:00 -080026 bg/bg \
Calvin Pan638add32021-12-13 23:47:13 +080027 cs/cs \
Roozbeh Pournaderff853262017-02-22 18:05:00 -080028 cu/cu \
Jungshik Shindedeff62016-03-18 15:54:40 -070029 cy/cy \
30 da/da \
Roozbeh Pournader1cf34312015-12-13 15:25:15 -080031 de/de-1901 \
32 de/de-1996 \
33 de/de-ch-1901 \
Calvin Pan638add32021-12-13 23:47:13 +080034 el/el \
Jungshik Shindedeff62016-03-18 15:54:40 -070035 en-GB/en-gb \
Roozbeh Pournader7104a912015-05-01 10:46:58 -070036 en-US/en-us \
Roozbeh Pournaderb6bdfb92015-12-02 12:16:10 -080037 es/es \
Jungshik Shindedeff62016-03-18 15:54:40 -070038 et/et \
39 eu/eu \
Roozbeh Pournader7104a912015-05-01 10:46:58 -070040 Ethi/und-ethi \
Jungshik Shindedeff62016-03-18 15:54:40 -070041 fr/fr \
42 ga/ga \
Calvin Pan2705f4e2021-10-13 11:02:28 +080043 gl/gl \
Jungshik Shindedeff62016-03-18 15:54:40 -070044 gu/gu \
45 hi/hi \
46 hr/hr \
Roozbeh Pournader7104a912015-05-01 10:46:58 -070047 hu/hu \
48 hy/hy \
Calvin Pan2705f4e2021-10-13 11:02:28 +080049 it/it \
Calvin Pan638add32021-12-13 23:47:13 +080050 ka/ka \
Jungshik Shindedeff62016-03-18 15:54:40 -070051 kn/kn \
Roozbeh Pournader68ce7802017-10-13 14:30:55 -070052 la/la \
Calvin Pan2705f4e2021-10-13 11:02:28 +080053 lt/lt \
Calvin Pan638add32021-12-13 23:47:13 +080054 lv/lv \
Jungshik Shindedeff62016-03-18 15:54:40 -070055 ml/ml \
56 mn/mn-cyrl \
57 mr/mr \
Roozbeh Pournader7104a912015-05-01 10:46:58 -070058 nb/nb \
Calvin Pan638add32021-12-13 23:47:13 +080059 nl/nl \
Roozbeh Pournader1cf34312015-12-13 15:25:15 -080060 nn/nn \
Jungshik Shindedeff62016-03-18 15:54:40 -070061 or/or \
62 pa/pa \
63 pt/pt \
Calvin Pan5722d842022-01-21 16:43:52 +080064 ru/ru \
Calvin Pan638add32021-12-13 23:47:13 +080065 sk/sk \
Jungshik Shindedeff62016-03-18 15:54:40 -070066 sl/sl \
Calvin Pan638add32021-12-13 23:47:13 +080067 sq/sq \
Calvin Pan1511bca2022-01-12 16:14:19 +080068 sv/sv \
Jungshik Shindedeff62016-03-18 15:54:40 -070069 ta/ta \
70 te/te \
Calvin Pan2705f4e2021-10-13 11:02:28 +080071 tk/tk \
72 uk/uk
Roozbeh Pournader01be41a2015-04-06 20:07:40 -070073
Raph Levien9c07dd32015-09-03 16:18:30 -070074# TODO: we have data for sa/sa, but it requires special case handling for case
75# folding and normalization, so don't build it until that's fixed.
Roozbeh Pournader68ce7802017-10-13 14:30:55 -070076#
77# TODO: we have data for Liturgical Latin, but there is no standard BCP 47 tag
78# for it, so we don't build it.
Roozbeh Pournader01be41a2015-04-06 20:07:40 -070079
Raph Levien9c07dd32015-09-03 16:18:30 -070080BUILD_HYB := $(LOCAL_PATH)/build-hyb.mk
Roozbeh Pournader7104a912015-05-01 10:46:58 -070081
Roozbeh Pournader01be41a2015-04-06 20:07:40 -070082#############################################################################
Raph Levien9c07dd32015-09-03 16:18:30 -070083# $(1): The subdirectory where the source files live.
84$ $(2): The file name fragment.
85# It is used to find source files, and also generate the resulting binary.
Roozbeh Pournader01be41a2015-04-06 20:07:40 -070086#############################################################################
87define build-one-pattern-module
88$(eval include $(CLEAR_VARS))\
Raph Levien9c07dd32015-09-03 16:18:30 -070089$(eval LOCAL_MODULE := $(addprefix hyph-, $(2)))\
90$(eval LOCAL_SRC_FILES := $(addprefix $(1)/hyph-, $(addprefix $(2), .pat.txt .chr.txt .hyp.txt)))\
Bob Badourc0693dd2022-02-25 19:42:46 -080091$(eval LOCAL_LICENSE_KINDS := SPDX-license-identifier-MIT SPDX-license-identifier-BSD-3-Clause SPDX-license-identifier-FSFAP SPDX-license-identifier-Unicode-DFS SPDX-license-identifier-LGPL-2.1 SPDX-license-identifier-MPL)\
92$(eval LOCAL_LICENSE_CONDITIONS := notice reciprocal restricted)\
93$(eval LOCAL_NOTICE_FILE := $(wildcard $(addprefix $(LOCAL_PATH)/$(1), /NOTICE /LICENSE)))\
Raph Levien9c07dd32015-09-03 16:18:30 -070094$(eval include $(BUILD_HYB))\
95$(eval include $(CLEAR_VARS))\
96$(eval LOCAL_MODULE := $(addprefix $(addprefix hyph-, $(2)), .lic.txt))\
97$(eval LOCAL_SRC_FILES := $(addprefix $(1)/hyph-, $(addprefix $(2), .lic.txt)))\
Roozbeh Pournader01be41a2015-04-06 20:07:40 -070098$(eval LOCAL_MODULE_CLASS := ETC)\
99$(eval LOCAL_MODULE_TAGS := optional)\
100$(eval LOCAL_MODULE_PATH := $(TARGET_OUT)/usr/hyphen-data)\
101$(eval include $(BUILD_PREBUILT))
102endef
103
Bob Badourc0693dd2022-02-25 19:42:46 -0800104$(foreach l, $(pattern_locales), $(call build-one-pattern-module,$(dir $(l)),$(notdir $l)))
Roozbeh Pournader01be41a2015-04-06 20:07:40 -0700105build-one-pattern-module :=
Raph Levien9c07dd32015-09-03 16:18:30 -0700106pattern_locales :=
Keun-young Park5ef5cc02016-01-29 12:17:48 -0800107
108endif #TARGET_BUILD_PDK