Reputation: 14071
I have a label //foo_base:bar
, which produces a foo_base/bar_0_8_9.tar
.
Now I need to have this also as foo_concrete/bar.tar
(in package //foo_concrete
).
This should be possible by writing some action that does copy of the file. But this seems excessive. Is there a more elegant solution?
Upvotes: 1
Views: 1718
Reputation: 140504
You can use a genrule to create a symlink:
genrule(
name = "make_bar_tar",
srcs = ["//foo_base:bar"],
outs = ["bar.tar"],
cmd = "ln -s $(location //foo_base:bar) $@")
Upvotes: 4