Roozbeh Pournader | 01be41a | 2015-04-06 20:07:40 -0700 | [diff] [blame] | 1 | # 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 Park | 5ef5cc0 | 2016-01-29 12:17:48 -0800 | [diff] [blame] | 15 | #disable build in PDK |
| 16 | ifneq ($(TARGET_BUILD_PDK),true) |
| 17 | |
Raph Levien | 9c07dd3 | 2015-09-03 16:18:30 -0700 | [diff] [blame] | 18 | LOCAL_PATH := $(call my-dir) |
Roozbeh Pournader | 01be41a | 2015-04-06 20:07:40 -0700 | [diff] [blame] | 19 | |
Roozbeh Pournader | 7104a91 | 2015-05-01 10:46:58 -0700 | [diff] [blame] | 20 | pattern_locales := \ |
Calvin Pan | 638add3 | 2021-12-13 23:47:13 +0800 | [diff] [blame] | 21 | af/af \ |
Calvin Pan | 2705f4e | 2021-10-13 11:02:28 +0800 | [diff] [blame] | 22 | am/mul-ethi \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 23 | as/as \ |
Roozbeh Pournader | 68ce780 | 2017-10-13 14:30:55 -0700 | [diff] [blame] | 24 | be/be \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 25 | bn/bn \ |
Roozbeh Pournader | ff85326 | 2017-02-22 18:05:00 -0800 | [diff] [blame] | 26 | bg/bg \ |
Calvin Pan | 638add3 | 2021-12-13 23:47:13 +0800 | [diff] [blame] | 27 | cs/cs \ |
Roozbeh Pournader | ff85326 | 2017-02-22 18:05:00 -0800 | [diff] [blame] | 28 | cu/cu \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 29 | cy/cy \ |
| 30 | da/da \ |
Roozbeh Pournader | 1cf3431 | 2015-12-13 15:25:15 -0800 | [diff] [blame] | 31 | de/de-1901 \ |
| 32 | de/de-1996 \ |
| 33 | de/de-ch-1901 \ |
Calvin Pan | 638add3 | 2021-12-13 23:47:13 +0800 | [diff] [blame] | 34 | el/el \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 35 | en-GB/en-gb \ |
Roozbeh Pournader | 7104a91 | 2015-05-01 10:46:58 -0700 | [diff] [blame] | 36 | en-US/en-us \ |
Roozbeh Pournader | b6bdfb9 | 2015-12-02 12:16:10 -0800 | [diff] [blame] | 37 | es/es \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 38 | et/et \ |
| 39 | eu/eu \ |
Roozbeh Pournader | 7104a91 | 2015-05-01 10:46:58 -0700 | [diff] [blame] | 40 | Ethi/und-ethi \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 41 | fr/fr \ |
| 42 | ga/ga \ |
Calvin Pan | 2705f4e | 2021-10-13 11:02:28 +0800 | [diff] [blame] | 43 | gl/gl \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 44 | gu/gu \ |
| 45 | hi/hi \ |
| 46 | hr/hr \ |
Roozbeh Pournader | 7104a91 | 2015-05-01 10:46:58 -0700 | [diff] [blame] | 47 | hu/hu \ |
| 48 | hy/hy \ |
Calvin Pan | 2705f4e | 2021-10-13 11:02:28 +0800 | [diff] [blame] | 49 | it/it \ |
Calvin Pan | 638add3 | 2021-12-13 23:47:13 +0800 | [diff] [blame] | 50 | ka/ka \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 51 | kn/kn \ |
Roozbeh Pournader | 68ce780 | 2017-10-13 14:30:55 -0700 | [diff] [blame] | 52 | la/la \ |
Calvin Pan | 2705f4e | 2021-10-13 11:02:28 +0800 | [diff] [blame] | 53 | lt/lt \ |
Calvin Pan | 638add3 | 2021-12-13 23:47:13 +0800 | [diff] [blame] | 54 | lv/lv \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 55 | ml/ml \ |
| 56 | mn/mn-cyrl \ |
| 57 | mr/mr \ |
Roozbeh Pournader | 7104a91 | 2015-05-01 10:46:58 -0700 | [diff] [blame] | 58 | nb/nb \ |
Calvin Pan | 638add3 | 2021-12-13 23:47:13 +0800 | [diff] [blame] | 59 | nl/nl \ |
Roozbeh Pournader | 1cf3431 | 2015-12-13 15:25:15 -0800 | [diff] [blame] | 60 | nn/nn \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 61 | or/or \ |
| 62 | pa/pa \ |
| 63 | pt/pt \ |
Calvin Pan | 5722d84 | 2022-01-21 16:43:52 +0800 | [diff] [blame] | 64 | ru/ru \ |
Calvin Pan | 638add3 | 2021-12-13 23:47:13 +0800 | [diff] [blame] | 65 | sk/sk \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 66 | sl/sl \ |
Calvin Pan | 638add3 | 2021-12-13 23:47:13 +0800 | [diff] [blame] | 67 | sq/sq \ |
Calvin Pan | 1511bca | 2022-01-12 16:14:19 +0800 | [diff] [blame] | 68 | sv/sv \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 69 | ta/ta \ |
| 70 | te/te \ |
Calvin Pan | 2705f4e | 2021-10-13 11:02:28 +0800 | [diff] [blame] | 71 | tk/tk \ |
| 72 | uk/uk |
Roozbeh Pournader | 01be41a | 2015-04-06 20:07:40 -0700 | [diff] [blame] | 73 | |
Raph Levien | 9c07dd3 | 2015-09-03 16:18:30 -0700 | [diff] [blame] | 74 | # 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 Pournader | 68ce780 | 2017-10-13 14:30:55 -0700 | [diff] [blame] | 76 | # |
| 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 Pournader | 01be41a | 2015-04-06 20:07:40 -0700 | [diff] [blame] | 79 | |
Raph Levien | 9c07dd3 | 2015-09-03 16:18:30 -0700 | [diff] [blame] | 80 | BUILD_HYB := $(LOCAL_PATH)/build-hyb.mk |
Roozbeh Pournader | 7104a91 | 2015-05-01 10:46:58 -0700 | [diff] [blame] | 81 | |
Roozbeh Pournader | 01be41a | 2015-04-06 20:07:40 -0700 | [diff] [blame] | 82 | ############################################################################# |
Raph Levien | 9c07dd3 | 2015-09-03 16:18:30 -0700 | [diff] [blame] | 83 | # $(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 Pournader | 01be41a | 2015-04-06 20:07:40 -0700 | [diff] [blame] | 86 | ############################################################################# |
| 87 | define build-one-pattern-module |
| 88 | $(eval include $(CLEAR_VARS))\ |
Raph Levien | 9c07dd3 | 2015-09-03 16:18:30 -0700 | [diff] [blame] | 89 | $(eval LOCAL_MODULE := $(addprefix hyph-, $(2)))\ |
| 90 | $(eval LOCAL_SRC_FILES := $(addprefix $(1)/hyph-, $(addprefix $(2), .pat.txt .chr.txt .hyp.txt)))\ |
Bob Badour | c0693dd | 2022-02-25 19:42:46 -0800 | [diff] [blame] | 91 | $(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 Levien | 9c07dd3 | 2015-09-03 16:18:30 -0700 | [diff] [blame] | 94 | $(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 Pournader | 01be41a | 2015-04-06 20:07:40 -0700 | [diff] [blame] | 98 | $(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)) |
| 102 | endef |
| 103 | |
Bob Badour | c0693dd | 2022-02-25 19:42:46 -0800 | [diff] [blame] | 104 | $(foreach l, $(pattern_locales), $(call build-one-pattern-module,$(dir $(l)),$(notdir $l))) |
Roozbeh Pournader | 01be41a | 2015-04-06 20:07:40 -0700 | [diff] [blame] | 105 | build-one-pattern-module := |
Raph Levien | 9c07dd3 | 2015-09-03 16:18:30 -0700 | [diff] [blame] | 106 | pattern_locales := |
Keun-young Park | 5ef5cc0 | 2016-01-29 12:17:48 -0800 | [diff] [blame] | 107 | |
| 108 | endif #TARGET_BUILD_PDK |