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
This commit is contained in:
Cole Faust
2023-05-09 14:56:36 -07:00
parent 20f0cd3f91
commit c63ce1ab58
9 changed files with 310 additions and 74 deletions

View File

@@ -247,7 +247,7 @@ else
endif
$(shell build/soong/scripts/update_out $(OUT_DIR)/rbc/rbc_product_config_results.mk \
$(OUT_DIR)/rbcrun $(OUT_DIR)/rbc/launcher.rbc)
$(OUT_DIR)/rbcrun --mode=rbc $(OUT_DIR)/rbc/launcher.rbc)
ifneq ($(.SHELLSTATUS),0)
$(error product configuration runner failed: $(.SHELLSTATUS))
endif