]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_builddeb
cmake: Pass CPPFLAGS in CFLAGS. Closes: #668813 Thanks, Simon Ruderich for the patch...
[debhelper.git] / dh_builddeb
index df21cc06c8b8744653bc36c650d92ae21198556f..77da898fc02d1c2114723247e57cb6560e1d1206 100755 (executable)
@@ -63,10 +63,7 @@ else {
        $dh{FILENAME}="/$dh{FILENAME}";
 }
 
-my $max_procs=1;
-if (defined $ENV{DEB_BUILD_OPTIONS} && $ENV{DEB_BUILD_OPTIONS}=~/parallel=(\d+)/) {
-       $max_procs=$1;
-}
+my $max_procs=get_buildoption("parallel") || 1;
 
 my $processes=1;
 my $exit=0;
@@ -85,8 +82,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        if (! defined $pid) {
                error("fork failed! $!");
        }
-       $processes++;
        if ($pid) { # parent
+               $processes++;
                reap while $processes > $max_procs;
                next;
        }