Commit b3c2ec70 authored by Fahrzin Hemmati's avatar Fahrzin Hemmati

Handle multiple outs per input (for plugins)

parent a6501e4a
......@@ -91,8 +91,10 @@ def _proto_gen_impl(ctx):
),
)
for src, out in zip(srcs, ctx.outputs.outs):
for src in srcs:
args = []
src_name = src.basename[:-len(".proto")]
outs = [out for out in ctx.outputs.outs if src_name in out.basename]
in_gen_dir = src.root.path == gen_dir.rstrip('/')
if in_gen_dir:
......@@ -126,6 +128,7 @@ def _proto_gen_impl(ctx):
args += ["--%s_out=%s" % (lang, outdir)]
inputs += [plugin]
for out in outs:
if in_gen_dir:
orig_command = " ".join(
["$(realpath %s)" % ctx.executable.protoc.path] + args +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment