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