[Lldb-commits] [lldb] r164801 - in /lldb/trunk/scripts: Python/build-swig-Python.sh Python/finish-swig-Python-LLDB.sh build-swig-wrapper-classes.sh finish-swig-wrapper-classes.sh

Jason Molenda jmolenda at apple.com
Thu Sep 27 14:26:57 PDT 2012


Author: jmolenda
Date: Thu Sep 27 16:26:57 2012
New Revision: 164801

URL: http://llvm.org/viewvc/llvm-project?rev=164801&view=rev
Log:
Patch from Dan Malea to get the Bourne shells scripts to run cleanly on Ubuntu.  


Modified:
    lldb/trunk/scripts/Python/build-swig-Python.sh
    lldb/trunk/scripts/Python/finish-swig-Python-LLDB.sh
    lldb/trunk/scripts/build-swig-wrapper-classes.sh
    lldb/trunk/scripts/finish-swig-wrapper-classes.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=164801&r1=164800&r2=164801&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/build-swig-Python.sh (original)
+++ lldb/trunk/scripts/Python/build-swig-Python.sh Thu Sep 27 16:26:57 2012
@@ -19,7 +19,7 @@
 SWIG=$6
 
 os_name=`uname -s`
-if [ "$os_name" == "Darwin" ]
+if [ "$os_name" = "Darwin" ]
 then
   swig_output_file=${SRC_ROOT}/source/LLDBWrapPython.cpp
 else
@@ -40,7 +40,7 @@
 
 else
 
-if [ -n "$debug_flag" -a "$debug_flag" == "-debug" ]
+if [ -n "$debug_flag" -a "$debug_flag" = "-debug" ]
 then
     Debug=1
 else
@@ -148,13 +148,13 @@
 " ${SRC_ROOT}/scripts/Python/interface/SBValueList.i"\
 " ${SRC_ROOT}/scripts/Python/interface/SBWatchpoint.i"
 
-if [ $Debug == 1 ]
+if [ $Debug -eq 1 ]
 then
     echo "Header files are:"
     echo ${HEADER_FILES}
 fi
 
-if [ $Debug == 1 ]
+if [ $Debug -eq 1 ]
 then
     echo "SWIG interface files are:"
     echo ${INTERFACE_FILES}
@@ -166,20 +166,20 @@
 if [ ! -f ${swig_output_file} ]
 then
     NeedToUpdate=1
-    if [ $Debug == 1 ]
+    if [ $Debug -eq 1 ]
     then
         echo "Failed to find LLDBWrapPython.cpp"
     fi
 fi
 
-if [ $NeedToUpdate == 0 ]
+if [ $NeedToUpdate -eq 0 ]
 then
     for hdrfile in ${HEADER_FILES}
     do
         if [ $hdrfile -nt ${swig_output_file} ]
         then
             NeedToUpdate=1
-            if [ $Debug == 1 ]
+            if [ $Debug -eq 1 ]
             then
                 echo "${hdrfile} is newer than ${swig_output_file}"
                 echo "swig file will need to be re-built."
@@ -189,14 +189,14 @@
     done
 fi
 
-if [ $NeedToUpdate == 0 ]
+if [ $NeedToUpdate -eq 0 ]
 then
     for intffile in ${INTERFACE_FILES}
     do
         if [ $intffile -nt ${swig_output_file} ]
         then
             NeedToUpdate=1
-            if [ $Debug == 1 ]
+            if [ $Debug -eq 1 ]
             then
                 echo "${intffile} is newer than ${swig_output_file}"
                 echo "swig file will need to be re-built."
@@ -206,12 +206,12 @@
     done
 fi
 
-if [ $NeedToUpdate == 0 ]
+if [ $NeedToUpdate -eq 0 ]
 then
     if [ ${swig_input_file} -nt ${swig_output_file} ]
     then
         NeedToUpdate=1
-        if [ $Debug == 1 ]
+        if [ $Debug -eq 1 ]
         then
             echo "${swig_input_file} is newer than ${swig_output_file}"
             echo "swig file will need to be re-built."
@@ -219,12 +219,12 @@
     fi
 fi
 
-if [ $NeedToUpdate == 0 ]
+if [ $NeedToUpdate -eq 0 ]
 then
     if [ ${swig_python_extensions} -nt ${swig_output_file} ]
     then
         NeedToUpdate=1
-        if [ $Debug == 1 ]
+        if [ $Debug -eq 1 ]
         then
             echo "${swig_python_extensions} is newer than ${swig_output_file}"
             echo "swig file will need to be re-built."
@@ -232,12 +232,12 @@
     fi
 fi
 
-if [ $NeedToUpdate == 0 ]
+if [ $NeedToUpdate -eq 0 ]
 then
     if [ ${swig_python_wrapper} -nt ${swig_output_file} ]
     then
         NeedToUpdate=1
-        if [ $Debug == 1 ]
+        if [ $Debug -eq 1 ]
         then
             echo "${swig_python_wrapper} is newer than ${swig_output_file}"
             echo "swig file will need to be re-built."
@@ -245,12 +245,12 @@
     fi
 fi
 
-if [ $NeedToUpdate == 0 ]
+if [ $NeedToUpdate -eq 0 ]
 then
     if [ ${swig_python_typemaps} -nt ${swig_output_file} ]
     then
         NeedToUpdate=1
-        if [ $Debug == 1 ]
+        if [ $Debug -eq 1 ]
         then
             echo "${swig_python_typemaps} is newer than ${swig_output_file}"
             echo "swig file will need to be re-built."
@@ -260,7 +260,7 @@
 
 python_version=`/usr/bin/env python --version 2>&1 | sed -e 's,Python ,,' -e 's,[.][0-9],,2' -e 's,[a-z][a-z][0-9],,'`
 
-if [ "$os_name" == "Darwin" ]
+if [ "$os_name" = "Darwin" ]
 then
     framework_python_dir="${TARGET_DIR}/LLDB.framework/Resources/Python"
 else
@@ -279,7 +279,7 @@
 fi
 
 
-if [ $NeedToUpdate == 0 ]
+if [ $NeedToUpdate -eq 0 ]
 then
     echo "Everything is up-to-date."
     exit 0

Modified: lldb/trunk/scripts/Python/finish-swig-Python-LLDB.sh
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/finish-swig-Python-LLDB.sh?rev=164801&r1=164800&r2=164801&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/finish-swig-Python-LLDB.sh (original)
+++ lldb/trunk/scripts/Python/finish-swig-Python-LLDB.sh Thu Sep 27 16:26:57 2012
@@ -39,7 +39,7 @@
 
 if [ ! "$LLDB_DISABLE_PYTHON" = "1" ] ; then
 
-if [ -n "$debug_flag" -a "$debug_flag" == "-debug" ]
+if [ -n "$debug_flag" -a "$debug_flag" = "-debug" ]
 then
     Debug=1
 else
@@ -50,7 +50,7 @@
 PYTHON_VERSION=`/usr/bin/env python --version 2>&1 | sed -e 's,Python ,,' -e 's,[.][0-9],,2' -e 's,[a-z][a-z][0-9],,'`
 
 
-if [ $Debug == 1 ]
+if [ $Debug -eq 1 ]
 then
     echo "The current OS is $OS_NAME"
     echo "The Python version is $PYTHON_VERSION"
@@ -59,7 +59,7 @@
 #
 #  Determine where to put the files.
 
-if [ ${OS_NAME} == "Darwin" ]
+if [ ${OS_NAME} = "Darwin" ]
 then
     # We are on a Darwin system, so all the lldb Python files can go 
     # into the LLDB.framework/Resources/Python subdirectory.
@@ -69,7 +69,7 @@
         echo "Error:  Unable to find LLDB.framework" >&2
         exit 1
     else
-        if [ $Debug == 1 ]
+        if [ $Debug -eq 1 ]
         then
             echo "Found ${TARGET_DIR}/LLDB.framework."
         fi
@@ -91,7 +91,7 @@
 # already exist, attempt to make it.
 #
 
-if [ $Debug == 1 ]
+if [ $Debug -eq 1 ]
 then
     echo "Python files will be put in ${framework_python_dir}"
 fi
@@ -102,13 +102,13 @@
 do
     if [ ! -d "${python_dir}" ]
     then
-        if [ $Debug == 1 ]
+        if [ $Debug -eq 1 ]
         then
             echo "Making directory ${python_dir}"
         fi
         mkdir -p "${python_dir}"
     else
-        if [ $Debug == 1 ]
+        if [ $Debug -eq 1 ]
         then
             echo "${python_dir} already exists."
         fi
@@ -126,17 +126,17 @@
 
 if [ ! -L "${framework_python_dir}/_lldb.so" ]
 then
-    if [ $Debug == 1 ]
+    if [ $Debug -eq 1 ]
     then
         echo "Creating symlink for _lldb.so"
     fi
-    if [ ${OS_NAME} == "Darwin" ]
+    if [ ${OS_NAME} = "Darwin" ]
     then
         cd "${framework_python_dir}"
         ln -s "../../../LLDB" _lldb.so
     fi
 else
-    if [ $Debug == 1 ]
+    if [ $Debug -eq 1 ]
     then
         echo "${framework_python_dir}/_lldb.so already exists."
     fi
@@ -243,7 +243,7 @@
 package_files="${SRC_ROOT}/examples/python/symbolication.py"
 create_python_package "/utils" "${package_files}"
 
-if [ ${OS_NAME} == "Darwin" ]
+if [ ${OS_NAME} = "Darwin" ]
 then
     # lldb/macosx
     package_files="${SRC_ROOT}/examples/python/crashlog.py

Modified: lldb/trunk/scripts/build-swig-wrapper-classes.sh
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/build-swig-wrapper-classes.sh?rev=164801&r1=164800&r2=164801&view=diff
==============================================================================
--- lldb/trunk/scripts/build-swig-wrapper-classes.sh (original)
+++ lldb/trunk/scripts/build-swig-wrapper-classes.sh Thu Sep 27 16:26:57 2012
@@ -32,7 +32,7 @@
 # Check to see if we are in debug-mode or not.
 #
 
-if [ -n "$debug_flag" -a "$debug_flag" == "-debug" ]
+if [ -n "$debug_flag" -a "$debug_flag" = "-debug" ]
 then
     Debug=1
 else
@@ -49,7 +49,7 @@
     exit 1
 fi
 
-if [ $Debug == 1 ]
+if [ $Debug -eq 1 ]
 then
     echo "Found lldb.swig file"
 fi
@@ -69,7 +69,7 @@
     fi
 fi
 
-if [ ${SWIG}a == a ]
+if [ ${SWIG}a = a ]
 then
     echo Error: could not find the swig binary
     exit 1
@@ -87,7 +87,7 @@
 
 for curlang in $languages
 do
-    if [ $Debug == 1 ]
+    if [ $Debug -eq 1 ]
     then
         echo "Current language is $curlang"
     fi
@@ -98,7 +98,7 @@
         continue
     else
 
-        if [ $Debug == 1 ]
+        if [ $Debug -eq 1 ]
         then
             echo "Found $curlang sub-directory"
         fi
@@ -113,7 +113,7 @@
             continue
         else
 
-            if [ $Debug == 1 ]
+            if [ $Debug -eq 1 ]
             then
                 echo "Found $curlang build script."
                 echo "Executing $curlang build script..."

Modified: lldb/trunk/scripts/finish-swig-wrapper-classes.sh
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/finish-swig-wrapper-classes.sh?rev=164801&r1=164800&r2=164801&view=diff
==============================================================================
--- lldb/trunk/scripts/finish-swig-wrapper-classes.sh (original)
+++ lldb/trunk/scripts/finish-swig-wrapper-classes.sh Thu Sep 27 16:26:57 2012
@@ -28,7 +28,7 @@
 PREFIX=$4
 debug_flag=$5
 
-if [ -n "$debug_flag" -a "$debug_flag" == "-debug" ]
+if [ -n "$debug_flag" -a "$debug_flag" = "-debug" ]
 then
     Debug=1
 else
@@ -48,7 +48,7 @@
 
 for curlang in $languages
 do
-    if [ $Debug == 1 ]
+    if [ $Debug -eq 1 ]
     then
         echo "Current language is $curlang"
     fi
@@ -59,7 +59,7 @@
         continue
     else
 
-        if [ $Debug == 1 ]
+        if [ $Debug -eq 1 ]
         then
             echo "Found $curlang sub-directory"
         fi
@@ -70,7 +70,7 @@
 
         if [ -f $filename ]
         then
-            if [ $Debug == 1 ]
+            if [ $Debug -eq 1 ]
             then
                 echo "Found $curlang post-processing script for LLDB"
                 echo "Executing $curlang post-processing script..."





More information about the lldb-commits mailing list