summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter
diff options
context:
space:
mode:
authorCharles Davis <cdavis@mines.edu>2011-05-20 04:09:55 +0000
committerCharles Davis <cdavis@mines.edu>2011-05-20 04:09:55 +0000
commit53c976d9e52f4842878567630051b285b8380634 (patch)
tree6a1a7a20b5c7f93b03a5a001590b46d976bc48ad /lldb/source/Interpreter
parent3134148059b5f268738e560ff4ec2708118f850f (diff)
downloadbcm5719-llvm-53c976d9e52f4842878567630051b285b8380634.tar.gz
bcm5719-llvm-53c976d9e52f4842878567630051b285b8380634.zip
Some makefile fixes for the Interpreter:
- Make the generation of LLDBWrapPython.cpp respect the VERBOSE setting. - Use -classic mode when generating. LLDPWrapPython.cpp #errors out if -classic wasn't set when it was generated with recent Swig. - Install the Python modules. Now we shouldn't get loads of Python errors trying to run LLDB. Last of my build fixes. The LLDB that I built works, except that I can't debug anything with it until debugserver gets built. llvm-svn: 131719
Diffstat (limited to 'lldb/source/Interpreter')
-rw-r--r--lldb/source/Interpreter/Makefile19
1 files changed, 17 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/Makefile b/lldb/source/Interpreter/Makefile
index 9ea9883e046..a562870b1c1 100644
--- a/lldb/source/Interpreter/Makefile
+++ b/lldb/source/Interpreter/Makefile
@@ -18,7 +18,13 @@ include $(LLDB_LEVEL)/Makefile
LLDB_PYTHON_SWIG_CPP = $(PROJ_OBJ_ROOT)/$(BuildMode)/LLDBWrapPython.cpp
LLDB_BIN_DIR := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin
PYTHON_DIR := $(LLDB_BIN_DIR)
+ifeq ($(HOST_OS),Darwin)
+PYTHON_DEST_DIR := /Library/Python/$(shell python -c 'import sys; print sys.version[:3]')/site-packages
+else
+PYTHON_DEST_DIR := $(shell python -c 'import sys; print sys.exec_prefix')/lib/python$(shell python -c 'import sys; pritn sys.version[:3]')/site-packages
+endif
LLDB_SWIG_INCLUDE_DIRS:= -I"$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/include" -I./.
+LIBLLDB := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/liblldb$(SHLIBEXT)
# We need Swig to process stdint.h, but by default it will not inspect system
# include directories. The following should cover the standard locations on
@@ -27,7 +33,16 @@ LLDB_SWIG_INCLUDE_DIRS += -I"/usr/local/include"
LLDB_SWIG_INCLUDE_DIRS += -I"/usr/include"
LLDBWrapPython.cpp:
- swig -c++ -shadow -python $(LLDB_SWIG_INCLUDE_DIRS) \
+ $(Echo) Generating LLDBWrapPython.cpp
+ $(Verb) swig -c++ -classic -shadow -python $(LLDB_SWIG_INCLUDE_DIRS) \
-D__STDC_LIMIT_MACROS -outdir "$(LLDB_BIN_DIR)" \
-o LLDBWrapPython.cpp "$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/lldb.swig"
- cp "$(PROJ_SRC_DIR)/embedded_interpreter.py" "$(PYTHON_DIR)"
+ $(Verb) cp "$(PROJ_SRC_DIR)/embedded_interpreter.py" "$(PYTHON_DIR)"
+
+install-local:: $(PYTHON_DIR)/lldb.py $(PYTHON_DIR)/embedded_interpreter.py $(LIBLLDB)
+ $(Echo) Installing $(BuildMode) LLDB python modules
+ $(Verb) $(MKDIR) $(PYTHON_DEST_DIR)/lib-dynload
+ $(Verb) $(DataInstall) $(PYTHON_DIR)/lldb.py $(PYTHON_DEST_DIR)/lldb.py
+ $(Verb) $(DataInstall) $(PYTHON_DIR)/embedded_interpreter.py $(PYTHON_DEST_DIR)/embedded_interpreter.py
+ $(Verb) $(RM) -f $(PYTHON_DEST_DIR)/lib-dynload/_lldb.so
+ $(Verb) $(AliasTool) $(LIBLLDB) $(PYTHON_DEST_DIR)/lib-dynload/_lldb.so
OpenPOWER on IntegriCloud