[telepathy-gabble/telepathy-gabble-0.8] Run test-debug.py if the debugger is enabled, using an automake conditional
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Nov 26 07:17:58 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.
[Backported to 0.8; initially based on a patch from wjt.]
Reviewed-by: Will Thompson <will.thompson at collabora.co.uk>
---
configure.ac | 1 +
tests/twisted/Makefile.am | 16 ++++++++++------
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2733e26..f3a5f5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,6 +99,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 d2f07fa..8386022 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -176,13 +176,17 @@ check-twisted:
exit 1;\
fi
+if ENABLE_DEBUG
+DEBUGGING_PYBOOL = True
+else
+DEBUGGING_PYBOOL = False
+endif
+
config.py: Makefile
- 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
+ $(QUIET_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