[Lldb-commits] [lldb] r138280 - /lldb/trunk/scripts/Python/build-swig-Python.sh

Johnny Chen johnny.chen at apple.com
Mon Aug 22 15:10:57 PDT 2011


Author: johnny
Date: Mon Aug 22 17:10:57 2011
New Revision: 138280

URL: http://llvm.org/viewvc/llvm-project?rev=138280&view=rev
Log:
Check the timesatmps of includees python-extensions.swig and python-wrapper.swig and force
a re-SWIG if newer than the SWIG-generated LLDBWrapPython.cpp file.

Modified:
    lldb/trunk/scripts/Python/build-swig-Python.sh

Modified: lldb/trunk/scripts/Python/build-swig-Python.sh
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/build-swig-Python.sh?rev=138280&r1=138279&r2=138280&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/build-swig-Python.sh (original)
+++ lldb/trunk/scripts/Python/build-swig-Python.sh Mon Aug 22 17:10:57 2011
@@ -20,8 +20,8 @@
 
 swig_output_file=${SRC_ROOT}/source/LLDBWrapPython.cpp
 swig_input_file=${SRC_ROOT}/scripts/lldb.swig
-swig_input_file2=${SRC_ROOT}/scripts/Python/python-extensions.swig
-
+swig_python_extensions=${SRC_ROOT}/scripts/Python/python-extensions.swig
+swig_python_wrapper=${SRC_ROOT}/scripts/Python/python-wrapper.swig
 
 if [ -n "$debug_flag" -a "$debug_flag" == "-debug" ]
 then
@@ -123,12 +123,25 @@
 
 if [ $NeedToUpdate == 0 ]
 then
-    if [ ${swig_input_file2} -nt ${swig_output_file} ]
+    if [ ${swig_python_extensions} -nt ${swig_output_file} ]
+    then
+        NeedToUpdate=1
+        if [ $Debug == 1 ]
+        then
+            echo "${swig_python_extensions} is newer than ${swig_output_file}"
+            echo "swig file will need to be re-built."
+        fi
+    fi
+fi
+
+if [ $NeedToUpdate == 0 ]
+then
+    if [ ${swig_python_wrapper} -nt ${swig_output_file} ]
     then
         NeedToUpdate=1
         if [ $Debug == 1 ]
         then
-            echo "${swig_input_file2} is newer than ${swig_output_file}"
+            echo "${swig_python_wrapper} is newer than ${swig_output_file}"
             echo "swig file will need to be re-built."
         fi
     fi





More information about the lldb-commits mailing list