aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2012-03-26 22:23:24 -0700
committerTheodore Ts'o <tytso@mit.edu>2012-03-26 22:54:41 -0700
commit95decc5c720c02815d20d1fea053106baec03173 (patch)
tree3a26412ef95b7d51943e4362373a585b5988205b /debian
parentfb8bcfcd631dc5ad8f4cf66aec2370578ee03388 (diff)
downloade2fsprogs-95decc5c720c02815d20d1fea053106baec03173.tar.gz
e2fsprogs-95decc5c720c02815d20d1fea053106baec03173.tar.xz
e2fsprogs-95decc5c720c02815d20d1fea053106baec03173.zip
debian: add back support older systems w/o dpkg-buildflags
Commit 5d0e1f99 removed support for older systems such as Ubuntu 10.04, which don't have dpkg-buildflags. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules9
1 files changed, 6 insertions, 3 deletions
diff --git a/debian/rules b/debian/rules
index d681d21e..82a1576a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -117,9 +117,12 @@ INSTALL_PROGRAM ?= $(INSTALL) -p -o root -g root -m 0755
DEFAULT_CFLAGS ?= -g -O2
DEFAULT_LDFLAGS ?= -Wl,-Bsymbolic-functions
-CFLAGS += $(shell dpkg-buildflags --get CFLAGS)
-LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
-CPPFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS ?= $(shell if dpkg-buildflags > /dev/null 2>&1 ; then \
+ dpkg-buildflags --get CFLAGS; else echo $(DEFAULT_CFLAGS) ; fi)
+LDFLAGS ?= $(shell if dpkg-buildflags > /dev/null 2>&1 ; then \
+ dpkg-buildflags --get LDFLAGS; else echo $(DEFAULT_LDFLAGS) ; fi)
+CPPFLAGS ?= $(shell if dpkg-buildflags > /dev/null 2>&1 ; then \
+ dpkg-buildflags --get CPPFLAGS; fi)
ifeq (${DEB_HOST_ARCH},alpha)
CFLAGS += -DHAVE_NETINET_IN_H