[Pkg-giraffe-discuss] [PATCH 3/4] debian/rules: fixing the usage of CFLAGS

c.schoenert at t-online.de c.schoenert at t-online.de
Sun Dec 18 16:14:57 UTC 2016


From: Carsten Schoenert <c.schoenert at t-online.de>

We want to append some variables to CFLAGS and not to override the
existing CFLAGS which are already got some useful options by debhelper
filled in.
Depended on this we need to double-quote delimiters around CFLAGS inside
the configure call, otherwise configure will fail.

make[1]: Entering directory '/build/libvmime-0.9.1'
dh_auto_configure -- CFLAGS=-g -O2 -fdebug-prefix-map=/build/libvmime-0.9.1=. ...
...
configure: error: unrecognized option: `-O2'
---
 debian/rules | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index f637d33..fa8b68a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,10 +15,10 @@ endif
 
 CONFFLAG = "--enable-debug"
 
-CFLAGS = "-Wall -g -Wl,-z,defs"
+CFLAGS += -Wall -g -Wl,-z,defs
 
 DEB_CONFIGURE_EXTRA_ARGS :=      \
-    CFLAGS=$(CFLAGS) \
+    CFLAGS="$(CFLAGS)" \
     --host=$(DEB_HOST_GNU_TYPE) \
     --build=$(DEB_BUILD_GNU_TYPE) \
     --prefix=/usr \
-- 
2.10.2




More information about the Pkg-giraffe-discuss mailing list