summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/build-swig-Python.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/Python/build-swig-Python.sh')
-rwxr-xr-xlldb/scripts/Python/build-swig-Python.sh18
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],,'`
OpenPOWER on IntegriCloud