blob: 08862107790d65f6c5566b07c529203a6b1b37a9 [file] [log] [blame]
Roozbeh Pournader01be41a2015-04-06 20:07:40 -07001# 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# We have to use BUILD_PREBUILT instead of PRODUCT_COPY_FILES,
16# to copy over the NOTICE file.
17
18LOCAL_PATH := $(call my-dir)
19
20pattern_locales := en-us
21
22pattern_src_files := \
23 $(foreach locale, $(pattern_locales), \
24 $(addprefix hyph-, $(addprefix $(locale), \
25 .chr.txt .hyp.txt .lic.txt .pat.txt)))
26pattern_locales :=
27
28#############################################################################
29# $(1): The source file name in LOCAL_PATH.
30# It also serves as the module name and the dest file name.
31#############################################################################
32define build-one-pattern-module
33$(eval include $(CLEAR_VARS))\
34$(eval LOCAL_MODULE := $(1))\
35$(eval LOCAL_SRC_FILES := $(1))\
36$(eval LOCAL_MODULE_CLASS := ETC)\
37$(eval LOCAL_MODULE_TAGS := optional)\
38$(eval LOCAL_MODULE_PATH := $(TARGET_OUT)/usr/hyphen-data)\
39$(eval include $(BUILD_PREBUILT))
40endef
41
42$(foreach f, $(pattern_src_files), $(call build-one-pattern-module, $(f)))
43build-one-pattern-module :=
44pattern_src_files :=