blob: 6ae88007f0f5bda5a950d83e776ba931418b4760 [file] [log] [blame]
Jeff Brown061cf752010-11-18 20:52:43 -08001# Copyright (C) 2010 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# This makefile performs build time validation of framework keymap files.
16
17LOCAL_PATH := $(call my-dir)
18
19include $(LOCAL_PATH)/common.mk
Jeff Brown6f2fba42011-02-19 01:08:02 -080020
21# Validate all key maps.
22include $(CLEAR_VARS)
23
Jeff Brown6f2fba42011-02-19 01:08:02 -080024LOCAL_MODULE := validate_framework_keymaps
Bob Badoure539dba2021-02-12 17:07:05 -080025LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
26LOCAL_LICENSE_CONDITIONS := notice
27LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../NOTICE
Michael Wright18e14c72013-08-29 14:33:58 -070028intermediates := $(call intermediates-dir-for,ETC,$(LOCAL_MODULE),,COMMON)
29LOCAL_BUILT_MODULE := $(intermediates)/stamp
Jeff Brown6f2fba42011-02-19 01:08:02 -080030
Michael Wright18e14c72013-08-29 14:33:58 -070031validatekeymaps := $(HOST_OUT_EXECUTABLES)/validatekeymaps$(HOST_EXECUTABLE_SUFFIX)
32$(LOCAL_BUILT_MODULE): PRIVATE_VALIDATEKEYMAPS := $(validatekeymaps)
33$(LOCAL_BUILT_MODULE) : $(framework_keylayouts) $(framework_keycharmaps) $(framework_keyconfigs) | $(validatekeymaps)
Siarhei Vishniakouae911cb2018-03-26 16:18:34 -070034 $(hide) $(PRIVATE_VALIDATEKEYMAPS) -q $^
Michael Wright18e14c72013-08-29 14:33:58 -070035 $(hide) mkdir -p $(dir $@) && touch $@
Jeff Brown6f2fba42011-02-19 01:08:02 -080036
Michael Wright18e14c72013-08-29 14:33:58 -070037# Run validatekeymaps uncondionally for platform build.
Ying Wang366d6d02015-05-05 16:12:41 -070038droidcore : $(LOCAL_BUILT_MODULE)
Michael Wright18e14c72013-08-29 14:33:58 -070039
40# Reset temp vars.
41validatekeymaps :=
42framework_keylayouts :=
43framework_keycharmaps :=
44framework_keyconfigs :=