1load("//rules:common_settings.bzl", "int_flag", "string_flag") 2 3package( 4 default_applicable_licenses = ["//:license"], 5 default_testonly = 1, 6) 7 8licenses(["notice"]) 9 10int_flag( 11 name = "my_int_flag", 12 build_setting_default = 42, 13 make_variable = "MY_INT_FLAG", 14) 15 16string_flag( 17 name = "my_string_flag", 18 build_setting_default = "foo", 19 make_variable = "MY_STRING_FLAG", 20) 21 22sh_test( 23 name = "make_variable_test", 24 srcs = ["make_variable_test.sh"], 25 env = { 26 "MESSAGE": "Hello, $(MY_STRING_FLAG)! My name is $(MY_INT_FLAG).", 27 }, 28 toolchains = [ 29 ":my_int_flag", 30 ":my_string_flag", 31 ], 32) 33