summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorMarius Storm-Olsen <marius.storm-olsen@nokia.com>2012-04-09 11:02:53 -0500
committerQt by Nokia <qt-info@nokia.com>2012-04-20 18:51:56 +0200
commitdbf53d1ffbcdf4703ae9e75a9889e88348d30a8f (patch)
tree031046a75e0a8d8eab6338dc1ca06f02014fc964 /build
parent8ddc280393f942c8d684c78ec2b34ee13c284e80 (diff)
downloadqt5-dbf53d1ffbcdf4703ae9e75a9889e88348d30a8f.tar.gz
Follow -j [n] documentation, where no [n] means unlimited
Change-Id: Icf5561d5405418da6fa132e65d460ebb176b6d12 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'build')
-rwxr-xr-xbuild14
1 files changed, 8 insertions, 6 deletions
diff --git a/build b/build
index 2649c9c1..1b718b11 100755
--- a/build
+++ b/build
@@ -137,7 +137,7 @@ sub parse_arguments
GetOptionsFromArray(\@args,
'verbose|v:1' => \$self->{'verbose'},
'continue' => \$self->{'continue'},
- 'jobs|j:1' => \$self->{'jobs'},
+ 'jobs|j:0' => \$self->{'jobs'},
'force-qmake' => \$self->{'force_qmake'},
'dry-run|n:1' => \$self->{'dry-run'},
'help|?' => sub { pod2usage(1); },
@@ -239,11 +239,10 @@ sub detect_configuration
my $abs_path = abs_path('qtbase/bin');
unshift @PATH, $abs_path;
- if ($self->{'jobs'} >= 0) {
- $self->{'MAKEOPTS'} = "-j $self->{'jobs'}";
- } else {
- $self->{'MAKEOPTS'} = "";
- }
+ my $opts = "";
+ $opts = "-j" if ($self->{'jobs'} >= 0);
+ $opts .= " $self->{'jobs'}" if ($self->{'jobs'} > 0);
+ $self->{'MAKEOPTS'} = $opts;
$self->{'MAKE'} = $ENV{MAKE} || "make";
if ("$Config{osname}" =~ /mswin/i) {
@@ -265,6 +264,9 @@ sub detect_configuration
$ENV{'CL'} = $cl;
# Remove the -j option, since nmake cannot handle it.
$self->{'MAKEOPTS'} = "";
+ } elsif ($exe =~ 'jom' && $self->{'jobs'} == 0) {
+ # Jom currently doesn't handle the -j (unlimited) option, so remove it.
+ $self->{'MAKEOPTS'} = "";
}
if ($exe =~ 'nmake|jom' && $self->{'dry-run'} > 1) {