summaryrefslogtreecommitdiffstats
path: root/data/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'data/keyboards')
-rw-r--r--data/keyboards/Android.mk28
-rw-r--r--data/keyboards/common.mk6
-rw-r--r--data/keyboards/keyboards.mk12
3 files changed, 25 insertions, 21 deletions
diff --git a/data/keyboards/Android.mk b/data/keyboards/Android.mk
index a66a884..898efe8 100644
--- a/data/keyboards/Android.mk
+++ b/data/keyboards/Android.mk
@@ -21,17 +21,21 @@ include $(LOCAL_PATH)/common.mk
# Validate all key maps.
include $(CLEAR_VARS)
-validatekeymaps := $(HOST_OUT_EXECUTABLES)/validatekeymaps$(HOST_EXECUTABLE_SUFFIX)
-files := \
- $(foreach file,$(keylayouts),frameworks/base/data/keyboards/$(file)) \
- $(foreach file,$(keycharmaps),frameworks/base/data/keyboards/$(file)) \
- $(foreach file,$(keyconfigs),frameworks/base/data/keyboards/$(file))
-
LOCAL_MODULE := validate_framework_keymaps
-LOCAL_MODULE_TAGS := optional
-LOCAL_REQUIRED_MODULES := validatekeymaps
+intermediates := $(call intermediates-dir-for,ETC,$(LOCAL_MODULE),,COMMON)
+LOCAL_BUILT_MODULE := $(intermediates)/stamp
-validate_framework_keymaps: $(files)
- $(hide) $(validatekeymaps) $(files)
-
-include $(BUILD_PHONY_PACKAGE)
+validatekeymaps := $(HOST_OUT_EXECUTABLES)/validatekeymaps$(HOST_EXECUTABLE_SUFFIX)
+$(LOCAL_BUILT_MODULE): PRIVATE_VALIDATEKEYMAPS := $(validatekeymaps)
+$(LOCAL_BUILT_MODULE) : $(framework_keylayouts) $(framework_keycharmaps) $(framework_keyconfigs) | $(validatekeymaps)
+ $(hide) $(PRIVATE_VALIDATEKEYMAPS) $^
+ $(hide) mkdir -p $(dir $@) && touch $@
+
+# Run validatekeymaps uncondionally for platform build.
+droidcore all_modules : $(LOCAL_BUILT_MODULE)
+
+# Reset temp vars.
+validatekeymaps :=
+framework_keylayouts :=
+framework_keycharmaps :=
+framework_keyconfigs :=
diff --git a/data/keyboards/common.mk b/data/keyboards/common.mk
index 87c2ef5..d75b691 100644
--- a/data/keyboards/common.mk
+++ b/data/keyboards/common.mk
@@ -15,8 +15,8 @@
# This is the list of framework provided keylayouts and key character maps to include.
# Used by Android.mk and keyboards.mk.
-keylayouts := $(notdir $(wildcard $(LOCAL_PATH)/*.kl))
+framework_keylayouts := $(wildcard $(LOCAL_PATH)/*.kl)
-keycharmaps := $(notdir $(wildcard $(LOCAL_PATH)/*.kcm))
+framework_keycharmaps := $(wildcard $(LOCAL_PATH)/*.kcm)
-keyconfigs := $(notdir $(wildcard $(LOCAL_PATH)/*.idc))
+framework_keyconfigs := $(wildcard $(LOCAL_PATH)/*.idc)
diff --git a/data/keyboards/keyboards.mk b/data/keyboards/keyboards.mk
index c964961..d545241 100644
--- a/data/keyboards/keyboards.mk
+++ b/data/keyboards/keyboards.mk
@@ -16,11 +16,11 @@
include $(LOCAL_PATH)/common.mk
-PRODUCT_COPY_FILES := $(foreach file,$(keylayouts),\
- frameworks/base/data/keyboards/$(file):system/usr/keylayout/$(file))
+PRODUCT_COPY_FILES := $(foreach file,$(framework_keylayouts),\
+ $(file):system/usr/keylayout/$(file))
-PRODUCT_COPY_FILES += $(foreach file,$(keycharmaps),\
- frameworks/base/data/keyboards/$(file):system/usr/keychars/$(file))
+PRODUCT_COPY_FILES += $(foreach file,$(framework_keycharmaps),\
+ $(file):system/usr/keychars/$(file))
-PRODUCT_COPY_FILES += $(foreach file,$(keyconfigs),\
- frameworks/base/data/keyboards/$(file):system/usr/idc/$(file))
+PRODUCT_COPY_FILES += $(foreach file,$(framework_keyconfigs),\
+ $(file):system/usr/idc/$(file))