forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
68 lines (63 loc) · 1.74 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Scripts for IDE / Environment support for Bazel
package(default_visibility = ["//visibility:private"])
# The master copy of the completion logic lives in bazel-complete-header.bash
# and bazel-complete-template.bash. You should make edits in those files.
genrule(
name = "bash_completion",
srcs = [
"bazel-complete-header.bash",
"bazel-complete-template.bash",
],
outs = ["bazel-complete.bash"],
cmd = " ".join([
"$(location :generate_bash_completion.sh)",
"--bazel=$(location //src:bazel)",
"--output=$@",
"--prepend=$(location bazel-complete-header.bash)",
"--prepend=$(location bazel-complete-template.bash)",
]),
output_to_bindir = 1,
tools = [
":generate_bash_completion.sh",
"//src:bazel",
],
visibility = ["//scripts/packages:__subpackages__"],
)
sh_test(
name = "bash_completion_test",
size = "small",
srcs = ["bash_completion_test.sh"],
data = [
"bazel-complete.bash",
"testenv.sh",
"//src/test/shell:bashunit",
],
)
filegroup(
name = "srcs",
srcs = glob(["**"]) + [
"//scripts/packages:srcs",
"//scripts/release:srcs",
"//scripts/zsh_completion:srcs",
],
visibility = ["//:__pkg__"],
)
py_binary(
name = "generate_fish_completion",
srcs = ["generate_fish_completion.py"],
deps = ["//third_party/py/abseil"],
)
genrule(
name = "fish_completion",
outs = ["bazel.fish"],
cmd = " ".join([
"$(location :generate_fish_completion)",
"--bazel=$(location //src:bazel)",
"--output=$@",
]),
tools = [
":generate_fish_completion",
"//src:bazel",
],
visibility = ["//scripts/packages:__subpackages__"],
)