diff --git a/mk2rbc/mk2rbc.go b/mk2rbc/mk2rbc.go index 30888c763..b05d3409b 100644 --- a/mk2rbc/mk2rbc.go +++ b/mk2rbc/mk2rbc.go @@ -118,7 +118,7 @@ var knownFunctions = map[string]struct { "notdir": {baseName + ".notdir", starlarkTypeString, hiddenArgNone}, "my-dir": {"!my-dir", starlarkTypeString, hiddenArgNone}, "patsubst": {baseName + ".mkpatsubst", starlarkTypeString, hiddenArgNone}, - "produce_copy_files": {baseName + ".produce_copy_files", starlarkTypeList, hiddenArgNone}, + "product-copy-files-by-pattern": {baseName + ".product_copy_files_by_pattern", starlarkTypeList, hiddenArgNone}, "require-artifacts-in-path": {baseName + ".require_artifacts_in_path", starlarkTypeVoid, hiddenArgNone}, "require-artifacts-in-path-relaxed": {baseName + ".require_artifacts_in_path_relaxed", starlarkTypeVoid, hiddenArgNone}, // TODO(asmundak): remove it once all calls are removed from configuration makefiles. see b/183161002 diff --git a/mk2rbc/mk2rbc_test.go b/mk2rbc/mk2rbc_test.go index ebaae282b..46212ee8b 100644 --- a/mk2rbc/mk2rbc_test.go +++ b/mk2rbc/mk2rbc_test.go @@ -669,6 +669,7 @@ $(info $(notdir foo/bar)) $(call add_soong_config_namespace,snsconfig) $(call add_soong_config_var_value,snsconfig,imagetype,odm_image) PRODUCT_COPY_FILES := $(call copy-files,$(wildcard foo*.mk),etc) +PRODUCT_COPY_FILES := $(call product-copy-files-by-pattern,from/%,to/%,a b c) `, expected: `load("//build/make/core:product_config.rbc", "rblf") @@ -689,6 +690,7 @@ def init(g, handle): rblf.add_soong_config_namespace(g, "snsconfig") rblf.add_soong_config_var_value(g, "snsconfig", "imagetype", "odm_image") cfg["PRODUCT_COPY_FILES"] = rblf.copy_files(rblf.expand_wildcard("foo*.mk"), "etc") + cfg["PRODUCT_COPY_FILES"] = rblf.product_copy_files_by_pattern("from/%", "to/%", "a b c") `, }, {