[debhelper-devel] [debhelper] 02/03: create_bs_instance: Support non-required build systems
Niels Thykier
nthykier at moszumanska.debian.org
Sun Aug 14 07:47:20 UTC 2016
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit 6d77f0ab188a2c5012e6f0e397db2059e98c896c
Author: Niels Thykier <niels at thykier.net>
Date: Sun Aug 14 07:32:11 2016 +0000
create_bs_instance: Support non-required build systems
Not terribly useful on its own, but it will soon be combined with
another commit to allow third-party build systems to become
auto-enabled.
Signed-off-by: Niels Thykier <niels at thykier.net>
---
Debian/Debhelper/Dh_Buildsystems.pm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Debian/Debhelper/Dh_Buildsystems.pm b/Debian/Debhelper/Dh_Buildsystems.pm
index 501372d..784b0e2 100644
--- a/Debian/Debhelper/Dh_Buildsystems.pm
+++ b/Debian/Debhelper/Dh_Buildsystems.pm
@@ -38,12 +38,12 @@ my $opt_list;
my $opt_parallel;
sub create_buildsystem_instance {
- my $system=shift;
- my %bsopts=@_;
+ my ($system, $required, %bsopts) = @_;
my $module = "Debian::Debhelper::Buildsystem::$system";
eval "use $module";
if ($@) {
+ return if not $required;
error("unable to load build system class '$system': $@");
}
@@ -89,14 +89,14 @@ sub load_buildsystem {
my $system=shift;
my $step=shift;
if (defined $system) {
- my $inst = create_buildsystem_instance($system, @_);
+ my $inst = create_buildsystem_instance($system, 1, @_);
return $inst;
}
else {
# Try to determine build system automatically
my @buildsystems;
foreach $system (@BUILDSYSTEMS) {
- push @buildsystems, create_buildsystem_instance($system, @_);
+ push @buildsystems, create_buildsystem_instance($system, 1, @_);
}
return autoselect_buildsystem($step, @buildsystems);
}
@@ -113,7 +113,7 @@ sub load_all_buildsystems {
my $name = basename($module_path);
$name =~ s/\.pm$//;
next if exists $buildsystems{$name};
- $buildsystems{$name} = create_buildsystem_instance($name, @_);
+ $buildsystems{$name} = create_buildsystem_instance($name, 1, @_);
}
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list