dump test results into build log on test failure to help with #837351
[debian/tar] / debian / rules
index 3fc3590a8989e0ffc1b00253b516ff442e3c0036..7c2f21c0ca2b40c85364f7ca9332ebba08fea9c1 100755 (executable)
@@ -29,6 +29,7 @@ configure-stamp:
                --libexecdir=/usr/lib/tar \
                --enable-backup-scripts \
                --with-lzma=xz \
+               --disable-silent-rules \
                $(CONFARGS) 
        touch configure-stamp
 
@@ -38,7 +39,7 @@ build-indep: build-stamp
 build-stamp: configure-stamp
        dh_testdir
        RSH="/usr/bin/rsh" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" $(MAKE)
+               LDFLAGS="$(LDFLAGS)" $(MAKE) $(MAKEFLAGS)
 
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
@@ -48,24 +49,23 @@ ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
          echo "Sorry, but the test suite is not designed to be run as root."; \
          exit 1 ;\
        fi
-       $(MAKE) check
+       $(MAKE) check || { cat tests/testsuite.log; false; }
 endif
 endif
 
-       perl debian/tarman > debian/tar.1
        touch build-stamp
 
 clean:
        dh_testdir
        dh_testroot
-       rm -f build-stamp configure-stamp debian/tar.1
+       rm -f build-stamp configure-stamp
        [ ! -f Makefile ] || $(MAKE) distclean
        dh_clean
 
 install: build
        dh_testdir
        dh_testroot
-       dh_clean -k
+       dh_prep
        dh_installdirs
 
        make install bindir=`pwd`/debian/tar/bin prefix=`pwd`/debian/tar/usr \
@@ -94,7 +94,7 @@ binary-arch: build install
        dh_installexamples
        dh_installmenu
        dh_installcron
-       dh_installman debian/tar.1 debian/rmt.8 debian/tarcat.1
+       dh_installman doc/tar.1 doc/rmt.8 debian/tarcat.1
        mv debian/tar/usr/share/man/man8/rmt.8 \
           debian/tar/usr/share/man/man8/rmt-tar.8
        dh_installinfo