1061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown# Copyright (C) 2010 The Android Open Source Project
2061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown#
3061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown# Licensed under the Apache License, Version 2.0 (the "License");
4061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown# you may not use this file except in compliance with the License.
5061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown# You may obtain a copy of the License at
6061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown#
7061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown#      http://www.apache.org/licenses/LICENSE-2.0
8061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown#
9061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown# Unless required by applicable law or agreed to in writing, software
10061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown# distributed under the License is distributed on an "AS IS" BASIS,
11061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown# See the License for the specific language governing permissions and
13061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown# limitations under the License.
14061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown
15061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown# This makefile performs build time validation of framework keymap files.
16061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown
17061cf758841dfc972be3f0ec4857762fafe49aa6Jeff BrownLOCAL_PATH := $(call my-dir)
18061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Brown
19061cf758841dfc972be3f0ec4857762fafe49aa6Jeff Browninclude $(LOCAL_PATH)/common.mk
206f2fba428ca5e77a26d991ad728e346cc47609eeJeff Brown
216f2fba428ca5e77a26d991ad728e346cc47609eeJeff Brown# Validate all key maps.
226f2fba428ca5e77a26d991ad728e346cc47609eeJeff Browninclude $(CLEAR_VARS)
236f2fba428ca5e77a26d991ad728e346cc47609eeJeff Brown
246f2fba428ca5e77a26d991ad728e346cc47609eeJeff Brownvalidatekeymaps := $(HOST_OUT_EXECUTABLES)/validatekeymaps$(HOST_EXECUTABLE_SUFFIX)
256f2fba428ca5e77a26d991ad728e346cc47609eeJeff Brownfiles := \
266f2fba428ca5e77a26d991ad728e346cc47609eeJeff Brown    $(foreach file,$(keylayouts),frameworks/base/data/keyboards/$(file)) \
276f2fba428ca5e77a26d991ad728e346cc47609eeJeff Brown    $(foreach file,$(keycharmaps),frameworks/base/data/keyboards/$(file)) \
286f2fba428ca5e77a26d991ad728e346cc47609eeJeff Brown    $(foreach file,$(keyconfigs),frameworks/base/data/keyboards/$(file))
296f2fba428ca5e77a26d991ad728e346cc47609eeJeff Brown
306f2fba428ca5e77a26d991ad728e346cc47609eeJeff BrownLOCAL_MODULE := validate_framework_keymaps
316f2fba428ca5e77a26d991ad728e346cc47609eeJeff BrownLOCAL_MODULE_TAGS := optional
326f2fba428ca5e77a26d991ad728e346cc47609eeJeff BrownLOCAL_REQUIRED_MODULES := validatekeymaps
336f2fba428ca5e77a26d991ad728e346cc47609eeJeff Brown
346f2fba428ca5e77a26d991ad728e346cc47609eeJeff Brownvalidate_framework_keymaps: $(files)
356f2fba428ca5e77a26d991ad728e346cc47609eeJeff Brown	$(hide) $(validatekeymaps) $(files)
366f2fba428ca5e77a26d991ad728e346cc47609eeJeff Brown
376f2fba428ca5e77a26d991ad728e346cc47609eeJeff Browninclude $(BUILD_PHONY_PACKAGE)
38