debian: Avoid unit test failure when doing "unofficial" builds.
authorBen Pfaff <blp@nicira.com>
Fri, 9 Mar 2012 22:20:54 +0000 (14:20 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 12 Mar 2012 17:13:36 +0000 (10:13 -0700)
The configure option --with-build-number=0 is interpreted differently in
different places.  The configure script itself accepts 0 as an actual
build number and puts '#define BUILDNR "+build0"' into config.h.  The
code in python/automake.mk treats 0 as "no build number" and puts
'BUILDNR = ""' into version.py.

This commit avoids the problem by not passing 0 as a build number.

Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
debian/rules

index 1953ee55e8c07647d09f70996f2a498c177c934d..4160025a47f76aefb579114b99d62af5f06fca6f 100755 (executable)
@@ -31,6 +31,12 @@ else
 CFLAGS += -O2
 endif
 
+ifeq ($(BUILD_NUMBER),0)
+BUILD_NUMBER_OPTION =
+else
+BUILD_NUMBER_OPTION = --with-build-number=$(BUILD_NUMBER)
+endif
+
 configure: configure-stamp
 configure-stamp:
        dh_testdir
@@ -41,7 +47,7 @@ configure-stamp:
        cd _debian && ( \
                test -e Makefile || \
                ../configure --prefix=/usr --localstatedir=/var --enable-ssl \
-                       --sysconfdir=/etc --with-build-number=$(BUILD_NUMBER) \
+                       --sysconfdir=/etc $(BUILD_NUMBER_OPTION) \
                        CFLAGS="$(CFLAGS)" $(DATAPATH_CONFIGURE_OPTS))
        touch configure-stamp