diff options
author | Niels Thykier <niels@thykier.net> | 2019-03-31 16:40:01 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2019-03-31 16:40:01 +0000 |
commit | 76bae79ebfab8d4d0b21a5a2170024aae1083b3f (patch) | |
tree | a3cc8474a045f7fe87e654f89d6170a903022e44 /lib/Debian/Debhelper | |
parent | 54d52a3e8c1b00687de825854eb8022acecfde1c (diff) | |
download | debhelper-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')
-rw-r--r-- | lib/Debian/Debhelper/Buildsystem/makefile.pm | 6 |
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}) { |