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 15#disable build in PDK 16ifneq ($(TARGET_BUILD_PDK),true) 17 18LOCAL_PATH := $(call my-dir) 19 20pattern_locales := \ 21 af/af \ 22 am/mul-ethi \ 23 as/as \ 24 be/be \ 25 bn/bn \ 26 bg/bg \ 27 cs/cs \ 28 cu/cu \ 29 cy/cy \ 30 da/da \ 31 de/de-1901 \ 32 de/de-1996 \ 33 de/de-ch-1901 \ 34 el/el \ 35 en-GB/en-gb \ 36 en-US/en-us \ 37 es/es \ 38 et/et \ 39 eu/eu \ 40 Ethi/und-ethi \ 41 fr/fr \ 42 ga/ga \ 43 gl/gl \ 44 gu/gu \ 45 hi/hi \ 46 hr/hr \ 47 hu/hu \ 48 hy/hy \ 49 it/it \ 50 ka/ka \ 51 kn/kn \ 52 la/la \ 53 lt/lt \ 54 lv/lv \ 55 ml/ml \ 56 mn/mn-cyrl \ 57 mr/mr \ 58 nb/nb \ 59 nl/nl \ 60 nn/nn \ 61 or/or \ 62 pa/pa \ 63 pt/pt \ 64 ru/ru \ 65 sk/sk \ 66 sl/sl \ 67 sq/sq \ 68 sv/sv \ 69 ta/ta \ 70 te/te \ 71 tk/tk \ 72 uk/uk 73 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. 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. 79 80BUILD_HYB := $(LOCAL_PATH)/build-hyb.mk 81 82############################################################################# 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. 86############################################################################# 87define build-one-pattern-module 88$(eval include $(CLEAR_VARS))\ 89$(eval LOCAL_MODULE := $(addprefix hyph-, $(2)))\ 90$(eval LOCAL_SRC_FILES := $(addprefix $(1)/hyph-, $(addprefix $(2), .pat.txt .chr.txt .hyp.txt)))\ 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)))\ 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)))\ 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)) 102endef 103 104$(foreach l, $(pattern_locales), $(call build-one-pattern-module,$(dir $(l)),$(notdir $l))) 105build-one-pattern-module := 106pattern_locales := 107 108endif #TARGET_BUILD_PDK 109