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 := \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 21 | as/as \ |
Roozbeh Pournader | 68ce780 | 2017-10-13 14:30:55 -0700 | [diff] [blame] | 22 | be/be \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 23 | bn/bn \ |
Roozbeh Pournader | ff85326 | 2017-02-22 18:05:00 -0800 | [diff] [blame] | 24 | bg/bg \ |
| 25 | cu/cu \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 26 | cy/cy \ |
| 27 | da/da \ |
Roozbeh Pournader | 1cf3431 | 2015-12-13 15:25:15 -0800 | [diff] [blame] | 28 | de/de-1901 \ |
| 29 | de/de-1996 \ |
| 30 | de/de-ch-1901 \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 31 | en-GB/en-gb \ |
Roozbeh Pournader | 7104a91 | 2015-05-01 10:46:58 -0700 | [diff] [blame] | 32 | en-US/en-us \ |
Roozbeh Pournader | b6bdfb9 | 2015-12-02 12:16:10 -0800 | [diff] [blame] | 33 | es/es \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 34 | et/et \ |
| 35 | eu/eu \ |
Roozbeh Pournader | 7104a91 | 2015-05-01 10:46:58 -0700 | [diff] [blame] | 36 | Ethi/und-ethi \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 37 | fr/fr \ |
| 38 | ga/ga \ |
| 39 | gu/gu \ |
| 40 | hi/hi \ |
| 41 | hr/hr \ |
Roozbeh Pournader | 7104a91 | 2015-05-01 10:46:58 -0700 | [diff] [blame] | 42 | hu/hu \ |
| 43 | hy/hy \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 44 | kn/kn \ |
Roozbeh Pournader | 68ce780 | 2017-10-13 14:30:55 -0700 | [diff] [blame] | 45 | la/la \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 46 | ml/ml \ |
| 47 | mn/mn-cyrl \ |
| 48 | mr/mr \ |
Roozbeh Pournader | 7104a91 | 2015-05-01 10:46:58 -0700 | [diff] [blame] | 49 | nb/nb \ |
Roozbeh Pournader | 1cf3431 | 2015-12-13 15:25:15 -0800 | [diff] [blame] | 50 | nn/nn \ |
Jungshik Shin | dedeff6 | 2016-03-18 15:54:40 -0700 | [diff] [blame] | 51 | or/or \ |
| 52 | pa/pa \ |
| 53 | pt/pt \ |
| 54 | sl/sl \ |
| 55 | ta/ta \ |
| 56 | te/te \ |
| 57 | tk/tk |
Roozbeh Pournader | 01be41a | 2015-04-06 20:07:40 -0700 | [diff] [blame] | 58 | |
Raph Levien | 9c07dd3 | 2015-09-03 16:18:30 -0700 | [diff] [blame] | 59 | # 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 Pournader | 68ce780 | 2017-10-13 14:30:55 -0700 | [diff] [blame] | 61 | # |
| 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 Pournader | 01be41a | 2015-04-06 20:07:40 -0700 | [diff] [blame] | 64 | |
Raph Levien | 9c07dd3 | 2015-09-03 16:18:30 -0700 | [diff] [blame] | 65 | BUILD_HYB := $(LOCAL_PATH)/build-hyb.mk |
Roozbeh Pournader | 7104a91 | 2015-05-01 10:46:58 -0700 | [diff] [blame] | 66 | |
Roozbeh Pournader | 01be41a | 2015-04-06 20:07:40 -0700 | [diff] [blame] | 67 | ############################################################################# |
Raph Levien | 9c07dd3 | 2015-09-03 16:18:30 -0700 | [diff] [blame] | 68 | # $(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 Pournader | 01be41a | 2015-04-06 20:07:40 -0700 | [diff] [blame] | 71 | ############################################################################# |
| 72 | define build-one-pattern-module |
| 73 | $(eval include $(CLEAR_VARS))\ |
Raph Levien | 9c07dd3 | 2015-09-03 16:18:30 -0700 | [diff] [blame] | 74 | $(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 Pournader | 01be41a | 2015-04-06 20:07:40 -0700 | [diff] [blame] | 80 | $(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)) |
| 84 | endef |
| 85 | |
Raph Levien | 9c07dd3 | 2015-09-03 16:18:30 -0700 | [diff] [blame] | 86 | $(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] | 87 | build-one-pattern-module := |
Raph Levien | 9c07dd3 | 2015-09-03 16:18:30 -0700 | [diff] [blame] | 88 | pattern_locales := |
Keun-young Park | 5ef5cc0 | 2016-01-29 12:17:48 -0800 | [diff] [blame] | 89 | |
| 90 | endif #TARGET_BUILD_PDK |