Test suite notices using dependencies.
Switch from combine-notice-files to html-notice-rule and
text-notice-rule.
Bug: 151177513
Bug: 213388645
Bug: 210912771
Test: m cts reportmissinglicenses
Change-Id: I59d78553f15f0fd6be87228c933693b63e2ebf04
diff --git a/core/definitions.mk b/core/definitions.mk
index 1c9ebad..d4d6a67 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -680,12 +680,12 @@
$(strip $(eval _notices := $(sort $(ALL_NON_MODULES.$(_tgt).NOTICES))))
$(strip $(eval _path := $(sort $(ALL_NON_MODULES.$(_tgt).PATH))))
$(strip $(eval _install_map := $(ALL_NON_MODULES.$(_tgt).ROOT_MAPPINGS)))
-$(strip \
- $(foreach d,$(strip $(ALL_NON_MODULES.$(_tgt).DEPENDENCIES)), \
- $(if $(strip $(ALL_TARGETS.$(d).META_LIC)), \
+$(strip $(eval \
+ $$(foreach d,$(strip $(ALL_NON_MODULES.$(_tgt).DEPENDENCIES)), \
+ $$(if $$(strip $$(ALL_TARGETS.$$(d).META_LIC)), \
, \
- $(eval NON_MODULES_WITHOUT_LICENSE_METADATA += $(d))) \
- ) \
+ $$(eval NON_MODULES_WITHOUT_LICENSE_METADATA += $$(d))) \
+ )) \
)
$(_dir)/$(_tgt).meta_lic: PRIVATE_KINDS := $(sort $(ALL_NON_MODULES.$(_tgt).LICENSE_KINDS))
@@ -3321,6 +3321,14 @@
# and use my_compat_dist_$(suite) to define the others.
define create-suite-dependencies
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval $(if $(strip $(module_license_metadata)),\
+ $$(foreach f,$$(my_compat_dist_$(suite)),$$(eval ALL_TARGETS.$$(call word-colon,2,$$(f)).META_LIC := $(module_license_metadata))),\
+ $$(eval my_test_data += $$(foreach f,$$(my_compat_dist_$(suite)), $$(call word-colon,2,$$(f)))) \
+ )) \
+ $(eval $(if $(strip $(module_license_metadata)),\
+ $$(foreach f,$$(my_compat_dist_config_$(suite)),$$(eval ALL_TARGETS.$$(call word-colon,2,$$(f)).META_LIC := $(module_license_metadata))),\
+ $$(eval my_test_config += $$(foreach f,$$(my_compat_dist_config_$(suite)), $$(call word-colon,2,$$(f)))) \
+ )) \
$(if $(filter $(suite),$(ALL_COMPATIBILITY_SUITES)),,\
$(eval ALL_COMPATIBILITY_SUITES += $(suite)) \
$(eval COMPATIBILITY.$(suite).FILES :=) \