Support product-copy-files-by-pattern macro
Bug: 193566316 Test: internal Change-Id: I5ffdbaee231669166aaa3f40f84ecac8f571f981
This commit is contained in:
parent
0dd067d309
commit
0445308bc3
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
`,
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue