Home | History | Annotate | Download | only in makefile
      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 
     19 bazel query 'kind("source file", deps(//tensorflow/core:android_tensorflow_lib))' | \
     20 grep "//tensorflow/.*\.proto$" | \
     21 sed -E 's#^//##g' | \
     22 sed -E 's#:#/#g' \
     23 > tensorflow/contrib/makefile/tf_proto_files.txt
     24 
     25 bazel query 'kind("generated file", deps(//tensorflow/core:proto_text))' | \
     26 grep "pb_text\.cc$" | \
     27 sed -E 's#^//##g' | \
     28 sed -E 's#:#/#g' \
     29 > tensorflow/contrib/makefile/tf_pb_text_files.txt
     30 
     31 bazel query 'kind("source file", deps(//tensorflow/tools/proto_text:gen_proto_text_functions))' | \
     32 grep -E "//tensorflow/.*\.cc$" | \
     33 grep -E -v "jpeg" | \
     34 grep -E -v "png" | \
     35 sed -E 's#^//##g' | \
     36 sed -E 's#:#/#g' \
     37 > tensorflow/contrib/makefile/proto_text_cc_files.txt
     38 
     39 bazel query 'kind("generated file", deps(//tensorflow/tools/proto_text:gen_proto_text_functions))' | \
     40 grep -E "//tensorflow/.*\.cc$" | \
     41 sed -E 's#^//##g' | \
     42 sed -E 's#:#/#g' \
     43 > tensorflow/contrib/makefile/proto_text_pb_cc_files.txt
     44 
     45 bazel query 'kind("generated file", deps(//tensorflow/tools/proto_text:gen_proto_text_functions))' | \
     46 grep -E "//tensorflow/.*\.h$" | \
     47 sed -E 's#^//##g' | \
     48 sed -E 's#:#/#g' \
     49 > tensorflow/contrib/makefile/proto_text_pb_h_files.txt
     50