aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/c/generate-pc.sh
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-05-18 18:02:32 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-05-18 18:06:21 -0700
commit53cb26d05a5c2080d8022124178b1cc43a30ffe5 (patch)
treeba11f5e078e8300e0a88f96f1029c549ade2a6c0 /tensorflow/c/generate-pc.sh
parentc311af00f2d72940c75ab0fc125ba2949858b2a9 (diff)
Merge changes from github.
END_PUBLIC --- Commit c2b8927f2 authored by Dandelion Man?<dandelion@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Fix another d3v4 regression in the graph visualizer. PiperOrigin-RevId: 156343038 --- Commit 170f0b350 authored by Peter Hawkins<phawkins@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [TF:XLA] Add XLA implementation of ResourceStridedSliceAssign. PiperOrigin-RevId: 156341053 --- Commit 1390dd68f authored by Vijay Vasudevan<vrv@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: When Op Type is not registered, log the hostname of the machine that it is running on in the error message, since the message could be routed back during a failure on a remote binary, and it is hard to tell which machine it came from. Ideally, we'd somehow log the name of the binary running instead, but we don't have a function to get that right now. PiperOrigin-RevId: 156337679 --- Commit 9ca8a151b authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Internal change. PiperOrigin-RevId: 156335942 --- Commit 40255434c authored by Martin Wicke<wicke@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Deprecate contrib/learn/dataframe. To be removed June 15. PiperOrigin-RevId: 156333930 --- Commit 7f71b7fbe authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: BEGIN_PUBLIC Automated g4 rollback of changelist 156123287 PiperOrigin-RevId: 156503903
Diffstat (limited to 'tensorflow/c/generate-pc.sh')
-rwxr-xr-xtensorflow/c/generate-pc.sh63
1 files changed, 63 insertions, 0 deletions
diff --git a/tensorflow/c/generate-pc.sh b/tensorflow/c/generate-pc.sh
new file mode 100755
index 0000000000..40b3a60be9
--- /dev/null
+++ b/tensorflow/c/generate-pc.sh
@@ -0,0 +1,63 @@
+#!/usr/bin/env bash
+# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==============================================================================
+
+TF_PREFIX='/usr/local'
+
+usage() {
+ echo "Usage: $0 OPTIONS"
+ echo -e "-p, --prefix\tset installation prefix (default: /usr/local)"
+ echo -e "-v, --version\tset TensorFlow version"
+ echo -e "-h, --help\tdisplay this message"
+}
+
+# read the options
+ARGS=`getopt -o p:v:h --long prefix:,version:,help -n $0 -- "$@"`
+eval set -- "$ARGS"
+
+# extract options and their arguments into variables.
+while true ; do
+ case "$1" in
+ -h|--help) usage ; exit ;;
+ -p|--prefix)
+ case "$2" in
+ "") shift 2 ;;
+ *) TF_PREFIX=$2 ; shift 2 ;;
+ esac ;;
+ -v|--version)
+ case "$2" in
+ "") shift 2 ;;
+ *) TF_VERSION=$2 ; shift 2 ;;
+ esac ;;
+ --) shift ; echo "Try '$0 --help' for more information."; exit 1 ;;
+ *) echo "Internal error! Try '$0 --help' for more information." ; exit 1 ;;
+ esac
+done
+
+echo "Generating pkgconfig file for TensorFlow $TF_VERSION in $TF_PREFIX"
+
+cat << EOF > tensorflow.pc
+prefix=${TF_PREFIX}
+exec_prefix=\${prefix}
+libdir=\${exec_prefix}/lib
+includedir=\${prefix}/include
+
+Name: TensorFlow
+Version: ${TF_VERSION}
+Description: Library for computation using data flow graphs for scalable machine learning
+Requires:
+Libs: -L\${libdir} -ltensorflow
+Cflags: -I\${includedir}
+EOF