]> git.donarmstrong.com Git - debhelper.git/blobdiff - Debian/Debhelper/Dh_Buildsystems.pm
cleanups
[debhelper.git] / Debian / Debhelper / Dh_Buildsystems.pm
index 77d7f9451c438588973e7020ee20ff5a2fbced58..a14ff037a1586771b9a5b241035b53cfb45accf7 100644 (file)
@@ -26,6 +26,7 @@ our @BUILDSYSTEMS = (
        "perl_build",
        "cmake",
        "ant",
+       "qmake",
 );
 
 my $opt_buildsys;
@@ -152,6 +153,7 @@ sub buildsystems_init {
            "l" => \$opt_list,
            "list" => \$opt_list,
 
+           "parallel" => sub { $max_parallel = -1 },
            "max-parallel=i" => \$max_parallel,
        );
        $args{options}{$_} = $options{$_} foreach keys(%options);
@@ -165,14 +167,12 @@ sub set_parallel {
        $opt_parallel=1;
 
        if (exists $ENV{DEB_BUILD_OPTIONS}) {
-               # Parse parallel=n tag
+               # Get number of processes from parallel=n tag limiting it
+               # with $max if needed
                foreach my $opt (split(/\s+/, $ENV{DEB_BUILD_OPTIONS})) {
-                       if ($opt =~ /^parallel=([-\d]+)$/) {
-                               my $n=$1;
-                               if ($n > 0 && ($max == -1 || $n < $max)) {
-                                       $opt_parallel = $n;
-                               }
-                               else {
+                       if ($opt =~ /^parallel=(-?\d+)$/) {
+                               $opt_parallel = $1;
+                               if ($max > 0 && $opt_parallel > $max) {
                                        $opt_parallel = $max;
                                }
                        }