From 76bae79ebfab8d4d0b21a5a2170024aae1083b3f Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sun, 31 Mar 2019 16:40:01 +0000 Subject: makefile: Fix regression where cross tools were passed when make was a target build system Signed-off-by: Niels Thykier --- lib/Debian/Debhelper/Buildsystem/makefile.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/Debian/Debhelper') 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}) { -- cgit v1.2.3