diff options
author | Charles Davis <cdavis@mines.edu> | 2011-06-01 02:33:12 +0000 |
---|---|---|
committer | Charles Davis <cdavis@mines.edu> | 2011-06-01 02:33:12 +0000 |
commit | 4ce288e3e41b3d134bafdf684a5063179f47b361 (patch) | |
tree | 22471db4fb9697931826f79c2a41052084999a3c /lldb/scripts/Python/edit-swig-python-wrapper-file.py | |
parent | fca778626755d862b3a09a2473a76828d2c5aaa2 (diff) | |
download | bcm5719-llvm-4ce288e3e41b3d134bafdf684a5063179f47b361.tar.gz bcm5719-llvm-4ce288e3e41b3d134bafdf684a5063179f47b361.zip |
Fix remaining Python issues leftover from my previous patch.
- The Swig post-processing scripts are now run.
- edit-swig-python-wrapper-file.py has been modified so it can be run
from the Makefile.
- The issue that prompted me to pass -classic to swig is fixed by this,
so -classic isn't passed anymore.
Python shouldn't complain anymore about a missing method 'FindDebuggerByID'
on the SBDebugger object whenever lldb is run.
llvm-svn: 132383
Diffstat (limited to 'lldb/scripts/Python/edit-swig-python-wrapper-file.py')
-rw-r--r-- | lldb/scripts/Python/edit-swig-python-wrapper-file.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lldb/scripts/Python/edit-swig-python-wrapper-file.py b/lldb/scripts/Python/edit-swig-python-wrapper-file.py index e0efb49f1a7..d64c0b40816 100644 --- a/lldb/scripts/Python/edit-swig-python-wrapper-file.py +++ b/lldb/scripts/Python/edit-swig-python-wrapper-file.py @@ -20,7 +20,7 @@ # That's what this python script does. # -import os +import os, sys include_python = '#include <Python.h>' include_python_ifdef = '''#if defined (__APPLE__) @@ -30,8 +30,12 @@ include_python_ifdef = '''#if defined (__APPLE__) #endif ''' -input_dir_name = os.environ["SRCROOT"] -full_input_name = input_dir_name + "/source/LLDBWrapPython.cpp" +if len (sys.argv) > 1: + input_dir_name = sys.argv[1] + full_input_name = input_dir_name + "/LLDBWrapPython.cpp" +else: + input_dir_name = os.environ["SRCROOT"] + full_input_name = input_dir_name + "/source/LLDBWrapPython.cpp" full_output_name = full_input_name + ".edited" with open(full_input_name, 'r') as f_in: |