diff options
author | Modestas Vainius <modestas@vainius.eu> | 2009-06-11 11:58:56 +0300 |
---|---|---|
committer | Modestas Vainius <modestas@vainius.eu> | 2009-06-11 11:58:56 +0300 |
commit | b3d77e8fd680f69445efee8f9e760be5ed3ccb54 (patch) | |
tree | 8bb36e6636c78e774be55b6e07657c671968d913 /Debian/Debhelper | |
parent | f382ce5a2ef97c6e45ec4bd221117493d4f87c90 (diff) |
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 <modestas@vainius.eu>
Diffstat (limited to 'Debian/Debhelper')
-rw-r--r-- | Debian/Debhelper/Dh_Buildsystems.pm | 12 |
1 files 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}}); |