This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch master
in repository devscripts.

commit 2d2d95b59ad68e41a4a8b953da95b59012fb27b2
Author: James McCoy <[email protected]>
Date:   Sat May 30 21:03:04 2015 -0400

    debuild: Recognize -jauto as a valid option.
    
    Closes: #787276
    Signed-off-by: James McCoy <[email protected]>
---
 debian/changelog   |  2 ++
 scripts/debuild.pl | 11 +++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9ab9252..51f8dd7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,8 @@ devscripts (2.15.5) UNRELEASED; urgency=medium
     (Closes: #659330)
   * bts:
     + Use https to talk to bugs.debian.org
+  * debuild: Recognize -jauto as a valid option. Based on a patch by Reiner
+    Herrmann.  (Closes: #787276)
 
   [ Dominique Dumont ]
   * licensecheck:
diff --git a/scripts/debuild.pl b/scripts/debuild.pl
index f6e74dd..28f4f34 100755
--- a/scripts/debuild.pl
+++ b/scripts/debuild.pl
@@ -837,7 +837,7 @@ if ($command_version eq 'dpkg') {
        /^-e(.*)/ and $changedby=$1, push(@debsign_opts, $_),
            push(@dpkg_opts, $_), next;
        /^-C(.*)/ and $desc=$1, push(@dpkg_opts, $_), next;
-       /^-j(\d*)$/ and $parallel=($1 || '-1'), push(@dpkg_opts, $_), next;
+       /^-j(auto|\d*)$/ and $parallel=($1 || '-1'), push(@dpkg_opts, $_), next;
        $_ eq '-W' and $warnable_error=1, push(@passopts, $_),
            push(@dpkg_opts, $_), next;
        $_ eq '-E' and $warnable_error=0, push(@passopts, $_),
@@ -889,7 +889,7 @@ if ($command_version eq 'dpkg') {
        /^-e(.*)/ and $changedby=$1, push(@debsign_opts, $_),
            push(@dpkg_opts, $_), next;
        /^-C(.*)/ and $desc=$1, push(@dpkg_opts, $_), next;
-       /^-j(\d*)$/ and $parallel=($1 || '-1'), push(@dpkg_opts, $_), next;
+       /^-j(auto|\d*)$/ and $parallel=($1 || '-1'), push(@dpkg_opts, $_), next;
        $_ eq '-W' and $warnable_error=1, push(@passopts, $_),
            push(@dpkg_opts, $_), next;
        $_ eq '-E' and $warnable_error=0, push(@passopts, $_),
@@ -1067,6 +1067,13 @@ if ($command_version eq 'dpkg') {
                if (defined $build_opts->{parallel});
            $ENV{MAKEFLAGS} ||= '';
 
+           if ($parallel eq 'auto') {
+               # Most Unices.
+               $parallel = qx(getconf _NPROCESSORS_ONLN 2>/dev/null);
+               # Fallback for at least Irix.
+               $parallel = qx(getconf _NPROC_ONLN 2>/dev/null) if $?;
+               chomp $parallel;
+           }
            if ($parallel eq '-1') {
                $ENV{MAKEFLAGS} .= " -j";
            } else {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/collab-maint/devscripts.git

_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel

Reply via email to