Normalize target path for license dependencies.
If not normalized the same as declare-license-metadata, two rules get
generated instead of one rule with both license text and deps.
Test: m droid dist
Test: build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=sdk TARGET_BUILD_VARIANT=userdebug sdk dist sdk_repo
Change-Id: I3a8f2d3825c8c0183049fa12b14ace9b54066a01
Merged-in: I3a8f2d3825c8c0183049fa12b14ace9b54066a01
diff --git a/core/definitions.mk b/core/definitions.mk
index aa53579..0385315 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -897,7 +897,7 @@
###########################################################
define declare-license-deps
$(strip \
- $(eval _tgt := $(strip $(1))) \
+ $(eval _tgt := $(subst //,/,$(strip $(1)))) \
$(eval ALL_NON_MODULES += $(_tgt)) \
$(eval ALL_TARGETS.$(_tgt).META_LIC := $(call license-metadata-dir,$(1))/$(patsubst $(OUT_DIR)%,out%,$(_tgt)).meta_lic) \
$(eval ALL_NON_MODULES.$(_tgt).DEPENDENCIES := $(strip $(ALL_NON_MODULES.$(_tgt).DEPENDENCIES) $(2))) \
@@ -914,7 +914,7 @@
###########################################################
define declare-container-license-deps
$(strip \
- $(eval _tgt := $(strip $(1))) \
+ $(eval _tgt := $(subst //,/,$(strip $(1)))) \
$(eval ALL_NON_MODULES += $(_tgt)) \
$(eval ALL_TARGETS.$(_tgt).META_LIC := $(call license-metadata-dir,$(1))/$(patsubst $(OUT_DIR)%,out%,$(_tgt)).meta_lic) \
$(eval ALL_NON_MODULES.$(_tgt).DEPENDENCIES := $(strip $(ALL_NON_MODULES.$(_tgt).DEPENDENCIES) $(2))) \