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 as/as \ 22 bn/bn \ 23 bg/bg \ 24 cu/cu \ 25 cy/cy \ 26 da/da \ 27 de/de-1901 \ 28 de/de-1996 \ 29 de/de-ch-1901 \ 30 en-GB/en-gb \ 31 en-US/en-us \ 32 es/es \ 33 et/et \ 34 eu/eu \ 35 Ethi/und-ethi \ 36 fr/fr \ 37 ga/ga \ 38 gu/gu \ 39 hi/hi \ 40 hr/hr \ 41 hu/hu \ 42 hy/hy \ 43 kn/kn \ 44 ml/ml \ 45 mn/mn-cyrl \ 46 mr/mr \ 47 nb/nb \ 48 nn/nn \ 49 or/or \ 50 pa/pa \ 51 pt/pt \ 52 sl/sl \ 53 ta/ta \ 54 te/te \ 55 tk/tk 56 57# TODO: we have data for sa/sa, but it requires special case handling for case 58# folding and normalization, so don't build it until that's fixed. 59 60BUILD_HYB := $(LOCAL_PATH)/build-hyb.mk 61 62############################################################################# 63# $(1): The subdirectory where the source files live. 64$ $(2): The file name fragment. 65# It is used to find source files, and also generate the resulting binary. 66############################################################################# 67define build-one-pattern-module 68$(eval include $(CLEAR_VARS))\ 69$(eval LOCAL_MODULE := $(addprefix hyph-, $(2)))\ 70$(eval LOCAL_SRC_FILES := $(addprefix $(1)/hyph-, $(addprefix $(2), .pat.txt .chr.txt .hyp.txt)))\ 71$(eval include $(BUILD_HYB))\ 72$(eval include $(CLEAR_VARS))\ 73$(eval LOCAL_MODULE := $(addprefix $(addprefix hyph-, $(2)), .lic.txt))\ 74$(eval LOCAL_SRC_FILES := $(addprefix $(1)/hyph-, $(addprefix $(2), .lic.txt)))\ 75$(eval LOCAL_MODULE_CLASS := ETC)\ 76$(eval LOCAL_MODULE_TAGS := optional)\ 77$(eval LOCAL_MODULE_PATH := $(TARGET_OUT)/usr/hyphen-data)\ 78$(eval include $(BUILD_PREBUILT)) 79endef 80 81$(foreach l, $(pattern_locales), $(call build-one-pattern-module, $(dir $(l)), $(notdir $l))) 82build-one-pattern-module := 83pattern_locales := 84 85endif #TARGET_BUILD_PDK 86