diff options
author | Ben Pfaff <blp@nicira.com> | 2013-08-13 12:54:35 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-08-13 21:42:31 -0700 |
commit | c5cbd6b25465afd6784b77118ed3ab4ed3c11175 (patch) | |
tree | d9a73c1f5a96d107809c488110e038306fe233a2 | |
parent | 8cf26cf9ded0a9f6ae6af6d20af4cbd422c04a60 (diff) | |
download | openvswitch-c5cbd6b25465afd6784b77118ed3ab4ed3c11175.tar.gz |
debian: Fix build with old versions of dpkg-buildflags.
dpkg-buildflags has not always supported --export=configure, but commit
6c2d4c8780 (debian: Apply hardening options to build.) used it
unconditionally, causing the build to fail on old Debian distributions.
This fixes the problem.
Signed-off-by: Ben Pfaff <blp@nicira.com>
-rwxr-xr-x | debian/rules | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/debian/rules b/debian/rules index 608f127a4..c11a64227 100755 --- a/debian/rules +++ b/debian/rules @@ -28,6 +28,12 @@ else CFLAGS += -O2 endif +# Old versions of dpkg-buildflags do not understand --export=configure. +# When dpkg-buildflags does not understand an option, it prints its full +# --help output on stdout, so we have to avoid that here. +buildflags := $(shell if dpkg-buildflags --export=configure >/dev/null 2>&1; \ + then dpkg-buildflags --export=configure; fi) + configure: configure-stamp configure-stamp: dh_testdir @@ -39,8 +45,7 @@ configure-stamp: test -e Makefile || \ ../configure --prefix=/usr --localstatedir=/var --enable-ssl \ --sysconfdir=/etc CFLAGS="$(CFLAGS)" \ - $(shell dpkg-buildflags --export=configure) \ - $(DATAPATH_CONFIGURE_OPTS)) + $(buildflags) $(DATAPATH_CONFIGURE_OPTS)) touch configure-stamp #Architecture |