Android.mk: clean dependencies and clear variables
Dependencies being built with newline files in between
were also including the list of files without the newlines,
thus make would have to process 3n-1 files instead of 2n-1
where n is the number of files to process.
Additionally the *_with_nl variables were not being cleared
out and polluting Make's global name-space.
Change-Id: I76ea1a3dfae994b32991730aea7e4308da52a583
Signed-off-by: William Roberts <william.c.roberts@intel.com>
diff --git a/Android.mk b/Android.mk
index 5516d21..87783b2 100644
--- a/Android.mk
+++ b/Android.mk
@@ -188,7 +188,7 @@
file_contexts.tmp := $(intermediates)/file_contexts.tmp
$(file_contexts.tmp): PRIVATE_FC_FILES := $(all_fcfiles_with_nl)
$(file_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS)
-$(file_contexts.tmp): $(all_fc_files) $(all_fcfiles_with_nl)
+$(file_contexts.tmp): $(all_fcfiles_with_nl)
@mkdir -p $(dir $@)
$(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_FC_FILES) > $@
@@ -200,6 +200,7 @@
built_fc := $(LOCAL_BUILT_MODULE)
all_fc_files :=
+all_fcfiles_with_nl :=
file_contexts.tmp :=
##################################
@@ -291,7 +292,7 @@
property_contexts.tmp := $(intermediates)/property_contexts.tmp
$(property_contexts.tmp): PRIVATE_PC_FILES := $(all_pcfiles_with_nl)
$(property_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS)
-$(property_contexts.tmp): $(all_pc_files) $(all_pcfiles_with_nl)
+$(property_contexts.tmp): $(all_pcfiles_with_nl)
@mkdir -p $(dir $@)
$(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_PC_FILES) > $@
@@ -304,6 +305,7 @@
built_pc := $(LOCAL_BUILT_MODULE)
all_pc_files :=
+all_pcfiles_with_nl :=
property_contexts.tmp :=
##################################
@@ -344,7 +346,7 @@
service_contexts.tmp := $(intermediates)/service_contexts.tmp
$(service_contexts.tmp): PRIVATE_SVC_FILES := $(all_svcfiles_with_nl)
$(service_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS)
-$(service_contexts.tmp): $(all_svc_files) $(all_svcfiles_with_nl)
+$(service_contexts.tmp): $(all_svcfiles_with_nl)
@mkdir -p $(dir $@)
$(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_SVC_FILES) > $@
@@ -356,6 +358,7 @@
built_svc := $(LOCAL_BUILT_MODULE)
all_svc_files :=
+all_svcfiles_with_nl :=
service_contexts.tmp :=
##################################