2
0
Fork 0
mirror of https://github.com/bazelbuild/bazel-skylib synced 2024-11-28 08:43:51 +00:00
bazel-skylib/rules
Fabian Meumertzheim 8386b9d32b
Expose int- and string-valued build settings as Make variables (#440)
While build settings allow for much cleaner flag and setting definitions
than `--define`, they have the major drawback that rules need to provide
dedicated support for them, which isn't the case for native and most
community-maintained rules.

This change attempts to bridge this gap by optionally exposing the value
of the common build setting types as Make variables to rules that depend
on them via the `toolchains` attribute: If the new `make_variable`
attribute is set, the value of the flag or setting is available as a
Make variable with that.

Consistency with pre-defined Make variables is enforced by limiting the
character set for `make_variable` values to `[A-Z0-9_]`. The new
attribute is also only added to int- and string-valued build settings as
the other types lack a canonical stringification.

Co-authored-by: Xùdōng Yáng <wyverald@gmail.com>
2023-08-22 19:41:36 +00:00
..
private Bump stardoc dep to unbreak build with --experimental_enable_bzlmod (#398) 2022-10-03 05:13:46 -04:00
analysis_test.bzl Fix linter warnings with new buildifier version. (#349) 2022-02-10 14:50:56 -05:00
BUILD Add copy_directory rule (#366) 2022-06-01 09:58:09 +02:00
build_test.bzl Avoid building build_test deps unnecessarily (#448) 2023-05-31 11:37:12 -04:00
common_settings.bzl Expose int- and string-valued build settings as Make variables (#440) 2023-08-22 19:41:36 +00:00
copy_directory.bzl Add copy_directory rule (#366) 2022-06-01 09:58:09 +02:00
copy_file.bzl maprule: hide it, not ready for public use. (#133) 2019-03-20 18:13:32 +01:00
diff_test.bzl Bump stardoc dep to unbreak build with --experimental_enable_bzlmod (#398) 2022-10-03 05:13:46 -04:00
expand_template.bzl Fix spelling (#445) 2023-04-26 21:55:09 -04:00
native_binary.bzl Add missing docs and doc links; update bazel.build links (#387) 2022-09-01 08:19:43 -04:00
run_binary.bzl Bump stardoc dep to unbreak build with --experimental_enable_bzlmod (#398) 2022-10-03 05:13:46 -04:00
select_file.bzl Add missing docs and doc links; update bazel.build links (#387) 2022-09-01 08:19:43 -04:00
write_file.bzl maprule: hide it, not ready for public use. (#133) 2019-03-20 18:13:32 +01:00