blob: 9d65300389066ae711af01227614ee4e7822b7b4 [file] [log] [blame]
Ulf Adams3e87c622017-06-13 10:53:13 +02001# Bazel - Google's Build System
2
Damien Martin-Guillerezd019eea2015-07-24 12:40:48 +00003package(default_visibility = ["//scripts/release:__pkg__"])
4
Philipp Wollermann02401d92017-03-17 13:51:14 +00005exports_files(["LICENSE"])
6
Damien Martin-Guillerezd019eea2015-07-24 12:40:48 +00007filegroup(
Ulf Adams3e87c622017-06-13 10:53:13 +02008 name = "srcs",
9 srcs = glob(
10 ["*"],
11 exclude = [
12 "bazel-*", # convenience symlinks
13 "out", # IntelliJ with setup-intellij.sh
14 "output", # output of compile.sh
15 ".*", # mainly .git* files
16 ],
17 ) + [
18 "//examples:srcs",
19 "//scripts:srcs",
20 "//site:srcs",
21 "//src:srcs",
22 "//tools:srcs",
23 "//third_party:srcs",
24 ],
Damien Martin-Guillerez0baff0f2017-08-22 17:40:37 +020025 visibility = ["//src/test/shell/bazel:__pkg__"],
Ulf Adams3e87c622017-06-13 10:53:13 +020026)
27
28filegroup(
Damien Martin-Guillerezd019eea2015-07-24 12:40:48 +000029 name = "git",
30 srcs = glob([".git/**"]),
31)
Lukacs Berki678ba232015-09-03 13:28:55 +000032
33filegroup(
34 name = "dummy",
35 visibility = ["//visibility:public"],
36)
Han-Wen Nienhuys47182322015-10-09 17:56:52 +000037
Damien Martin-Guillerezde54bca2016-02-29 10:49:43 +000038filegroup(
Damien Martin-Guillerez9b889202016-03-03 00:35:13 +000039 name = "workspace-file",
40 srcs = [":WORKSPACE"],
Cal Peyser2152bc12016-04-22 17:08:59 +000041 visibility = [
dmarting0010cc92017-06-27 14:57:21 +020042 "//src/test/docker:__pkg__",
John Cater214a7ae2017-08-09 17:24:53 +020043 "//src/test/shell/bazel:__subpackages__",
Cal Peyser2152bc12016-04-22 17:08:59 +000044 ],
Damien Martin-Guillerez9b889202016-03-03 00:35:13 +000045)
46
47filegroup(
Yun Penga50635d2016-07-26 13:29:03 +000048 name = "changelog-file",
49 srcs = [":CHANGELOG.md"],
50 visibility = [
John Caterb0308d42017-01-30 17:49:26 +000051 "//scripts/packages:__subpackages__",
Yun Penga50635d2016-07-26 13:29:03 +000052 ],
53)
54
55filegroup(
Jakob Buchgraber6073f1d2017-06-06 11:58:26 -040056 name = "bootstrap-derived-java-srcs",
57 srcs = glob(["derived/**/*.java"]),
58 visibility = ["//:__subpackages__"],
59)
60
Damien Martin-Guillerezde54bca2016-02-29 10:49:43 +000061load("//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
62
63pkg_tar(
64 name = "bazel-srcs",
John Cater214a7ae2017-08-09 17:24:53 +020065 srcs = [":srcs"],
Damien Martin-Guillerezde54bca2016-02-29 10:49:43 +000066 strip_prefix = ".",
67 # Public but bazel-only visibility.
68 visibility = ["//:__subpackages__"],
69)
Klaus Aehlig4ca79d42016-10-22 07:59:41 +000070
László Csomor0783b9e2017-08-11 10:28:36 +020071py_binary(
72 name = "combine_distfiles",
73 srcs = ["combine_distfiles.py"],
74 visibility = ["//visibility:private"],
75 deps = ["//src:create_embedded_tools_lib"],
76)
77
Klaus Aehlig4ca79d42016-10-22 07:59:41 +000078genrule(
79 name = "bazel-distfile",
80 srcs = [
81 ":bazel-srcs",
82 "//src:derived_java_srcs",
83 ],
84 outs = ["bazel-distfile.zip"],
László Csomor0783b9e2017-08-11 10:28:36 +020085 cmd = "$(location :combine_distfiles) $@ $(SRCS)",
86 tools = [":combine_distfiles"],
Klaus Aehlig279a0612016-11-11 09:51:44 +000087 # Public but bazel-only visibility.
88 visibility = ["//:__subpackages__"],
Klaus Aehlig4ca79d42016-10-22 07:59:41 +000089)
Klaus Aehlig52b03d12016-11-24 15:16:01 +000090
91genrule(
92 name = "bazel-distfile-tar",
93 srcs = [
94 ":bazel-srcs",
95 "//src:derived_java_srcs",
96 ],
97 outs = ["bazel-distfile.tar"],
László Csomor0783b9e2017-08-11 10:28:36 +020098 cmd = "$(location :combine_distfiles_to_tar.sh) $@ $(SRCS)",
99 tools = ["combine_distfiles_to_tar.sh"],
Klaus Aehlig52b03d12016-11-24 15:16:01 +0000100 # Public but bazel-only visibility.
101 visibility = ["//:__subpackages__"],
102)
Googlercc858622017-07-25 21:03:05 +0200103
104# This is a workaround for fetching Bazel toolchains, for remote execution.
105# See https://github.com/bazelbuild/bazel/issues/3246.
106# Will be removed once toolchain fetching is supported.
107filegroup(
108 name = "dummy_toolchain_reference",
109 srcs = ["@bazel_toolchains//configs/debian8_clang/0.1.0:empty"],
110 visibility = ["//visibility:public"],
111)