Setting tag sliver-openvswitch-2.2.90-1
[sliver-openvswitch.git] / debian / rules
index 1ee7048..799bf2e 100755 (executable)
@@ -29,6 +29,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
@@ -40,8 +46,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 
@@ -102,7 +107,6 @@ install-indep: build-indep
        # And we should also clean useless license files, which are already
        # descriped in our debian/copyright anyway.
        rm -f debian/$(pdkms)/usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/COPYING \
-               debian/$(pdkms)/usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/ovsdb/ovsdbmonitor/COPYING \
                debian/$(pdkms)/usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/xenserver/LICENSE
 
 install-arch: build-arch