From 003ea369dd57df1dd5c28900775b00a4e674714b Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Wed, 15 Nov 2017 18:22:14 +0900 Subject: [PATCH] Ensure partition_tag is always set correctly partition_tag is now set to either VENDOR_, OEM_, or ODM_ even when LOCAL_[VENDOR|OEM|ODM]_MODULE isn't set but LOCAL_MODULE_PATH is explicitly set to under $(TARGET_OUT_[VENDOR|OEM|ODM]). Test: build walleye Change-Id: I0f902061889fe0af1c39f6222e54faa80dd15794 --- core/base_rules.mk | 10 ++++++++++ core/local_vndk.mk | 6 ++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index b501fbde86..592650d792 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -65,6 +65,16 @@ else my_host_cross := endif +_path := $(LOCAL_MODULE_PATH) $(LOCAL_MODULE_PATH_32) $(LOCAL_MODULE_PATH_64) +ifneq ($(filter $(TARGET_OUT_VENDOR)%,$(_path)),) +LOCAL_VENDOR_MODULE := true +else ifneq ($(filter $(TARGET_OUT_OEM)/%,$(_path)),) +LOCAL_OEM_MODULE := true +else ifneq ($(filter $(TARGET_OUT_ODM)/%,$(_path)),) +LOCAL_ODM_MODULE := true +endif +_path := + ifndef LOCAL_PROPRIETARY_MODULE LOCAL_PROPRIETARY_MODULE := $(LOCAL_VENDOR_MODULE) endif diff --git a/core/local_vndk.mk b/core/local_vndk.mk index 640aac7a68..3677d40a15 100644 --- a/core/local_vndk.mk +++ b/core/local_vndk.mk @@ -5,10 +5,8 @@ ifndef LOCAL_IS_HOST_MODULE ifndef LOCAL_SDK_VERSION ifneq (,$(filter true,$(LOCAL_VENDOR_MODULE) $(LOCAL_ODM_MODULE) $(LOCAL_OEM_MODULE) $(LOCAL_PROPRIETARY_MODULE))) LOCAL_USE_VNDK:=true - else - ifneq (,$(filter $(TARGET_OUT_VENDOR)%,$(LOCAL_MODULE_PATH) $(LOCAL_MODULE_PATH_32) $(LOCAL_MODULE_PATH_64))) - LOCAL_USE_VNDK:=true - endif + # Note: no need to check LOCAL_MODULE_PATH* since LOCAL_[VENDOR|ODM|OEM]_MODULE is already + # set correctly before this is included. endif endif endif