blob: 3687a2ed2e89e92c379c274b8f3a252dd9cdba95 [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",
Jakob Buchgraber1d182e92018-03-22 03:53:03 -070024 ] + glob([".bazelci/*"]),
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",
Andreas Bergmeier062da5c2017-12-01 07:30:35 -080030 srcs = glob(
31 [".git/**"],
32 exclude = [".git/**/*[*"], # gitk creates temp files with []
33 ),
Damien Martin-Guillerezd019eea2015-07-24 12:40:48 +000034)
Lukacs Berki678ba232015-09-03 13:28:55 +000035
36filegroup(
37 name = "dummy",
38 visibility = ["//visibility:public"],
39)
Han-Wen Nienhuys47182322015-10-09 17:56:52 +000040
Damien Martin-Guillerezde54bca2016-02-29 10:49:43 +000041filegroup(
Damien Martin-Guillerez9b889202016-03-03 00:35:13 +000042 name = "workspace-file",
43 srcs = [":WORKSPACE"],
Cal Peyser2152bc12016-04-22 17:08:59 +000044 visibility = [
John Cater214a7ae2017-08-09 17:24:53 +020045 "//src/test/shell/bazel:__subpackages__",
Cal Peyser2152bc12016-04-22 17:08:59 +000046 ],
Damien Martin-Guillerez9b889202016-03-03 00:35:13 +000047)
48
49filegroup(
Yun Penga50635d2016-07-26 13:29:03 +000050 name = "changelog-file",
51 srcs = [":CHANGELOG.md"],
52 visibility = [
John Caterb0308d42017-01-30 17:49:26 +000053 "//scripts/packages:__subpackages__",
Yun Penga50635d2016-07-26 13:29:03 +000054 ],
55)
56
57filegroup(
Jakob Buchgraber6073f1d2017-06-06 11:58:26 -040058 name = "bootstrap-derived-java-srcs",
59 srcs = glob(["derived/**/*.java"]),
60 visibility = ["//:__subpackages__"],
61)
62
Damien Martin-Guillerezde54bca2016-02-29 10:49:43 +000063load("//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
64
65pkg_tar(
66 name = "bazel-srcs",
John Cater214a7ae2017-08-09 17:24:53 +020067 srcs = [":srcs"],
Damien Martin-Guillerezde54bca2016-02-29 10:49:43 +000068 strip_prefix = ".",
69 # Public but bazel-only visibility.
70 visibility = ["//:__subpackages__"],
71)
Klaus Aehlig4ca79d42016-10-22 07:59:41 +000072
László Csomor0783b9e2017-08-11 10:28:36 +020073py_binary(
74 name = "combine_distfiles",
75 srcs = ["combine_distfiles.py"],
76 visibility = ["//visibility:private"],
77 deps = ["//src:create_embedded_tools_lib"],
78)
79
Klaus Aehlig4ca79d42016-10-22 07:59:41 +000080genrule(
81 name = "bazel-distfile",
82 srcs = [
83 ":bazel-srcs",
84 "//src:derived_java_srcs",
Shahan Yang1a4f7912017-12-19 14:50:53 -080085 "//src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec:bootstrap_autocodec.tar",
Klaus Aehlig4ca79d42016-10-22 07:59:41 +000086 ],
87 outs = ["bazel-distfile.zip"],
László Csomor0783b9e2017-08-11 10:28:36 +020088 cmd = "$(location :combine_distfiles) $@ $(SRCS)",
89 tools = [":combine_distfiles"],
Klaus Aehlig279a0612016-11-11 09:51:44 +000090 # Public but bazel-only visibility.
91 visibility = ["//:__subpackages__"],
Klaus Aehlig4ca79d42016-10-22 07:59:41 +000092)
Klaus Aehlig52b03d12016-11-24 15:16:01 +000093
94genrule(
95 name = "bazel-distfile-tar",
96 srcs = [
97 ":bazel-srcs",
98 "//src:derived_java_srcs",
Shahan Yang1a4f7912017-12-19 14:50:53 -080099 "//src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec:bootstrap_autocodec.tar",
Klaus Aehlig52b03d12016-11-24 15:16:01 +0000100 ],
101 outs = ["bazel-distfile.tar"],
László Csomor0783b9e2017-08-11 10:28:36 +0200102 cmd = "$(location :combine_distfiles_to_tar.sh) $@ $(SRCS)",
103 tools = ["combine_distfiles_to_tar.sh"],
Klaus Aehlig52b03d12016-11-24 15:16:01 +0000104 # Public but bazel-only visibility.
105 visibility = ["//:__subpackages__"],
106)
Googlercc858622017-07-25 21:03:05 +0200107
108# This is a workaround for fetching Bazel toolchains, for remote execution.
109# See https://github.com/bazelbuild/bazel/issues/3246.
110# Will be removed once toolchain fetching is supported.
111filegroup(
112 name = "dummy_toolchain_reference",
xingaobea67122018-01-16 08:29:59 -0800113 srcs = ["@bazel_toolchains//configs/debian8_clang/0.2.0/bazel_0.9.0:empty"],
Googlercc858622017-07-25 21:03:05 +0200114 visibility = ["//visibility:public"],
115)