From ffc86bea0e38147a9330177708aedbccd603627a Mon Sep 17 00:00:00 2001
From: William Roberts <william.c.roberts@intel.com>
Date: Mon, 29 Jun 2015 11:16:18 -0700
Subject: [PATCH] Correct local variables for file_contexts_asan

Lowercase local variables and clear them to be
consistent with other recipes and prevent polluting
Make's global name space with set variables.

Change-Id: If455cd4f33d5babbea985867a711e8a10c21a00f
Signed-off-by: William Roberts <william.c.roberts@intel.com>
---
 Android.mk | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/Android.mk b/Android.mk
index e2e8ca5e6..1e23d52df 100644
--- a/Android.mk
+++ b/Android.mk
@@ -147,19 +147,21 @@ LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
 
 include $(BUILD_SYSTEM)/base_rules.mk
 
-FILE_CONTEXTS := file_contexts
+all_fc_files := file_contexts
 ifeq (address,$(strip $(SANITIZE_TARGET)))
-  FILE_CONTEXTS := $(FILE_CONTEXTS) file_contexts_asan
+  all_fc_files := $(all_fc_files) file_contexts_asan
 endif
-ALL_FC_FILES := $(call build_policy, $(FILE_CONTEXTS))
+all_fc_files := $(call build_policy, $(all_fc_files))
 
 $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy)
-$(LOCAL_BUILT_MODULE):  $(ALL_FC_FILES) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc
+$(LOCAL_BUILT_MODULE): PRIVATE_FC_FILES := $(all_fc_files)
+$(LOCAL_BUILT_MODULE): $(all_fc_files) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc
 	@mkdir -p $(dir $@)
-	$(hide) m4 -s $(ALL_FC_FILES) > $@
+	$(hide) m4 -s $(PRIVATE_FC_FILES) > $@
 	$(hide) $(HOST_OUT_EXECUTABLES)/checkfc $(PRIVATE_SEPOLICY) $@
 
 built_fc := $(LOCAL_BUILT_MODULE)
+all_fc_files :=
 
 ##################################
 include $(CLEAR_VARS)
-- 
GitLab