aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/swig
diff options
context:
space:
mode:
authorGravatar Geoffrey Irving <geoffreyi@google.com>2016-03-22 16:28:38 -0700
committerGravatar Geoffrey Irving <geoffreyi@google.com>2016-03-24 09:47:00 -0700
commitd782317f55a1fc4944cb321c5c8132a7514acadc (patch)
treee8d407e2123ba349f941975cdc0e8d44da6a9f02 /tensorflow/tools/swig
parent44e95baf4545c0b7e4ea7351da44e67de698c6a8 (diff)
Make configure hard code path to swig
I've set it up to just try "swig" if configure hasn't been run since syncing to this change, so users who sync and have no swig issues won't have to do anything new. Fixes #1329.
Diffstat (limited to 'tensorflow/tools/swig')
-rw-r--r--tensorflow/tools/swig/.gitignore1
-rwxr-xr-xtensorflow/tools/swig/swig.sh10
2 files changed, 10 insertions, 1 deletions
diff --git a/tensorflow/tools/swig/.gitignore b/tensorflow/tools/swig/.gitignore
new file mode 100644
index 0000000000..a14f886013
--- /dev/null
+++ b/tensorflow/tools/swig/.gitignore
@@ -0,0 +1 @@
+swig_path
diff --git a/tensorflow/tools/swig/swig.sh b/tensorflow/tools/swig/swig.sh
index c35b2ee363..367dcb4cd0 100755
--- a/tensorflow/tools/swig/swig.sh
+++ b/tensorflow/tools/swig/swig.sh
@@ -14,4 +14,12 @@
# limitations under the License.
# ==============================================================================
-swig "$@"
+# If possible, read swig path out of "swig_path" generated by configure
+SWIG=swig
+SWIG_PATH=tensorflow/tools/swig/swig_path
+if [ -e $SWIG_PATH ]; then
+ SWIG=`cat $SWIG_PATH`
+fi
+
+# If this line fails, rerun configure to set the path to swig correctly
+"$SWIG" "$@"