From 9bffde4980cbe1a9a77d6ab6962ec89293e7f5b6 Mon Sep 17 00:00:00 2001 From: Gunhan Gulsoy Date: Fri, 23 Dec 2016 20:57:51 -0800 Subject: Rename the expand_header_template template_rule. --- third_party/common.bzl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'third_party/common.bzl') 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, ) -- cgit v1.2.3