Fix override warnings when two test suites share an output
Test: (internal master); m -j nothing, check warnings
Test: Spot check differences in build-*.ninja
Change-Id: I160583faa69d090f9b97a8a600598a39a8b1ed9c
diff --git a/core/definitions.mk b/core/definitions.mk
index 4babd60..63b123e 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -3232,10 +3232,10 @@
# Requires for each suite: my_compat_dist_$(suite) to be defined.
define create-suite-dependencies
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
- $(eval my_compat_files_$(suite) := $(call copy-many-files, $(my_compat_dist_$(suite)))) \
$(eval COMPATIBILITY.$(suite).FILES := \
- $(COMPATIBILITY.$(suite).FILES) $(my_compat_files_$(suite))) \
- $(eval $(my_all_targets) : $(my_compat_files_$(suite))))
+ $(COMPATIBILITY.$(suite).FILES) $(foreach f,$(my_compat_dist_$(suite)),$(call word-colon,2,$(f))))) \
+$(eval $(my_all_targets) : $(call copy-many-files, \
+ $(sort $(foreach suite,$(LOCAL_COMPATIBILITY_SUITE),$(my_compat_dist_$(suite))))))
endef
###########################################################