Add find_files builtin, use it to fix find_and_copy implementation
The macro find-and-copy finds all the files in the given source tree that
match the given filename patten and create <source>:<dest> pair with the
same relative path in the destination tree.
Bug: 193540681
Test: rbcrun build/make/tests/run.rbc
Change-Id: Ic4315ce2fab7a7791ab55dd9eed039205a1c721a
diff --git a/tests/device.rbc b/tests/device.rbc
index b57dbf9..c91a487 100644
--- a/tests/device.rbc
+++ b/tests/device.rbc
@@ -45,7 +45,7 @@
cfg["PRODUCT_COPY_FILES"] += ["device_from:device_to"]
_include1_init(g, handle)
cfg["PRODUCT_PACKAGES"] += ["dev_after"]
- cfg["PRODUCT_COPY_FILES"] += (rblf.find_and_copy("audio_platform_info*.xml", "device/google/redfin/audio", "||VENDOR-PATH-PH||/etc") +
+ cfg["PRODUCT_COPY_FILES"] += (rblf.find_and_copy("audio_platform_info*.xml", "device/google/redfin", "||VENDOR-PATH-PH||/etc") +
["xyz:/etc/xyz"])
cfg["PRODUCT_COPY_FILES"] += rblf.copy_files("x.xml y.xml", "/etc")
rblf.add_soong_config_namespace(g, "NS1")