From 036fe769755f430dac1d4be7effaa107614145da Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@blitiri.com.ar>
Date: Sun, 27 Feb 2011 11:17:02 +0000
Subject: [PATCH 17/24] 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 |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

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
-- 
1.6.2.2.646.gb214

