Bazel: copy multiple files to binary directory
<p>I need to copy some files to binary directory while preserving their names. What I've got so far:</p>

<pre><code>filegroup(
    name = "resources",
    srcs = glob(["resources/*.*"]),
)

genrule(
    name = "copy_resources",
    srcs = ["//some/package:resources"],
    outs = [ ],
    cmd = "cp $(SRCS) $(@D)",
    local = 1,
    output_to_bindir = 1,
)
</code></pre>

<p>Now I have to specify file names in <code>outs</code> but I can't seem to figure out how to resolve the labels to obtain the actual file names.</p>