• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash -x
2# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15# ==============================================================================
16# This script generates the source file lists needed by the makefile by querying
17# the master Bazel build configuration.
18
19bazel query 'kind("source file", deps(//tensorflow/core:android_tensorflow_lib))' | \
20grep "//tensorflow/.*\.proto$" | \
21sed -E 's#^//##g' | \
22sed -E 's#:#/#g' \
23> tensorflow/contrib/makefile/tf_proto_files.txt
24
25bazel query 'kind("generated file", deps(//tensorflow/core:proto_text))' | \
26grep "pb_text\.cc$" | \
27sed -E 's#^//##g' | \
28sed -E 's#:#/#g' \
29> tensorflow/contrib/makefile/tf_pb_text_files.txt
30
31bazel query 'kind("source file", deps(//tensorflow/tools/proto_text:gen_proto_text_functions))' | \
32grep -E "//tensorflow/.*\.cc$" | \
33grep -E -v "jpeg" | \
34grep -E -v "png" | \
35sed -E 's#^//##g' | \
36sed -E 's#:#/#g' \
37> tensorflow/contrib/makefile/proto_text_cc_files.txt
38
39bazel query 'kind("generated file", deps(//tensorflow/tools/proto_text:gen_proto_text_functions))' | \
40grep -E "//tensorflow/.*\.cc$" | \
41sed -E 's#^//##g' | \
42sed -E 's#:#/#g' \
43> tensorflow/contrib/makefile/proto_text_pb_cc_files.txt
44
45bazel query 'kind("generated file", deps(//tensorflow/tools/proto_text:gen_proto_text_functions))' | \
46grep -E "//tensorflow/.*\.h$" | \
47sed -E 's#^//##g' | \
48sed -E 's#:#/#g' \
49> tensorflow/contrib/makefile/proto_text_pb_h_files.txt
50