Test Debian packaging at "make distcheck" time.
authorBen Pfaff <blp@nicira.com>
Wed, 17 Sep 2008 17:47:11 +0000 (10:47 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 17 Sep 2008 17:47:11 +0000 (10:47 -0700)
Makefile.am
acinclude.m4
configure.ac

index 4c492644bbb1dac4bafc7682c264f6f3dff2f6a6..96f2145d819045cbfb89936c7d014d73738cd5c2 100644 (file)
@@ -18,3 +18,11 @@ endif
 DIST_SUBDIRS = $(SUBDIRS)
 
 EXTRA_DIST = README.hwtables
+
+if HAVE_DPKG_BUILDPACKAGE
+distcheck-hook: 
+       cd $(srcdir) && dpkg-buildpackage -rfakeroot -us -uc
+       cd $(srcdir) && fakeroot ./debian/rules clean
+else
+distcheck-hook: 
+endif
index 17283b1129735a6105694f072e5e749b9e8225fa..8b80249d9d92712c9938ae1b67b4b351eef97046 100644 (file)
@@ -137,3 +137,11 @@ AC_DEFUN([OFP_ENABLE_EXT],
    fi
    AC_SUBST([ofp_top_srcdir], ['$(top_srcdir)'])
    AM_CONDITIONAL([HAVE_EXT], [test $HAVE_EXT = yes])])
+
+dnl Checks for dpkg-buildpackage.  If this is available then we check
+dnl that the Debian packaging is functional at "make distcheck" time.
+AC_DEFUN([OFP_CHECK_DPKG_BUILDPACKAGE],
+  [AC_CHECK_PROG([HAVE_DPKG_BUILDPACKAGE], [dpkg-buildpackage], [yes], [no])
+   AM_CONDITIONAL([HAVE_DPKG_BUILDPACKAGE], 
+                  [test $HAVE_DPKG_BUILDPACKAGE = yes])])
+   
index e46926f61e8bf1fe8641632db2f07736a1baa5a3..53647602ac8ce0edc813ac9874e7fbfffc7e3420 100644 (file)
@@ -57,6 +57,8 @@ AC_SUBST(KARCH)
 OFP_CHECK_LINUX(l26, 2.6, 2.6, KSRC26, L26_ENABLED)
 OFP_CHECK_LINUX(l24, 2.4, 2.4, KSRC24, L24_ENABLED)
 
+OFP_CHECK_DPKG_BUILDPACKAGE
+
 CFLAGS="$CFLAGS -Wall -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement"
 
 OFP_ENABLE_EXT