From 4a1921a6769b8a95e7fbdeda8c6009626c344610 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Thu, 24 May 2018 17:13:03 +0000 Subject: 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 --- third_party/repo.bzl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'third_party/repo.bzl') 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) -- cgit v1.2.3