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
This commit is contained in:
Bob Badour 2022-09-12 19:53:23 -07:00
parent 28078172fe
commit 54b325df14

View file

@ -897,7 +897,7 @@ endef
###########################################################
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 @@ endef
###########################################################
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))) \