diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-04-13 12:52:28 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-04-13 12:52:34 +0200 |
commit | 8db2c94dca8aceb558d7903b95d7d60624c246e4 (patch) | |
tree | a6f79baac228f8ac720a6c7c42f0be8858e0cdad /SBO-Lib/lib/SBO/Lib.pm | |
parent | 4f88892d49e6cf4c09e8ac5d150737ea3a68b9c2 (diff) | |
download | sbotools2-8db2c94dca8aceb558d7903b95d7d60624c246e4.tar.xz |
Rewrite make line only if jobs specified
See #41.
Diffstat (limited to 'SBO-Lib/lib/SBO/Lib.pm')
-rw-r--r-- | SBO-Lib/lib/SBO/Lib.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm index f0d01e6..db56cff 100644 --- a/SBO-Lib/lib/SBO/Lib.pm +++ b/SBO-Lib/lib/SBO/Lib.pm @@ -866,7 +866,9 @@ sub rewrite_slackbuild { if (exists $$changes{arch_out}) { $line =~ s/\$ARCH/$$changes{arch_out}/ if $line =~ $arch_regex; } - $line =~ s/make/make \$MAKEOPTS/ if $line =~ $make_regex; + if (exists $changes->{jobs}) { + $line =~ s/make/make \$MAKEOPTS/ if $line =~ $make_regex; + } } untie @sb_file; return 1; @@ -1009,6 +1011,9 @@ sub perform_sbo { } $cmd .= '. /etc/profile.d/32dev.sh &&'; } + if ($args{JOBS} and $args{JOBS} ne 'FALSE') { + $changes{jobs} = 1; + } $cmd .= " $args{OPTS}" if $args{OPTS}; $cmd .= " MAKEOPTS=\"-j$args{JOBS}\"" if $args{JOBS}; # we need to get a listing of /tmp/SBo, or $TMP, if we can, before we run |