[debhelper-devel] [Git][debian/debhelper][master] Buildsystem.pm: Set target buildsystem earlier
Niels Thykier
gitlab at salsa.debian.org
Sun Apr 8 10:40:14 UTC 2018
Niels Thykier pushed to branch master at Debian / debhelper
Commits:
45880bd5 by Niels Thykier at 2018-04-08T10:36:53+00:00
Buildsystem.pm: Set target buildsystem earlier
Signed-off-by: Niels Thykier <niels at thykier.net>
- - - - -
1 changed file:
- lib/Debian/Debhelper/Buildsystem.pm
Changes:
=====================================
lib/Debian/Debhelper/Buildsystem.pm
=====================================
--- a/lib/Debian/Debhelper/Buildsystem.pm
+++ b/lib/Debian/Debhelper/Buildsystem.pm
@@ -110,7 +110,23 @@ sub new {
builddir => undef,
parallel => undef,
cwd => Cwd::getcwd() }, $class);
+
+ # Setup the target buildsystem early, so e.g. _set_builddir also
+ # applies to the target build system. Useful if the generator
+ # and target does not agree on (e.g.) the default build dir.
my $target_bs_name;
+ if (exists $opts{targetbuildsystem}) {
+ $target_bs_name = $opts{targetbuildsystem};
+ }
+
+ $target_bs_name //= $this->DEFAULT_TARGET_BUILD_SYSTEM if $this->IS_GENERATOR_BUILD_SYSTEM;
+
+ if (defined($target_bs_name)) {
+ my %target_opts = %opts;
+ delete($target_opts{'targetbuildsystem'});
+ my $target_system = load_buildsystem($target_bs_name, undef, %target_opts);
+ $this->set_targetbuildsystem($target_system);
+ }
if (exists $opts{sourcedir}) {
# Get relative sourcedir abs_path (without symlinks)
@@ -126,18 +142,6 @@ sub new {
if (defined $opts{parallel}) {
$this->{parallel} = $opts{parallel};
}
- if (exists $opts{targetbuildsystem}) {
- $target_bs_name = $opts{targetbuildsystem};
- }
-
- $target_bs_name //= $this->DEFAULT_TARGET_BUILD_SYSTEM if $this->IS_GENERATOR_BUILD_SYSTEM;
-
- if (defined($target_bs_name)) {
- my %target_opts = %opts;
- delete($target_opts{'targetbuildsystem'});
- my $target_system = load_buildsystem($target_bs_name, undef, %target_opts);
- $this->set_targetbuildsystem($target_system);
- }
return $this;
}
View it on GitLab: https://salsa.debian.org/debian/debhelper/commit/45880bd5f0e94f5c154e1cc293dbcc408c16819d
---
View it on GitLab: https://salsa.debian.org/debian/debhelper/commit/45880bd5f0e94f5c154e1cc293dbcc408c16819d
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20180408/3c5633b2/attachment-0001.html>
More information about the debhelper-devel
mailing list