summaryrefslogtreecommitdiff
path: root/lib/Debian/Debhelper/Buildsystem
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2019-03-31 16:40:01 +0000
committerNiels Thykier <niels@thykier.net>2019-03-31 16:40:01 +0000
commit76bae79ebfab8d4d0b21a5a2170024aae1083b3f (patch)
treea3cc8474a045f7fe87e654f89d6170a903022e44 /lib/Debian/Debhelper/Buildsystem
parent54d52a3e8c1b00687de825854eb8022acecfde1c (diff)
downloaddebhelper-76bae79ebfab8d4d0b21a5a2170024aae1083b3f.tar.gz
makefile: Fix regression where cross tools were passed when make was a target build system
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'lib/Debian/Debhelper/Buildsystem')
-rw-r--r--lib/Debian/Debhelper/Buildsystem/makefile.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Debian/Debhelper/Buildsystem/makefile.pm b/lib/Debian/Debhelper/Buildsystem/makefile.pm
index 052af0b4..12aab90b 100644
--- a/lib/Debian/Debhelper/Buildsystem/makefile.pm
+++ b/lib/Debian/Debhelper/Buildsystem/makefile.pm
@@ -144,7 +144,11 @@ sub check_auto_buildable {
sub build {
my $this=shift;
- if (ref($this) eq 'Debian::Debhelper::Buildsystem::makefile' and is_cross_compiling()) {
+ if (not $this->_is_targetbuildsystem
+ and ref($this) eq 'Debian::Debhelper::Buildsystem::makefile'
+ and is_cross_compiling()) {
+ # Only inject build tools variables during cross-compile when
+ # makefile is the explicit *main* build system.
for my $var (sort(keys(%DEB_DEFAULT_TOOLS))) {
my $tool = $DEB_DEFAULT_TOOLS{$var};
if ($ENV{$var}) {