Whamcloud - gitweb
debian: fix dpkg-buildflags so it works when the shell is dash
authorTheodore Ts'o <tytso@mit.edu>
Mon, 20 Feb 2012 23:18:13 +0000 (18:18 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 20 Feb 2012 23:18:13 +0000 (18:18 -0500)
The buildd's use dash as the shell, so we can't use >& in the rules
file.  This was causing the buildd-built e2fsprogs binary packages to
be built without the hardening flags.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debian/rules

index a4261bf..484d411 100755 (executable)
@@ -116,12 +116,9 @@ INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 0755
 DEFAULT_CFLAGS = -g -O2
 DEFAULT_LDFLAGS = -Wl,-Bsymbolic-functions
 
-CFLAGS = $(shell if dpkg-buildflags >& /dev/null; then \
-       dpkg-buildflags --get CFLAGS; else echo $(DEFAULT_CFLAGS) ; fi)
-LDFLAGS = $(shell if dpkg-buildflags >& /dev/null; then \
-       dpkg-buildflags --get LDFLAGS; else echo $(DEFAULT_LDFLAGS) ; fi)
-CPPFLAGS = $(shell if dpkg-buildflags >& /dev/null; then \
-       dpkg-buildflags --get CPPFLAGS; fi)
+CFLAGS += $(shell dpkg-buildflags --get CFLAGS)
+LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
+CPPFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
 
 ifeq (${DEB_HOST_ARCH},alpha)
 CFLAGS += -DHAVE_NETINET_IN_H