o Added a test case for array_types which uses the Python APIs from lldb.py,
  with the only exception of launching the process from SBTarget which is under
  investigation.

o build-swig-Python.sh should also checks the timestamp of ${swig_input_file}
  for update eligibility.  Also, once an update is in order, there's no need
  to check the remaining header files for timestamps.

o Coaches swig to treat StopReason as an int type, instead of a C++ class.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112210 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/build-swig-Python.sh b/scripts/Python/build-swig-Python.sh
index d2ed209..de26ecc 100755
--- a/scripts/Python/build-swig-Python.sh
+++ b/scripts/Python/build-swig-Python.sh
@@ -67,7 +67,7 @@
 NeedToUpdate=0
 
 
-if [ ! -f $swig_output_file ]
+if [ ! -f ${swig_output_file} ]
 then
     NeedToUpdate=1
     if [ $Debug == 1 ]
@@ -80,7 +80,7 @@
 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 @@
                 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],,'`