summaryrefslogtreecommitdiffstats
path: root/core/base_rules.mk
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2014-01-24 19:23:40 -0800
committerColin Cross <ccross@android.com>2014-01-27 14:43:14 -0800
commit639c336dc15c49daa27c118d10cef586ffa2633a (patch)
treebed49b97d7ee8443bca2a7d8db67b7bf2ebd47cf /core/base_rules.mk
parent18294fbf8c133aaaa5a97a6f36ab92d41aa8e13a (diff)
downloadbuild-639c336dc15c49daa27c118d10cef586ffa2633a.zip
build-639c336dc15c49daa27c118d10cef586ffa2633a.tar.gz
build-639c336dc15c49daa27c118d10cef586ffa2633a.tar.bz2
Support LOCAL_MODULE_RELATIVE_PATH
Most users of LOCAL_MODULE_PATH are setting a subdirectory of the normal install path, for example to install HALs into system/lib/hw. This is problematic for multiarch builds, where the install location depends on the arch. Allow modules to specify LOCAL_MODULE_RELATIVE_PATH. HALs will generally use: LOCAL_MODULE_RELATIVE_PATH := hw Change-Id: I4e4ceec61d026bbe74ba604554c06104bde42e5e
Diffstat (limited to 'core/base_rules.mk')
-rw-r--r--core/base_rules.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 29c6c7f..ac126a7 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -99,6 +99,7 @@ endif
ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
my_module_path := $(strip $(LOCAL_MODULE_PATH))
+my_module_relative_path := $(strip $(LOCAL_MODULE_RELATIVE_PATH))
ifeq ($(my_module_path),)
ifdef LOCAL_IS_HOST_MODULE
partition_tag :=
@@ -121,6 +122,9 @@ ifeq ($(my_module_path),)
$(error $(LOCAL_PATH): unhandled install path "$(install_path_var) for $(LOCAL_MODULE)")
endif
endif
+ifneq ($(my_module_relative_path),)
+ my_module_path := $(my_module_path)/$(my_module_relative_path)
+endif
endif # not LOCAL_UNINSTALLABLE_MODULE
ifneq ($(strip $(LOCAL_BUILT_MODULE)$(LOCAL_INSTALLED_MODULE)),)