diff --git a/Android.mk b/Android.mk index 42b343878c40a49a274fd92e180a0dea10a9148d..ccb66e5236711a200145cc598e1b4373be1edae9 100644 --- a/Android.mk +++ b/Android.mk @@ -80,9 +80,21 @@ endif # - compile output binary policy file PLAT_PUBLIC_POLICY := $(LOCAL_PATH)/public -PLAT_PUBLIC_POLICY += $(BOARD_PLAT_PUBLIC_SEPOLICY_DIRS) +ifneq ( ,$(BOARD_PLAT_PUBLIC_SEPOLICY_DIR)) +ifneq (1, $(words $(BOARD_PLAT_PUBLIC_SEPOLICY_DIR))) +$(error BOARD_PLAT_PUBLIC_SEPOLICY_DIR must only contain one directory) +else +PLAT_PUBLIC_POLICY += $(BOARD_PLAT_PUBLIC_SEPOLICY_DIR) +endif +endif PLAT_PRIVATE_POLICY := $(LOCAL_PATH)/private -PLAT_PRIVATE_POLICY += $(BOARD_PLAT_PRIVATE_SEPOLICY_DIRS) +ifneq ( ,$(BOARD_PLAT_PRIVATE_SEPOLICY_DIR)) +ifneq (1, $(words $(BOARD_PLAT_PRIVATE_SEPOLICY_DIR))) +$(error BOARD_PLAT_PRIVATE_SEPOLICY_DIR must only contain one directory) +else +PLAT_PRIVATE_POLICY += $(BOARD_PLAT_PRIVATE_SEPOLICY_DIR) +endif +endif PLAT_VENDOR_POLICY := $(LOCAL_PATH)/vendor REQD_MASK_POLICY := $(LOCAL_PATH)/reqd_mask