diff options
author | Jim Ingham <jingham@apple.com> | 2011-03-01 01:39:04 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-03-01 01:39:04 +0000 |
commit | 6b90ba414a0bd86d5f6fbc2de9889ec27e5380bb (patch) | |
tree | 24c0b3df044dd15895c3814ed7574e32c59973d5 | |
parent | 1d479dbc55c27628aa1be041bbb81203a8f606f4 (diff) | |
download | bcm5719-llvm-6b90ba414a0bd86d5f6fbc2de9889ec27e5380bb.tar.gz bcm5719-llvm-6b90ba414a0bd86d5f6fbc2de9889ec27e5380bb.zip |
Look for swig in /usr/bin and /usr/local/bin.
llvm-svn: 126732
-rwxr-xr-x | lldb/scripts/Python/build-swig-Python.sh | 3 | ||||
-rwxr-xr-x | lldb/scripts/build-swig-wrapper-classes.sh | 23 |
2 files changed, 24 insertions, 2 deletions
diff --git a/lldb/scripts/Python/build-swig-Python.sh b/lldb/scripts/Python/build-swig-Python.sh index f412fb89cdc..a4304fa0926 100755 --- a/lldb/scripts/Python/build-swig-Python.sh +++ b/lldb/scripts/Python/build-swig-Python.sh @@ -16,6 +16,7 @@ TARGET_DIR=$2 CONFIG_BUILD_DIR=$3 PYTHON_INSTALL_DIR=$4 debug_flag=$5 +SWIG=$6 swig_output_file=${SRC_ROOT}/source/LLDBWrapPython.cpp swig_input_file=${SRC_ROOT}/scripts/lldb.swig @@ -170,7 +171,7 @@ fi # Build the SWIG C++ wrapper file for Python. -swig -c++ -shadow -python -I"/usr/include" -I"${SRC_ROOT}/include" -I./. -outdir "${CONFIG_BUILD_DIR}" -o "${swig_output_file}" "${swig_input_file}" +$SWIG -c++ -shadow -python -I"/usr/include" -I"${SRC_ROOT}/include" -I./. -outdir "${CONFIG_BUILD_DIR}" -o "${swig_output_file}" "${swig_input_file}" # Append global variable to lldb Python module. diff --git a/lldb/scripts/build-swig-wrapper-classes.sh b/lldb/scripts/build-swig-wrapper-classes.sh index 5582ba0a662..1680d2e6433 100755 --- a/lldb/scripts/build-swig-wrapper-classes.sh +++ b/lldb/scripts/build-swig-wrapper-classes.sh @@ -55,6 +55,27 @@ then fi # +# Next look for swig +# + +SWIG= +if [ -f /usr/bin/swig ] +then + SWIG=/usr/bin/swig +else + if [ -f /usr/local/bin/swig ] + then + SWIG=/usr/local/bin/swig + fi +fi + +if [ ${SWIG}a == a ] +then + echo Error: could not find the swig binary + exit 1 +fi + +# # For each scripting language, make sure the build script for that language # exists, and if so, call it. # @@ -98,7 +119,7 @@ do echo "Executing $curlang build script..." fi - ./build-swig-${curlang}.sh $SRC_ROOT $TARGET_DIR $CONFIG_BUILD_DIR "${PREFIX}" "${debug_flag}" + ./build-swig-${curlang}.sh $SRC_ROOT $TARGET_DIR $CONFIG_BUILD_DIR "${PREFIX}" "${debug_flag}" "${SWIG}" fi fi done |