X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debian%2FDebhelper%2FBuildsystem%2Fmakefile.pm;h=159f7c1e43f56139bcdd582743270ba1611c7571;hb=76719d85abaa3a536af862b0aac2307d735e84d8;hp=f21b2cbd6971c06e634b1ea238cb643b51831c13;hpb=4fb1f3b2d64a2faa9d961205b1c32f83028172c8;p=debhelper.git diff --git a/Debian/Debhelper/Buildsystem/makefile.pm b/Debian/Debhelper/Buildsystem/makefile.pm index f21b2cb..159f7c1 100644 --- a/Debian/Debhelper/Buildsystem/makefile.pm +++ b/Debian/Debhelper/Buildsystem/makefile.pm @@ -7,7 +7,8 @@ package Debian::Debhelper::Buildsystem::makefile; use strict; -use Debian::Debhelper::Dh_Lib qw(escape_shell get_make_jobserver_status); +use Debian::Debhelper::Dh_Lib qw(escape_shell is_make_jobserver_unavailable + clean_makeflags); use base 'Debian::Debhelper::Buildsystem'; sub get_makecmd_C { @@ -37,14 +38,8 @@ sub do_make { # Always clean MAKEFLAGS from unavailable jobserver options. If parallel # is enabled, do more extensive clean up from all job control specific # options - my ($status, $makeflags) = get_make_jobserver_status(); - if ($status eq "jobserver-unavailable" || defined $this->get_parallel()) { - if (defined $makeflags) { - $ENV{MAKEFLAGS} = $makeflags; - } - else { - delete $ENV{MAKEFLAGS} if exists $ENV{MAKEFLAGS}; - } + if (defined $this->get_parallel() || is_make_jobserver_unavailable()) { + clean_makeflags(); } # Start a new jobserver if parallel building was requested