From d22c9b91a29bc1d2f90506f8d1dd522c0b28a151 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 4 Nov 2018 03:04:47 +0000 Subject: [PATCH] Merge r7369 from trunk git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7629 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6950c4eeb..2b76bc9a8 100644 --- a/Makefile +++ b/Makefile @@ -502,10 +502,20 @@ dpkg: ../scst_$(VERSION).orig.tar.xz ../scst_$(VERSION)-$(DEBIAN_REVISION)_amd64.changes \ ) && \ rm -f "$${output_files[@]}" && \ - if false; then \ - dpkg-buildpackage -uc -us -ui -jauto; \ + buildopts=(-uc -us) && \ + if dpkg-buildpackage --help 2>&1 | grep -- '-ui'; then \ + buildopts+=(-ui); \ + fi && \ + if dpkg-buildpackage --help 2>&1 | \ + grep -q -- '--jobs\[=|auto\]'; then \ + buildopts+=(-jauto); \ else \ - debuild -uc -us -ui -jauto --lintian-opts --profile debian; \ + buildopts+=(-j4); \ + fi && \ + if false; then \ + dpkg-buildpackage "$${buildopts[@]}"; \ + else \ + debuild "$${buildopts[@]}" --lintian-opts --profile debian; \ fi && \ mkdir -p dpkg && \ for f in "$${output_files[@]}" ../scst_$(VERSION).orig.tar.xz; do\