[telepathy-gabble/master] Run test-debug.py if the debugger is enabled, using an automake conditional
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Nov 26 06:50:10 PST 2009
The Makefile rule that generates tests/twisted/config.py was always
setting DEBUGGING = False there, because ENABLE_DEBUG was not in fact
set in the Makefile.
Based on a patch from wjt.
---
configure.ac | 1 +
tests/twisted/Makefile.am | 16 ++++++++++------
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9be20ed..5537a10 100644
--- a/configure.ac
+++ b/configure.ac
@@ -101,6 +101,7 @@ AC_ARG_ENABLE(coding-style-checks,
if test x$enable_debug = xyes; then
AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
fi
+AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" = xyes])
if test x$enable_handle_leak_debug = xyes; then
AC_DEFINE(ENABLE_HANDLE_LEAK_DEBUG, [], [Enable handle leak debug code])
diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am
index d9802ca..8f8ab96 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -183,13 +183,17 @@ check-twisted:
exit 1;\
fi
+if ENABLE_DEBUG
+DEBUGGING_PYBOOL = True
+else
+DEBUGGING_PYBOOL = False
+endif
+
config.py: Makefile
- $(AM_V_GEN)echo "PACKAGE_STRING = \"$(PACKAGE_STRING)\"" > config.py
- @if test -n ''$(ENABLE_DEBUG); then \
- echo "DEBUGGING = True" >> config.py; \
- else \
- echo "DEBUGGING = False" >> config.py; \
- fi
+ $(AM_V_GEN) { \
+ echo "PACKAGE_STRING = \"$(PACKAGE_STRING)\""; \
+ echo "DEBUGGING = $(DEBUGGING_PYBOOL)"; \
+ } > $@
BUILT_SOURCES = config.py
--
1.5.6.5
More information about the telepathy-commits
mailing list