summaryrefslogtreecommitdiffstats
path: root/data/keyboards
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2013-08-29 14:33:58 -0700
committerYing Wang <wangying@google.com>2013-09-03 12:27:18 -0700
commit18e14c75e3bce96690ac76c78fdb402af9740a01 (patch)
tree7a98143cb9dd9738a2c7c7aad153bddb76509fd3 /data/keyboards
parent5c2dfa8a21e7bd4e07e00f268d30058b654aa099 (diff)
downloadframeworks_base-18e14c75e3bce96690ac76c78fdb402af9740a01.zip
frameworks_base-18e14c75e3bce96690ac76c78fdb402af9740a01.tar.gz
frameworks_base-18e14c75e3bce96690ac76c78fdb402af9740a01.tar.bz2
Fix keymap build dependencies and variable name collisions
Change-Id: I06e67ddc97429ae9c3d04143934c3f8233fcd22f
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))