diff options
author | Yong Tang <yong.tang.github@outlook.com> | 2018-05-24 17:13:03 +0000 |
---|---|---|
committer | Yong Tang <yong.tang.github@outlook.com> | 2018-05-24 17:13:03 +0000 |
commit | 4a1921a6769b8a95e7fbdeda8c6009626c344610 (patch) | |
tree | c12d6596de7f5d7d61dcea4aae837df31060ea46 /third_party/repo.bzl | |
parent | 717aa746e7e915cba9ce36df424d05642fbe8cd7 (diff) |
Use BUILD.bazel for third_party packages
Both `BUILD` and `BUILD.bazel` could be used as the bazel project file
and `BUILD.bazel` is preferred (see https://github.com/bazelbuild/bazel/issues/4517#issuecomment-360213750)
This fix changes generated BUILD in third_party packages to `BUILD.bazel`.
This will help avoid conflict with `BUILD` or `build` file/directory names
in third party packages.
For example, while working on 19461 I noticed that apache thrift package
consists of a `build` directory and that causes issues in case-insensitive
systems like macOS. This PR should help avoid such conflict issues.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Diffstat (limited to 'third_party/repo.bzl')
-rw-r--r-- | third_party/repo.bzl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/repo.bzl b/third_party/repo.bzl index 36f5aa5bde..c719f745ac 100644 --- a/third_party/repo.bzl +++ b/third_party/repo.bzl @@ -88,7 +88,9 @@ def _tf_http_archive(ctx): if ctx.attr.patch_file != None: _apply_patch(ctx, ctx.attr.patch_file) if ctx.attr.build_file != None: - ctx.template("BUILD", ctx.attr.build_file, { + # Use BUILD.bazel to avoid conflict with third party projects with + # BUILD or build (directory) underneath. + ctx.template("BUILD.bazel", ctx.attr.build_file, { "%prefix%": ".." if _repos_are_siblings() else "external", }, False) |