ensure that changes to the typemaps are properly detected and cause SWIG to rebuild LLDBWrapPython.cpp
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149606 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/build-swig-Python.sh b/scripts/Python/build-swig-Python.sh
index 557f63a..6ccea31 100755
--- a/scripts/Python/build-swig-Python.sh
+++ b/scripts/Python/build-swig-Python.sh
@@ -22,6 +22,7 @@
swig_input_file=${SRC_ROOT}/scripts/lldb.swig
swig_python_extensions=${SRC_ROOT}/scripts/Python/python-extensions.swig
swig_python_wrapper=${SRC_ROOT}/scripts/Python/python-wrapper.swig
+swig_python_typemaps=${SRC_ROOT}/scripts/Python/python-typemaps.swig
if [ "x$SDKROOT" = "x" ] ; then
@@ -209,6 +210,19 @@
fi
fi
+if [ $NeedToUpdate == 0 ]
+then
+ if [ ${swig_python_typemaps} -nt ${swig_output_file} ]
+ then
+ NeedToUpdate=1
+ if [ $Debug == 1 ]
+ then
+ echo "${swig_python_typemaps} is newer than ${swig_output_file}"
+ echo "swig file will need to be re-built."
+ fi
+ fi
+fi
+
os_name=`uname -s`
python_version=`/usr/bin/python --version 2>&1 | sed -e 's,Python ,,' -e 's,[.][0-9],,2' -e 's,[a-z][a-z][0-9],,'`