diff options
author | Gunhan Gulsoy <gunan@google.com> | 2016-12-23 20:57:51 -0800 |
---|---|---|
committer | Gunhan Gulsoy <gunan@google.com> | 2016-12-23 20:57:51 -0800 |
commit | 9bffde4980cbe1a9a77d6ab6962ec89293e7f5b6 (patch) | |
tree | f871d709c244abdbfe33326ca239b2087f2b7b9e /third_party/common.bzl | |
parent | 72f1ba04dda9202ab44aaaf2cda2bbba44107d8b (diff) |
Rename the expand_header_template template_rule.
Diffstat (limited to 'third_party/common.bzl')
-rw-r--r-- | third_party/common.bzl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/third_party/common.bzl b/third_party/common.bzl index d2b1422227..db981a5e31 100644 --- a/third_party/common.bzl +++ b/third_party/common.bzl @@ -3,8 +3,8 @@ # and replaces them with the corresponding values. # # Typical usage: -# load("/tools/build_rules/expand_header_template", "expand_header_template") -# expand_header_template( +# load("/tools/build_rules/template_rule", "expand_header_template") +# template_rule( # name = "ExpandMyTemplate", # src = "my.template", # out = "my.txt", @@ -20,14 +20,14 @@ # out: The destination of the expanded file # substitutions: A dictionary mapping strings to their substitutions -def expand_header_template_impl(ctx): +def template_rule_impl(ctx): ctx.template_action( template = ctx.file.src, output = ctx.outputs.out, substitutions = ctx.attr.substitutions, ) -expand_header_template = rule( +template_rule = rule( attrs = { "src": attr.label( mandatory = True, @@ -39,5 +39,5 @@ expand_header_template = rule( }, # output_to_genfiles is required for header files. output_to_genfiles = True, - implementation = expand_header_template_impl, + implementation = template_rule_impl, ) |