ensure that changes to the typemaps are properly detected and cause SWIG to rebuild LLDBWrapPython.cpp

llvm-svn: 149606
This commit is contained in:
Enrico Granata
2012-02-02 17:26:00 +00:00
parent ef41fd31d4
commit 9d2063e49e

View File

@@ -22,6 +22,7 @@ swig_output_file=${SRC_ROOT}/source/LLDBWrapPython.cpp
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 @@ then
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],,'`