summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Buildsystem
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-10-28 17:23:28 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-10-28 17:31:01 -0400
commit2ec1c8af7f5216b574a93240e2a68a896b0896c1 (patch)
treefa4089d38ff270035d797b63d7241406c4e02f9b /Debian/Debhelper/Buildsystem
parent76719d85abaa3a536af862b0aac2307d735e84d8 (diff)
reduce amount of MAKEFLAGS cleaning
Now clean_jobserver_makeflags will only remove --jobserver settings from MAKEFLAGS. This is simpler and easier to understand than the old behavior, which, if there was no --jobserver, removed all -j and --jobs, while leaving those when removing --jobserver. This relies on -j options passed to make overriding -j settings in MAKEFLAGS. So we don't need to clean those out, we can just override them.
Diffstat (limited to 'Debian/Debhelper/Buildsystem')
-rw-r--r--Debian/Debhelper/Buildsystem/makefile.pm15
1 files changed, 7 insertions, 8 deletions
diff --git a/Debian/Debhelper/Buildsystem/makefile.pm b/Debian/Debhelper/Buildsystem/makefile.pm
index 159f7c1..ff904af 100644
--- a/Debian/Debhelper/Buildsystem/makefile.pm
+++ b/Debian/Debhelper/Buildsystem/makefile.pm
@@ -8,7 +8,7 @@ package Debian::Debhelper::Buildsystem::makefile;
use strict;
use Debian::Debhelper::Dh_Lib qw(escape_shell is_make_jobserver_unavailable
- clean_makeflags);
+ clean_jobserver_makeflags);
use base 'Debian::Debhelper::Buildsystem';
sub get_makecmd_C {
@@ -34,17 +34,16 @@ sub exists_make_target {
sub do_make {
my $this=shift;
- # Remove unavailable jobserver options from MAKEFLAGS.
- # Always clean MAKEFLAGS from unavailable jobserver options. If parallel
- # is enabled, do more extensive clean up from all job control specific
- # options
- if (defined $this->get_parallel() || is_make_jobserver_unavailable()) {
- clean_makeflags();
+ # Avoid warnings about unavailable jobserver.
+ if (is_make_jobserver_unavailable()) {
+ clean_jobserver_makeflags();
}
- # Start a new jobserver if parallel building was requested
if (defined $this->get_parallel()) {
+ # Note that this will override any -j settings in MAKEFLAGS.
unshift @_, "-j" . ($this->get_parallel() > 1 ? $this->get_parallel() : 1);
+ # Force make to start a new jobserver.
+ clean_jobserver_makeflags();
}
$this->doit_in_builddir($this->{makecmd}, @_);