Substitue "/" with "-" in the MODULES-IN phony goal names.
This avoids Ninja's path canonicalization on those goal names.
Without this, Ninja complains about duplicate rules for
MODULES-IN/a/b/.. and MODULES-IN/a.
Bug: 24309760
Change-Id: Id3aa9da5d3887a2cd1426cbb5fdf35659c65805e
diff --git a/core/base_rules.mk b/core/base_rules.mk
index d96502d..21b59a3 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -260,7 +260,7 @@
my_path_components := $(subst /,$(space),$(LOCAL_PATH))
my_path_prefix := MODULES-IN
$(foreach c, $(my_path_components),\
- $(eval my_path_prefix := $(my_path_prefix)/$(c))\
+ $(eval my_path_prefix := $(my_path_prefix)-$(c))\
$(eval .PHONY : $(my_path_prefix))\
$(eval $(my_path_prefix) : $(my_register_name)))