Runtime support for dist-for-goals.

Convert dist-for-goals.

Bug: 198496782
Test: rbcrun build/make/tests/run.rbc
Change-Id: I46ef9e897143aecf8bd28ad8569d48e74530b0e5
diff --git a/tests/run.rbc b/tests/run.rbc
index d222341..31436c5 100644
--- a/tests/run.rbc
+++ b/tests/run.rbc
@@ -102,3 +102,11 @@
 
 assert_eq("xyz", rblf.soong_config_get(globals, "NS2", "v3"))
 assert_eq(None, rblf.soong_config_get(globals, "NS2", "nonexistant_var"))
+
+goals = globals["$dist_for_goals"]
+assert_eq(
+    {
+        "goal": [("dir1/file1", "out1"), ("dir1/file2", "out2"), ("dir2/file2", "file2")]
+    },
+    { k:v for k,v in sorted(goals.items()) }
+)