diff options
Diffstat (limited to 'lldb/scripts/Python')
| -rwxr-xr-x | lldb/scripts/Python/build-swig-Python.sh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lldb/scripts/Python/build-swig-Python.sh b/lldb/scripts/Python/build-swig-Python.sh index d2ed2098a5b..de26eccd80e 100755 --- a/lldb/scripts/Python/build-swig-Python.sh +++ b/lldb/scripts/Python/build-swig-Python.sh @@ -67,7 +67,7 @@ fi NeedToUpdate=0 -if [ ! -f $swig_output_file ] +if [ ! -f ${swig_output_file} ] then NeedToUpdate=1 if [ $Debug == 1 ] @@ -80,7 +80,7 @@ if [ $NeedToUpdate == 0 ] then for hdrfile in ${HEADER_FILES} do - if [ $hdrfile -nt $swig_output_file ] + if [ $hdrfile -nt ${swig_output_file} ] then NeedToUpdate=1 if [ $Debug == 1 ] @@ -88,10 +88,24 @@ then echo "${hdrfile} is newer than ${swig_output_file}" echo "swig file will need to be re-built." fi + break fi done fi +if [ $NeedToUpdate == 0 ] +then + if [ ${swig_input_file} -nt ${swig_output_file} ] + then + NeedToUpdate=1 + if [ $Debug == 1 ] + then + echo "${swig_input_file} 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],,'` |

