Commit graph

7 commits

Author SHA1 Message Date
Cole Faust
c63ce1ab58 Allow importing starlark code in makefiles
Adds a new `$(call run-starlark,my/starlark/file.bzl)` function that
will run the starlark file and set all the variables in the
variables_to_export_to_make dictionary as make variables.

Fixes: 280685526
Test: m nothing repeatedly causes no ninja regeneration, but touching all_versions.bzl does. go test, ./out/rbcrun -mode=rbc ./build/make/tests/run.rbc
Change-Id: Ic72e18dd28dba8233ba2dfb658b5d03ccece1bfd
2023-05-09 15:12:58 -07:00
Cole Faust
a874f88cee Remove unneeded rbcrun features
- rblf_cli and rblf_env
- -c and -f

This is in preparation for making rbcrun able to function as a more
general purpose starlark interpreter.

Bug: 280685526
Test: go test, ./out/rbc ./build/make/tests/run.rbc, ./build/bazel/ci/rbc_dashboard.py --quick aosp_arm64
Change-Id: Ifff9ce7b4369422f39c5003bb85a168c78bde7cf
2023-05-05 11:52:02 -07:00
Cole Faust
c7b8b6ed88 Sort rblf_wildcard results and remove file existence functions
Kati's $(wildcard) results are guaranteed to be sorted,
but go's filepath.Glob() is not.

Remove the file existence functions because they can
just be replaced with wildcards.

Bug: 226974242
Test: go test
Change-Id: I02fb6292b932bc28cd856ec3c7cb9ed9e96ca630
2022-04-26 12:15:41 -07:00
Cole Faust
62878a2cef Remove regex functionality from rbcrun
As a first step to making .rbc files compatible with bazel,
remove regex support since bazel doesn't have it.

Fixes: 227384703
Test: ./out/rbcrun ./build/make/tests/run.rbc
Change-Id: I8b946c20cc42897a47a5516a167732f4e16b6158
2022-03-30 12:00:15 -07:00
Sasha Smundak
6b795dc6a5 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
2021-08-19 13:54:53 -07:00
Sasha Smundak
3c569799ca Fix rblf_file_exists, it should return true for a directory, too.
Fixes: 184278019
Test: internal
Change-Id: I68c3274a4540dd36e047d6c2027766dbe75d38f8
2021-08-10 09:12:56 -07:00
Sasha Smundak
24159db21e Roboleaf product configuration runner
The application rbcrun executes Starlark scripts that define Android product configurations.
See README.md for details.

Test: go test
Fixes: 180529448
Change-Id: I7d728b47d3f381b7052a0d7d51c9e698e5c2e316
2021-03-18 10:03:59 -07:00