diff options
author | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-17 15:00:27 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-17 15:00:51 -0700 |
commit | 2015dc15784e635c40f256ed9f3b9b0b3539daaf (patch) | |
tree | a68d76285c8b5cb6357a49babe2b738b5532dd45 /tensorflow/BUILD | |
parent | 28dd4d9fcbf8cac1008b2ccd2b4be3fa3c25afd1 (diff) | |
parent | 39e324505c380c9d449dc31d34629a9d470c765f (diff) |
Merge pull request #22061 from perfinion:install_headers
PiperOrigin-RevId: 213343364
Diffstat (limited to 'tensorflow/BUILD')
-rw-r--r-- | tensorflow/BUILD | 54 |
1 files changed, 41 insertions, 13 deletions
diff --git a/tensorflow/BUILD b/tensorflow/BUILD index 386e0096ff..c8e24e3aff 100644 --- a/tensorflow/BUILD +++ b/tensorflow/BUILD @@ -608,6 +608,47 @@ exports_files( ], ) +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"], +) + +genrule( + name = "root_init_gen", + srcs = select({ + "api_version_2": [":tf_python_api_gen_v2"], + "//conditions:default": [":tf_python_api_gen_v1"], + }), + outs = ["__init__.py"], + cmd = select({ + "api_version_2": "cp $(@D)/_api/v2/__init__.py $(OUTS)", + "//conditions:default": "cp $(@D)/_api/v1/__init__.py $(OUTS)", + }), +) + gen_api_init_files( name = "tf_python_api_gen_v1", srcs = ["api_template.__init__.py"], @@ -629,19 +670,6 @@ gen_api_init_files( root_init_template = "api_template.__init__.py", ) -genrule( - name = "root_init_gen", - srcs = select({ - "api_version_2": [":tf_python_api_gen_v2"], - "//conditions:default": [":tf_python_api_gen_v1"], - }), - outs = ["__init__.py"], - cmd = select({ - "api_version_2": "cp $(@D)/_api/v2/__init__.py $(OUTS)", - "//conditions:default": "cp $(@D)/_api/v1/__init__.py $(OUTS)", - }), -) - py_library( name = "tensorflow_py", srcs = ["//tensorflow/python/estimator/api:estimator_python_api_gen"], |