blob: 42417410e0cb4838e4f67b1ed352102eca528fc8 [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 := \
Jungshik Shindedeff62016-03-18 15:54:40 -070021 as/as \
Roozbeh Pournader68ce7802017-10-13 14:30:55 -070022 be/be \
Jungshik Shindedeff62016-03-18 15:54:40 -070023 bn/bn \
Roozbeh Pournaderff853262017-02-22 18:05:00 -080024 bg/bg \
25 cu/cu \
Jungshik Shindedeff62016-03-18 15:54:40 -070026 cy/cy \
27 da/da \
Roozbeh Pournader1cf34312015-12-13 15:25:15 -080028 de/de-1901 \
29 de/de-1996 \
30 de/de-ch-1901 \
Jungshik Shindedeff62016-03-18 15:54:40 -070031 en-GB/en-gb \
Roozbeh Pournader7104a912015-05-01 10:46:58 -070032 en-US/en-us \
Roozbeh Pournaderb6bdfb92015-12-02 12:16:10 -080033 es/es \
Jungshik Shindedeff62016-03-18 15:54:40 -070034 et/et \
35 eu/eu \
Roozbeh Pournader7104a912015-05-01 10:46:58 -070036 Ethi/und-ethi \
Jungshik Shindedeff62016-03-18 15:54:40 -070037 fr/fr \
38 ga/ga \
39 gu/gu \
40 hi/hi \
41 hr/hr \
Roozbeh Pournader7104a912015-05-01 10:46:58 -070042 hu/hu \
43 hy/hy \
Jungshik Shindedeff62016-03-18 15:54:40 -070044 kn/kn \
Roozbeh Pournader68ce7802017-10-13 14:30:55 -070045 la/la \
Jungshik Shindedeff62016-03-18 15:54:40 -070046 ml/ml \
47 mn/mn-cyrl \
48 mr/mr \
Roozbeh Pournader7104a912015-05-01 10:46:58 -070049 nb/nb \
Roozbeh Pournader1cf34312015-12-13 15:25:15 -080050 nn/nn \
Jungshik Shindedeff62016-03-18 15:54:40 -070051 or/or \
52 pa/pa \
53 pt/pt \
54 sl/sl \
55 ta/ta \
56 te/te \
57 tk/tk
Roozbeh Pournader01be41a2015-04-06 20:07:40 -070058
Raph Levien9c07dd32015-09-03 16:18:30 -070059# TODO: we have data for sa/sa, but it requires special case handling for case
60# folding and normalization, so don't build it until that's fixed.
Roozbeh Pournader68ce7802017-10-13 14:30:55 -070061#
62# TODO: we have data for Liturgical Latin, but there is no standard BCP 47 tag
63# for it, so we don't build it.
Roozbeh Pournader01be41a2015-04-06 20:07:40 -070064
Raph Levien9c07dd32015-09-03 16:18:30 -070065BUILD_HYB := $(LOCAL_PATH)/build-hyb.mk
Roozbeh Pournader7104a912015-05-01 10:46:58 -070066
Roozbeh Pournader01be41a2015-04-06 20:07:40 -070067#############################################################################
Raph Levien9c07dd32015-09-03 16:18:30 -070068# $(1): The subdirectory where the source files live.
69$ $(2): The file name fragment.
70# It is used to find source files, and also generate the resulting binary.
Roozbeh Pournader01be41a2015-04-06 20:07:40 -070071#############################################################################
72define build-one-pattern-module
73$(eval include $(CLEAR_VARS))\
Raph Levien9c07dd32015-09-03 16:18:30 -070074$(eval LOCAL_MODULE := $(addprefix hyph-, $(2)))\
75$(eval LOCAL_SRC_FILES := $(addprefix $(1)/hyph-, $(addprefix $(2), .pat.txt .chr.txt .hyp.txt)))\
76$(eval include $(BUILD_HYB))\
77$(eval include $(CLEAR_VARS))\
78$(eval LOCAL_MODULE := $(addprefix $(addprefix hyph-, $(2)), .lic.txt))\
79$(eval LOCAL_SRC_FILES := $(addprefix $(1)/hyph-, $(addprefix $(2), .lic.txt)))\
Roozbeh Pournader01be41a2015-04-06 20:07:40 -070080$(eval LOCAL_MODULE_CLASS := ETC)\
81$(eval LOCAL_MODULE_TAGS := optional)\
82$(eval LOCAL_MODULE_PATH := $(TARGET_OUT)/usr/hyphen-data)\
83$(eval include $(BUILD_PREBUILT))
84endef
85
Raph Levien9c07dd32015-09-03 16:18:30 -070086$(foreach l, $(pattern_locales), $(call build-one-pattern-module, $(dir $(l)), $(notdir $l)))
Roozbeh Pournader01be41a2015-04-06 20:07:40 -070087build-one-pattern-module :=
Raph Levien9c07dd32015-09-03 16:18:30 -070088pattern_locales :=
Keun-young Park5ef5cc02016-01-29 12:17:48 -080089
90endif #TARGET_BUILD_PDK