From b3d77e8fd680f69445efee8f9e760be5ed3ccb54 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Thu, 11 Jun 2009 11:58:56 +0300 Subject: Reorder load_buildsystem arguments and pass @_ through it. * Reorder $system and $step arguments to match create_buildsystem_instance() order (less confusion). * Pass arbitrary @_ from load_buildsystem() to create_buildsystem_instance(). Signed-off-by: Modestas Vainius --- Debian/Debhelper/Dh_Buildsystems.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Debian/Debhelper/Dh_Buildsystems.pm b/Debian/Debhelper/Dh_Buildsystems.pm index 5c72ebd7..d79034b1 100644 --- a/Debian/Debhelper/Dh_Buildsystems.pm +++ b/Debian/Debhelper/Dh_Buildsystems.pm @@ -49,16 +49,20 @@ sub create_buildsystem_instance { return $module->new(%bsopts); } +# Similar to create_buildsystem_instance(), but it attempts to autoselect +# a buildsystem if none was specified. In case autoselection fails, undef +# is returned. sub load_buildsystem { - my ($step, $system)=@_; + my $system=shift; + my $step=shift; if (defined $system) { - my $inst = create_buildsystem_instance($system); + my $inst = create_buildsystem_instance($system, @_); return $inst; } else { # Try to determine build system automatically for $system (@BUILDSYSTEMS) { - my $inst = create_buildsystem_instance($system); + my $inst = create_buildsystem_instance($system, @_); if ($inst->check_auto_buildable($step)) { return $inst; } @@ -170,7 +174,7 @@ sub buildsystems_do { exit 0; } - my $buildsystem = load_buildsystem($step, $opt_buildsys); + my $buildsystem = load_buildsystem($opt_buildsys, $step); if (defined $buildsystem) { $buildsystem->pre_building_step($step); $buildsystem->$step(@_, @{$dh{U_PARAMS}}); -- cgit v1.2.3