From 4964db9772542f0bf02486bd49f4cf32a3c2d0c6 Mon Sep 17 00:00:00 2001 From: Bob Badour Date: Mon, 12 Sep 2022 18:13:55 -0700 Subject: [PATCH] Revert "Revert "Add license metadata to non-module targets."" This reverts commit 696b533ad765346a7eb242d5f7b7678bb5977dd9. Bug: 240149934 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: I1902bac43ab3a8337b344983df7b72f5f6c7ec76 --- build/tools/sdk_repo.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/build/tools/sdk_repo.mk b/build/tools/sdk_repo.mk index febd8fda1..1f88b242f 100644 --- a/build/tools/sdk_repo.mk +++ b/build/tools/sdk_repo.mk @@ -39,6 +39,9 @@ $(call sdk-repo-pkg-zip,$(2),$(3),$(4)): $(3) $(call dist-for-goals, sdk_repo, $(call sdk-repo-pkg-zip,$(2),$(3),$(4))) $(1) += $(4) $(2) \ $(call sdk-repo-pkg-zip,$(2),$(3),$(4)):$(notdir $(call sdk-repo-pkg-zip,$(2),$(3),$(4))) + +$(call declare-1p-container,$(call sdk-repo-pkg-zip,$(2),$(3),$(4)),sdk_repo) +$(call declare-container-license-deps,$(call sdk-repo-pkg-zip,$(2),$(3),$(4)),$(3),$(PRODUCT_OUT)/:/) endef # Defines the rule to build an SDK repository package when the @@ -62,6 +65,9 @@ $(call sdk-repo-pkg-zip,$(2),$(3),$(4)): $(3) $(call dist-for-goals, sdk_repo, $(call sdk-repo-pkg-zip,$(2),$(3),$(4))) $(1) += $(4) $(2) \ $(call sdk-repo-pkg-zip,$(2),$(3),$(4)):$(notdir $(call sdk-repo-pkg-zip,$(2),$(3),$(4))) + +$(call declare-1p-container,$(call sdk-repo-pkg-zip,$(2),$(3),$(4)),sdk_repo) +$(call declare-container-license-deps,$(call sdk-repo-pkg-zip,$(2),$(3),$(4)),$(3),$(PRODUCT_OUT)/:/) endef # Defines the rule to build an SDK repository package when the @@ -89,6 +95,9 @@ $(call sdk-repo-pkg-zip,$(2),$(3),$(4)): $(3) $(call dist-for-goals, sdk_repo, $(call sdk-repo-pkg-zip,$(2),$(3),$(4))) $(1) += $(4) $(2) \ $(call sdk-repo-pkg-zip,$(2),$(3),$(4)):$(notdir $(call sdk-repo-pkg-zip,$(2),$(3),$(4))) + +$(call declare-1p-container,$(call sdk-repo-pkg-zip,$(2),$(3),$(4)),sdk_repo) +$(call declare-container-license-deps,$(call sdk-repo-pkg-zip,$(2),$(3),$(4)),$(3),$(PRODUCT_OUT)/:/) endef # Defines the rule to build an SDK sources package. @@ -107,6 +116,9 @@ $(call sdk-repo-pkg-zip,$(2),$(3),$(4)): $(3) development/build/tools/mk_sources $(call dist-for-goals, sdk_repo, $(call sdk-repo-pkg-zip,$(2),$(3),$(4))) $(1) += $(4) $(2) \ $(call sdk-repo-pkg-zip,$(2),$(3),$(4)):$(notdir $(call sdk-repo-pkg-zip,$(2),$(3),$(4))) + +$(call declare-1p-container,$(call sdk-repo-pkg-zip,$(2),$(3),$(4)),sdk_repo) +$(call declare-container-license-deps,$(call sdk-repo-pkg-zip,$(2),$(3),$(4)),$(3) $(HOST_OUT)/development/sdk/source_source.properties,$(PRODUCT_OUT)/:/) endef # Defines the rule to build an XML file for a package. @@ -120,6 +132,9 @@ $(1): $$(XMLLINT) development/build/tools/mk_sdk_repo_xml.sh $(2) $(3) XMLLINT=$$(XMLLINT) development/build/tools/mk_sdk_repo_xml.sh $$@ $(2) $(4) $$(call dist-for-goals,sdk_repo,$(1)) + +$(call declare-1p-target,$(1),sdk_repo) +$(call declare-container-license-deps,$(1),$(2) $(3),$(PRODUCT_OUT)/:/) endef # -----------------------------------------------------------------