[SCM] ffado/master: Compile libffado2 twice, w/ and w/o debugging code. (Closes: #601657)

adiknoth-guest at users.alioth.debian.org adiknoth-guest at users.alioth.debian.org
Fri Oct 29 13:01:09 UTC 2010


The following commit has been merged in the master branch:
commit 60e0d1546a1042042a46bdd320ab5a0e57c998c0
Author: Adrian Knoth <adi at drcomp.erfurt.thur.de>
Date:   Fri Oct 29 14:53:54 2010 +0200

    Compile libffado2 twice, w/ and w/o debugging code. (Closes: #601657)
    
    In the past, we compiled libffado2 with DEBUG=0, but then, bug #572141
    asked for a version with DEBUG=1.
    
    Since it's completely different code (think of printf()s, assert()s and
    so on), it's not simply about stripping debugging symbols, we really
    have to compile two independent versions.
    
    Until now, we only compile with DEBUG=1, but the assertions make ffado
    behave less nicely (#601657).
    
    So it's time to revert to DEBUG=0 and to introduce a separate version
    with DEBUG=1. For the time being, I keep it in libffado2, but once the
    NEW queue is more active, we can refactor this into libffado2-dbg.
    
    I placed the debug-enabled lib under /usr/lib/libffado2/. If we accept
    the lintian warning or really go the libffado2-dbg route, this might be
    changed to /usr/lib/debug/libffado/. Anyway, it won't do any harm right
    now if we keep it in /usr/lib/libffado/, though it's not strictly
    correct.
    
    Last but not least: I wrote a wrapper-script /usr/bin/ffado-debug that
    propagates the location of the debug library via LD_LIBRARY_PATH.  You
    can now run "ffado-debug jackd -d firewire -v5" to get all the fancy
    debug output. If you omit ffado-debug, jackd will pick up the non-debug
    library from /usr/lib/ instead, which is the default.

diff --git a/debian/rules b/debian/rules
index 310ae74..30f19d2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -41,22 +41,27 @@ DEB_SCONS_EXTRA_FLAGS := \
 	$(NJOBS)
 
 
-DEB_SCONS_NOOPT_FLAGS := DEBUG=1 ENABLE_OPTIMIZATION=no
+DEB_SCONS_NOOPT_FLAGS := ENABLE_OPTIMIZATION=no
 
 DEB_DH_MAKESHLIBS_ARGS := --version-info="libffado2 (>=${DEBIAN_FFADO_COMPATIBLE_VERSION})"
 
 DEB_SCONS_ENVVARS :=
 DEB_SCONS_INVOKE = $(DEB_SCONS_ENVVARS) scons 
 
+DEB_SCONS_ARGS_COMMON = 'COMPILE_FLAGS=$(CFLAGS)' $(DEB_SCONS_EXTRA_FLAGS) \
+				$(DEB_SCONS_NOOPT_FLAGS)
+
+DEB_SCONS_ARGS_NODBG = $(DEB_SCONS_ARGS_COMMON) DESTDIR=$(DEB_DESTDIR) DEBUG=0
+DEB_SCONS_ARGS_DBG = $(DEB_SCONS_ARGS_COMMON) DESTDIR=$(DEB_DESTDIR)/dbg DEBUG=1
+
 #common-build-arch:: debian/stamp-scons-build
 ### Mangle libffado filename ###
 debian/stamp-scons-build:
 	-mkdir -p $(DEB_DESTDIR)
-	$(DEB_SCONS_INVOKE) 'COMPILE_FLAGS=$(CFLAGS)' DESTDIR=$(DEB_DESTDIR) \
-		$(DEB_SCONS_EXTRA_FLAGS) $(DEB_SCONS_NOOPT_FLAGS) 
-	$(DEB_SCONS_INVOKE) 'COMPILE_FLAGS=$(CFLAGS)' DESTDIR=$(DEB_DESTDIR) \
-		$(DEB_SCONS_EXTRA_FLAGS) $(DEB_SCONS_NOOPT_FLAGS) \
-		install
+	$(DEB_SCONS_INVOKE) $(DEB_SCONS_ARGS_NODBG)
+	$(DEB_SCONS_INVOKE) $(DEB_SCONS_ARGS_NODBG) install
+	$(DEB_SCONS_INVOKE) $(DEB_SCONS_ARGS_DBG)
+	$(DEB_SCONS_INVOKE) $(DEB_SCONS_ARGS_DBG) install
 	touch debian/stamp-scons-build
 
 # this is bad but the only easy way to have ardour.rc generated from

-- 
Free Firewire Audio Drivers (ffado.org) packaging



More information about the pkg-multimedia-commits mailing list