From 54b325df14e72e7fc8e3f3449e8f7fbec731c2f2 Mon Sep 17 00:00:00 2001 From: Bob Badour Date: Mon, 12 Sep 2022 19:53:23 -0700 Subject: [PATCH] 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 --- core/definitions.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/definitions.mk b/core/definitions.mk index aa5357964b..0385315811 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -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))) \