debian: Avoid -Wformat-zero-length warnings.
[cascardo/ovs.git] / debian / rules
index b21c8db..081f24a 100755 (executable)
@@ -35,6 +35,13 @@ endif
 buildflags := $(shell if dpkg-buildflags --export=configure >/dev/null 2>&1; \
                      then dpkg-buildflags --export=configure; fi)
 
+# dpkg-buildflags tends to turn on -Wformat, which is admirable, but
+# the -Wformat-zero-length subset of that option triggers a couple of
+# false positives in Open vSwitch so turn it right back off again.
+# (We do this in configure.ac also, but the Debian buildflags override
+# those.)
+buildflags := $(patsubst -Wformat,-Wformat -Wno-format-zero-length,$(buildflags))
+
 configure: configure-stamp
 configure-stamp:
        dh_testdir
@@ -56,7 +63,8 @@ build-arch: build-arch-stamp
 build-arch-stamp: configure-stamp 
        $(MAKE) -C _debian
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-       if $(MAKE) -C _debian check TESTSUITEFLAGS='$(PARALLEL)'; then :; \
+       if $(MAKE) -C _debian check TESTSUITEFLAGS='$(PARALLEL)' || \
+               $(MAKE) -C _debian check TESTSUITEFLAGS='--recheck'; then :; \
        else \
                cat _debian/tests/testsuite.log; \
                exit 1; \
@@ -107,7 +115,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