Filipe Cabecinhas | 4bb4f30 | 2012-09-14 17:09:15 +0000 | [diff] [blame] | 1 | #!/bin/sh |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 2 | |
| 3 | # finish-swig-Python.sh |
| 4 | # |
| 5 | # For the Python script interpreter (external to liblldb) to be able to import |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 6 | # and use the lldb module, there must be two files, lldb.py and _lldb.so, that |
| 7 | # it can find. lldb.py is generated by SWIG at the same time it generates the |
Filipe Cabecinhas | f2b0fef | 2012-11-01 18:55:16 +0000 | [diff] [blame^] | 8 | # C++ file. _lldb.so is actually a symlink file that points to the |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 9 | # LLDB shared library/framework. |
| 10 | # |
Filipe Cabecinhas | f2b0fef | 2012-11-01 18:55:16 +0000 | [diff] [blame^] | 11 | # The Python script interpreter needs to be able to automatically find |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 12 | # these two files. On Darwin systems it searches in the LLDB.framework, as |
| 13 | # well as in all the normal Python search paths. On non-Darwin systems |
| 14 | # these files will need to be put someplace where Python will find them. |
| 15 | # |
| 16 | # This shell script creates the _lldb.so symlink in the appropriate place, |
| 17 | # and copies the lldb.py (and embedded_interpreter.py) file to the correct |
| 18 | # directory. |
| 19 | # |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 20 | |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 21 | # SRC_ROOT is the root of the lldb source tree. |
| 22 | # TARGET_DIR is where the lldb framework/shared library gets put. |
Filipe Cabecinhas | f2b0fef | 2012-11-01 18:55:16 +0000 | [diff] [blame^] | 23 | # CONFIG_BUILD_DIR is where the build-swig-Python-LLDB.sh shell script |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 24 | # put the lldb.py file it was generated from running SWIG. |
| 25 | # PYTHON_INSTALL_DIR is where non-Darwin systems want to put the .py and .so |
| 26 | # files so that Python can find them automatically. |
Filipe Cabecinhas | f2b0fef | 2012-11-01 18:55:16 +0000 | [diff] [blame^] | 27 | # debug_flag (optional) determines whether or not this script outputs |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 28 | # additional information when running. |
| 29 | |
| 30 | SRC_ROOT=$1 |
| 31 | TARGET_DIR=$2 |
| 32 | CONFIG_BUILD_DIR=$3 |
| 33 | PYTHON_INSTALL_DIR=$4 |
| 34 | debug_flag=$5 |
Filipe Cabecinhas | f2b0fef | 2012-11-01 18:55:16 +0000 | [diff] [blame^] | 35 | makefile_flag=$6 |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 36 | |
Jim Ingham | f4ec2ea | 2012-05-26 00:23:52 +0000 | [diff] [blame] | 37 | # If we don't want Python, then just do nothing here. |
| 38 | # Note, at present iOS doesn't have Python, so if you're building for iOS be sure to |
| 39 | # set LLDB_DISABLE_PYTHON to 1. |
| 40 | |
Filipe Cabecinhas | 4bb4f30 | 2012-09-14 17:09:15 +0000 | [diff] [blame] | 41 | if [ ! "$LLDB_DISABLE_PYTHON" = "1" ] ; then |
Greg Clayton | 3e4238d | 2011-11-04 03:34:56 +0000 | [diff] [blame] | 42 | |
Jason Molenda | e2801e1 | 2012-09-27 21:26:57 +0000 | [diff] [blame] | 43 | if [ -n "$debug_flag" -a "$debug_flag" = "-debug" ] |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 44 | then |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 45 | Debug=1 |
| 46 | else |
| 47 | Debug=0 |
| 48 | fi |
| 49 | |
Filipe Cabecinhas | f2b0fef | 2012-11-01 18:55:16 +0000 | [diff] [blame^] | 50 | if [ -n "$makefile_flag" -a "$makefile_flag" = "-m" ] |
| 51 | then |
| 52 | MakefileCalled=1 |
| 53 | else |
| 54 | MakefileCalled=0 |
| 55 | fi |
| 56 | |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 57 | OS_NAME=`uname -s` |
Filipe Cabecinhas | 4bb4f30 | 2012-09-14 17:09:15 +0000 | [diff] [blame] | 58 | 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],,'` |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 59 | |
| 60 | |
Jason Molenda | e2801e1 | 2012-09-27 21:26:57 +0000 | [diff] [blame] | 61 | if [ $Debug -eq 1 ] |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 62 | then |
| 63 | echo "The current OS is $OS_NAME" |
| 64 | echo "The Python version is $PYTHON_VERSION" |
| 65 | fi |
| 66 | |
Filipe Cabecinhas | f2b0fef | 2012-11-01 18:55:16 +0000 | [diff] [blame^] | 67 | if [ ${OS_NAME} = "Darwin" ] |
| 68 | then |
| 69 | SOEXT=".dylib" |
| 70 | else |
| 71 | SOEXT=".so" |
| 72 | fi |
| 73 | |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 74 | # |
| 75 | # Determine where to put the files. |
| 76 | |
Filipe Cabecinhas | f2b0fef | 2012-11-01 18:55:16 +0000 | [diff] [blame^] | 77 | if [ $MakefileCalled -eq 0 ] |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 78 | then |
Filipe Cabecinhas | f2b0fef | 2012-11-01 18:55:16 +0000 | [diff] [blame^] | 79 | # We are being built by Xcode, so all the lldb Python files can go |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 80 | # into the LLDB.framework/Resources/Python subdirectory. |
| 81 | |
| 82 | if [ ! -d "${TARGET_DIR}/LLDB.framework" ] |
| 83 | then |
| 84 | echo "Error: Unable to find LLDB.framework" >&2 |
| 85 | exit 1 |
| 86 | else |
Jason Molenda | e2801e1 | 2012-09-27 21:26:57 +0000 | [diff] [blame] | 87 | if [ $Debug -eq 1 ] |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 88 | then |
| 89 | echo "Found ${TARGET_DIR}/LLDB.framework." |
| 90 | fi |
| 91 | fi |
| 92 | |
| 93 | # Make the Python directory in the framework if it doesn't already exist |
| 94 | |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 95 | framework_python_dir="${TARGET_DIR}/LLDB.framework/Resources/Python/lldb" |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 96 | else |
Filipe Cabecinhas | f2b0fef | 2012-11-01 18:55:16 +0000 | [diff] [blame^] | 97 | # We are being built by LLVM, so use the PYTHON_INSTALL_DIR argument, |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 98 | # and append the python version directory to the end of it. Depending on |
| 99 | # the system other stuff may need to be put here as well. |
| 100 | |
Filipe Cabecinhas | f2b0fef | 2012-11-01 18:55:16 +0000 | [diff] [blame^] | 101 | if [ -n "${PYTHON_INSTALL_DIR}" ] |
| 102 | then |
| 103 | framework_python_dir=`/usr/bin/env python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True, False, \"${PYTHON_INSTALL_DIR}\");"`/lldb |
| 104 | else |
| 105 | framework_python_dir=`/usr/bin/env python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True, False);"`/lldb |
| 106 | fi |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 107 | fi |
| 108 | |
Filipe Cabecinhas | f2b0fef | 2012-11-01 18:55:16 +0000 | [diff] [blame^] | 109 | [ -n "${CONFIG_BUILD_DIR}" ] || CONFIG_BUILD_DIR=${framework_python_dir} |
| 110 | |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 111 | # |
| 112 | # Look for the directory in which to put the Python files; if it does not |
| 113 | # already exist, attempt to make it. |
| 114 | # |
| 115 | |
Jason Molenda | e2801e1 | 2012-09-27 21:26:57 +0000 | [diff] [blame] | 116 | if [ $Debug -eq 1 ] |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 117 | then |
| 118 | echo "Python files will be put in ${framework_python_dir}" |
| 119 | fi |
| 120 | |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 121 | python_dirs="${framework_python_dir}" |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 122 | |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 123 | for python_dir in $python_dirs |
| 124 | do |
| 125 | if [ ! -d "${python_dir}" ] |
| 126 | then |
Jason Molenda | e2801e1 | 2012-09-27 21:26:57 +0000 | [diff] [blame] | 127 | if [ $Debug -eq 1 ] |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 128 | then |
| 129 | echo "Making directory ${python_dir}" |
| 130 | fi |
| 131 | mkdir -p "${python_dir}" |
| 132 | else |
Jason Molenda | e2801e1 | 2012-09-27 21:26:57 +0000 | [diff] [blame] | 133 | if [ $Debug -eq 1 ] |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 134 | then |
| 135 | echo "${python_dir} already exists." |
| 136 | fi |
| 137 | fi |
| 138 | |
| 139 | if [ ! -d "${python_dir}" ] |
| 140 | then |
| 141 | echo "Error: Unable to find or create ${python_dir}" >&2 |
| 142 | exit 1 |
| 143 | fi |
| 144 | done |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 145 | |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 146 | # Make the symlink that the script bridge for Python will need in the |
| 147 | # Python framework directory |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 148 | |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 149 | if [ ! -L "${framework_python_dir}/_lldb.so" ] |
| 150 | then |
Jason Molenda | e2801e1 | 2012-09-27 21:26:57 +0000 | [diff] [blame] | 151 | if [ $Debug -eq 1 ] |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 152 | then |
| 153 | echo "Creating symlink for _lldb.so" |
| 154 | fi |
Filipe Cabecinhas | f2b0fef | 2012-11-01 18:55:16 +0000 | [diff] [blame^] | 155 | cd "${framework_python_dir}" |
| 156 | if [ $MakefileCalled -eq 0 ] |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 157 | then |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 158 | ln -s "../../../LLDB" _lldb.so |
Filipe Cabecinhas | f2b0fef | 2012-11-01 18:55:16 +0000 | [diff] [blame^] | 159 | else |
| 160 | ln -s "../../../liblldb${SOEXT}" _lldb.so |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 161 | fi |
| 162 | else |
Jason Molenda | e2801e1 | 2012-09-27 21:26:57 +0000 | [diff] [blame] | 163 | if [ $Debug -eq 1 ] |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 164 | then |
| 165 | echo "${framework_python_dir}/_lldb.so already exists." |
| 166 | fi |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 167 | fi |
| 168 | |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 169 | |
Filipe Cabecinhas | 4bb4f30 | 2012-09-14 17:09:15 +0000 | [diff] [blame] | 170 | create_python_package () { |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 171 | package_dir="${framework_python_dir}$1" |
| 172 | package_files="$2" |
Enrico Granata | a5c2ce0 | 2012-04-25 17:53:41 +0000 | [diff] [blame] | 173 | package_name=`echo $1 | tr '/' '.'` |
| 174 | package_name="lldb${package_name}" |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 175 | |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 176 | if [ ! -d "${package_dir}" ] |
Enrico Granata | 074e3b6 | 2011-08-17 19:07:52 +0000 | [diff] [blame] | 177 | then |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 178 | mkdir -p "${package_dir}" |
Enrico Granata | 074e3b6 | 2011-08-17 19:07:52 +0000 | [diff] [blame] | 179 | fi |
Enrico Granata | 074e3b6 | 2011-08-17 19:07:52 +0000 | [diff] [blame] | 180 | |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 181 | for package_file in $package_files |
| 182 | do |
| 183 | if [ -f "${package_file}" ] |
| 184 | then |
| 185 | cp "${package_file}" "${package_dir}" |
| 186 | package_file_basename=$(basename "${package_file}") |
| 187 | fi |
| 188 | done |
Enrico Granata | 66205ce | 2012-03-12 19:47:17 +0000 | [diff] [blame] | 189 | |
Enrico Granata | b8dc733 | 2012-01-31 17:01:51 +0000 | [diff] [blame] | 190 | |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 191 | # Create a packate init file if there wasn't one |
| 192 | package_init_file="${package_dir}/__init__.py" |
| 193 | if [ ! -f "${package_init_file}" ] |
Enrico Granata | 8f84cfb | 2012-02-23 23:10:03 +0000 | [diff] [blame] | 194 | then |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 195 | echo -n "__all__ = [" > "${package_init_file}" |
| 196 | python_module_separator="" |
| 197 | for package_file in $package_files |
| 198 | do |
| 199 | if [ -f "${package_file}" ] |
| 200 | then |
| 201 | package_file_basename=$(basename "${package_file}") |
| 202 | echo -n "${python_module_separator}\"${package_file_basename%.*}\"" >> "${package_init_file}" |
| 203 | python_module_separator=", " |
| 204 | fi |
| 205 | done |
| 206 | echo "]" >> "${package_init_file}" |
Enrico Granata | a5c2ce0 | 2012-04-25 17:53:41 +0000 | [diff] [blame] | 207 | echo "for x in __all__:" >> "${package_init_file}" |
| 208 | echo " __import__('${package_name}.'+x)" >> "${package_init_file}" |
Enrico Granata | 8f84cfb | 2012-02-23 23:10:03 +0000 | [diff] [blame] | 209 | fi |
Enrico Granata | 8f84cfb | 2012-02-23 23:10:03 +0000 | [diff] [blame] | 210 | |
Enrico Granata | 8f84cfb | 2012-02-23 23:10:03 +0000 | [diff] [blame] | 211 | |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 212 | } |
Enrico Granata | 8f84cfb | 2012-02-23 23:10:03 +0000 | [diff] [blame] | 213 | |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 214 | # Copy the lldb.py file into the lldb package directory and rename to __init_.py |
| 215 | cp "${CONFIG_BUILD_DIR}/lldb.py" "${framework_python_dir}/__init__.py" |
Enrico Granata | 8f84cfb | 2012-02-23 23:10:03 +0000 | [diff] [blame] | 216 | |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 217 | # lldb |
| 218 | package_files="${SRC_ROOT}/source/Interpreter/embedded_interpreter.py" |
| 219 | create_python_package "" "${package_files}" |
Enrico Granata | 8f84cfb | 2012-02-23 23:10:03 +0000 | [diff] [blame] | 220 | |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 221 | # lldb/formatters/cpp |
| 222 | package_files="${SRC_ROOT}/examples/synthetic/gnu_libstdcpp.py |
| 223 | ${SRC_ROOT}/examples/synthetic/libcxx.py" |
| 224 | create_python_package "/formatters/cpp" "${package_files}" |
Enrico Granata | 8f84cfb | 2012-02-23 23:10:03 +0000 | [diff] [blame] | 225 | |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 226 | # lldb/formatters/objc |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 227 | package_files="${SRC_ROOT}/examples/summaries/cocoa/Selector.py |
| 228 | ${SRC_ROOT}/examples/summaries/objc.py |
| 229 | ${SRC_ROOT}/examples/summaries/cocoa/Class.py |
| 230 | ${SRC_ROOT}/examples/summaries/cocoa/CFArray.py |
| 231 | ${SRC_ROOT}/examples/summaries/cocoa/CFBag.py |
| 232 | ${SRC_ROOT}/examples/summaries/cocoa/CFBinaryHeap.py |
| 233 | ${SRC_ROOT}/examples/summaries/cocoa/CFBitVector.py |
| 234 | ${SRC_ROOT}/examples/summaries/cocoa/CFDictionary.py |
| 235 | ${SRC_ROOT}/examples/summaries/cocoa/CFString.py |
| 236 | ${SRC_ROOT}/examples/summaries/cocoa/NSBundle.py |
| 237 | ${SRC_ROOT}/examples/summaries/cocoa/NSData.py |
| 238 | ${SRC_ROOT}/examples/summaries/cocoa/NSDate.py |
| 239 | ${SRC_ROOT}/examples/summaries/cocoa/NSException.py |
| 240 | ${SRC_ROOT}/examples/summaries/cocoa/NSIndexSet.py |
| 241 | ${SRC_ROOT}/examples/summaries/cocoa/NSMachPort.py |
| 242 | ${SRC_ROOT}/examples/summaries/cocoa/NSNotification.py |
| 243 | ${SRC_ROOT}/examples/summaries/cocoa/NSNumber.py |
| 244 | ${SRC_ROOT}/examples/summaries/cocoa/NSSet.py |
| 245 | ${SRC_ROOT}/examples/summaries/cocoa/NSURL.py" |
| 246 | create_python_package "/formatters/objc" "${package_files}" |
Enrico Granata | 8f84cfb | 2012-02-23 23:10:03 +0000 | [diff] [blame] | 247 | |
Enrico Granata | 8f84cfb | 2012-02-23 23:10:03 +0000 | [diff] [blame] | 248 | |
Enrico Granata | 65e3dcb | 2012-04-25 01:26:37 +0000 | [diff] [blame] | 249 | # make an empty __init__.py in lldb/runtime |
| 250 | # this is required for Python to recognize lldb.runtime as a valid package |
| 251 | # (and hence, lldb.runtime.objc as a valid contained package) |
| 252 | create_python_package "/runtime" "" |
| 253 | |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 254 | # lldb/runtime/objc |
| 255 | package_files="${SRC_ROOT}/examples/summaries/cocoa/objc_runtime.py" |
| 256 | create_python_package "/runtime/objc" "${package_files}" |
Enrico Granata | 8f84cfb | 2012-02-23 23:10:03 +0000 | [diff] [blame] | 257 | |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 258 | # lldb/formatters |
Enrico Granata | 65e3dcb | 2012-04-25 01:26:37 +0000 | [diff] [blame] | 259 | # having these files copied here ensures that lldb/formatters is a valid package itself |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 260 | package_files="${SRC_ROOT}/examples/summaries/cocoa/cache.py |
| 261 | ${SRC_ROOT}/examples/summaries/cocoa/metrics.py |
| 262 | ${SRC_ROOT}/examples/summaries/cocoa/attrib_fromdict.py |
| 263 | ${SRC_ROOT}/examples/summaries/cocoa/Logger.py" |
| 264 | create_python_package "/formatters" "${package_files}" |
Enrico Granata | 8f84cfb | 2012-02-23 23:10:03 +0000 | [diff] [blame] | 265 | |
Greg Clayton | 4e651b1 | 2012-04-25 00:58:03 +0000 | [diff] [blame] | 266 | # lldb/utils |
| 267 | package_files="${SRC_ROOT}/examples/python/symbolication.py" |
| 268 | create_python_package "/utils" "${package_files}" |
Enrico Granata | 8f84cfb | 2012-02-23 23:10:03 +0000 | [diff] [blame] | 269 | |
Jason Molenda | e2801e1 | 2012-09-27 21:26:57 +0000 | [diff] [blame] | 270 | if [ ${OS_NAME} = "Darwin" ] |
Greg Clayton | 6f2f0ab | 2012-04-25 01:49:50 +0000 | [diff] [blame] | 271 | then |
| 272 | # lldb/macosx |
| 273 | package_files="${SRC_ROOT}/examples/python/crashlog.py |
| 274 | ${SRC_ROOT}/examples/darwin/heap_find/heap.py" |
| 275 | create_python_package "/macosx" "${package_files}" |
Enrico Granata | 1328b14 | 2012-02-29 03:28:49 +0000 | [diff] [blame] | 276 | |
Greg Clayton | 6f2f0ab | 2012-04-25 01:49:50 +0000 | [diff] [blame] | 277 | # Copy files needed by lldb/macosx/heap.py to build libheap.dylib |
| 278 | heap_dir="${framework_python_dir}/macosx/heap" |
| 279 | if [ ! -d "${heap_dir}" ] |
| 280 | then |
| 281 | mkdir -p "${heap_dir}" |
| 282 | cp "${SRC_ROOT}/examples/darwin/heap_find/heap/heap_find.cpp" "${heap_dir}" |
| 283 | cp "${SRC_ROOT}/examples/darwin/heap_find/heap/Makefile" "${heap_dir}" |
| 284 | fi |
| 285 | fi |
Enrico Granata | 8f84cfb | 2012-02-23 23:10:03 +0000 | [diff] [blame] | 286 | |
Greg Clayton | 3e4238d | 2011-11-04 03:34:56 +0000 | [diff] [blame] | 287 | fi |
Greg Clayton | 6f2f0ab | 2012-04-25 01:49:50 +0000 | [diff] [blame] | 288 | |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 289 | exit 0 |
Caroline Tice | 9dbe717 | 2010-06-16 19:26:52 +0000 | [diff] [blame] | 290 | |