diff options
author | Filipe Cabecinhas <me@filcab.net> | 2012-09-14 17:09:15 +0000 |
---|---|---|
committer | Filipe Cabecinhas <me@filcab.net> | 2012-09-14 17:09:15 +0000 |
commit | 3e9e081d35a1c4bfc163ca94b93b46567eb04ef7 (patch) | |
tree | 6a0009bd375c3a56c857b97c4c86f60c8a68a995 /lldb/scripts/Python/build-swig-Python.sh | |
parent | d685840a5e55ecdd30473b8c8ca1eb023464e1f0 (diff) | |
download | bcm5719-llvm-3e9e081d35a1c4bfc163ca94b93b46567eb04ef7.tar.gz bcm5719-llvm-3e9e081d35a1c4bfc163ca94b93b46567eb04ef7.zip |
Fixed some problems with SWIG bindings.
This may (but shouldn't) break Linux (but I tested and it still worked on FreeBSD).
The same shell scripts are now used on Xcode and Makefiles, for generating
the SWIG bindings.
Some compatibility fixes were applied, too (python path, bash-isms, etc).
llvm-svn: 163912
Diffstat (limited to 'lldb/scripts/Python/build-swig-Python.sh')
-rwxr-xr-x | lldb/scripts/Python/build-swig-Python.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lldb/scripts/Python/build-swig-Python.sh b/lldb/scripts/Python/build-swig-Python.sh index 25a940694b3..2a1a34bdd5a 100755 --- a/lldb/scripts/Python/build-swig-Python.sh +++ b/lldb/scripts/Python/build-swig-Python.sh @@ -18,13 +18,19 @@ PYTHON_INSTALL_DIR=$4 debug_flag=$5 SWIG=$6 -swig_output_file=${SRC_ROOT}/source/LLDBWrapPython.cpp +os_name=`uname -s` +if [ "$os_name" == "Darwin" ] +then + swig_output_file=${SRC_ROOT}/source/LLDBWrapPython.cpp +else + swig_output_file=${TARGET_DIR}/LLDBWrapPython.cpp +fi swig_input_file=${SRC_ROOT}/scripts/lldb.swig swig_python_extensions=${SRC_ROOT}/scripts/Python/python-extensions.swig swig_python_wrapper=${SRC_ROOT}/scripts/Python/python-wrapper.swig swig_python_typemaps=${SRC_ROOT}/scripts/Python/python-typemaps.swig -if [ $LLDB_DISABLE_PYTHON = "1" ] ; then +if [ "$LLDB_DISABLE_PYTHON" = "1" ] ; then # We don't want Python for this build, but touch the output file so we don't have to # conditionalize the build on this as well. # Note, at present iOS doesn't have Python, so if you're building for iOS be sure to @@ -252,8 +258,7 @@ then 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],,'` +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" ] then |