aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/BUILD
diff options
context:
space:
mode:
authorGravatar Jason Zaman <jason@perfinion.com>2018-09-04 15:01:22 +0800
committerGravatar Jason Zaman <jason@perfinion.com>2018-09-05 21:26:18 +0800
commit39e324505c380c9d449dc31d34629a9d470c765f (patch)
treeabcaf280e403cd2412fd7916ebc80e52e06d1626 /tensorflow/BUILD
parentffaab58cad72e177ada0e7d1d3724de63032928d (diff)
Add //tensorflow:install_headers target
Used to prepare all the header files so they can easily be installed into /usr/include when packaging TF. Signed-off-by: Jason Zaman <jason@perfinion.com>
Diffstat (limited to 'tensorflow/BUILD')
-rw-r--r--tensorflow/BUILD28
1 files changed, 28 insertions, 0 deletions
diff --git a/tensorflow/BUILD b/tensorflow/BUILD
index 661cba5ff0..768d4107d8 100644
--- a/tensorflow/BUILD
+++ b/tensorflow/BUILD
@@ -617,3 +617,31 @@ py_library(
visibility = ["//visibility:public"],
deps = ["//tensorflow/python:no_contrib"],
)
+
+genrule(
+ name = "install_headers",
+ srcs = [
+ "//tensorflow/c:headers",
+ "//tensorflow/c/eager:headers",
+ "//tensorflow/cc:headers",
+ "//tensorflow/core:headers",
+ ],
+ outs = ["include"],
+ cmd = """
+ mkdir $@
+ for f in $(SRCS); do
+ d="$${f%/*}"
+ d="$${d#bazel-out*genfiles/}"
+ d="$${d#*external/eigen_archive/}"
+
+ if [[ $${d} == *local_config_* ]]; then
+ continue
+ fi
+
+ mkdir -p "$@/$${d}"
+ cp "$${f}" "$@/$${d}/"
+ done
+ """,
+ tags = ["manual"],
+ visibility = ["//visibility:public"],
+)