mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 23:49:22 +08:00
Patch from Dan Malea to get the Bourne shells scripts to run cleanly on Ubuntu.
llvm-svn: 164801
This commit is contained in:
@@ -19,7 +19,7 @@ debug_flag=$5
|
||||
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 @@ if [ "$LLDB_DISABLE_PYTHON" = "1" ] ; then
|
||||
|
||||
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 @@ INTERFACE_FILES="${SRC_ROOT}/scripts/Python/interface/SBAddress.i"\
|
||||
" ${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 @@ NeedToUpdate=0
|
||||
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 @@ then
|
||||
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 @@ then
|
||||
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 @@ then
|
||||
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 @@ then
|
||||
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 @@ then
|
||||
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 @@ fi
|
||||
|
||||
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 @@ then
|
||||
fi
|
||||
|
||||
|
||||
if [ $NeedToUpdate == 0 ]
|
||||
if [ $NeedToUpdate -eq 0 ]
|
||||
then
|
||||
echo "Everything is up-to-date."
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user