git » libjio » commit 036fe76

Build Python bindings with debugging enabled when doing a debug build

author Alberto Bertogli
2011-02-27 11:17:02 UTC
committer Alberto Bertogli
2011-02-27 21:23:34 UTC
parent e9c07535b25fa53dfa5d5fd6850bfc547e1de8a1

Build Python bindings with debugging enabled when doing a debug build

If we invoke make with DEBUG=1 when building Python bindings, pass a debug
flag to the Python build scripts.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

Makefile +7 -2

diff --git a/Makefile b/Makefile
index 96b28c5..5e6a3f8 100644
--- a/Makefile
+++ b/Makefile
@@ -11,14 +11,19 @@ install:
 	$(MAKE) -C libjio/ install
 
 
+PY_DEBUG=
+ifdef DEBUG
+	PY_DEBUG=--debug
+endif
+
 python2: libjio
-	cd bindings/python && python setup.py build
+	cd bindings/python && python setup.py build $(PY_DEBUG)
 
 python2_install: python2
 	cd bindings/python && python setup.py install
 
 python3: libjio
-	cd bindings/python && python3 setup.py build
+	cd bindings/python && python3 setup.py build $(PY_DEBUG)
 
 python3_install: python3
 	cd bindings/python && python3 setup.py install