diff options
author | Modestas Vainius <modestas@vainius.eu> | 2009-06-11 11:18:55 +0300 |
---|---|---|
committer | Modestas Vainius <modestas@vainius.eu> | 2009-06-11 11:54:31 +0300 |
commit | 82f043bf5f2d1257aefa639cb058e8e3f3ef00f6 (patch) | |
tree | 25735b3b050da112b97e5ca7aa1e2e2929f27852 /Debian/Debhelper/Dh_Buildsystems.pm | |
parent | 6f84d7f67943b67d2630985722085c7b4132ce0a (diff) |
Get rid of is_buildable and build_step flags. Broken by design.
* Auto-setting is_buildable flag in base constructor was pointless
and broken by design because:
- is_buildable = check_auto_buildable() used to be called *before*
constructor of the derivative class could call enforce_* methods. The
result of check_auto_buildable() might change after calling enforce_*
methods (in case check_auto_buildable() use get_buildpath() tests).
- it isn't used widely. Refactor those a few places.
* Due to above, 'build_step' does not need to be passed to the Buildsystem
anymore. Remove it from code.
* As a result of is_buidable removal, move warning of
enforce_in_source_building() to pre_building_step(). It caused unnecessary
noise when the object was constructed during test. It belongs to
pre_building_step stage anyway.
Signed-off-by: Modestas Vainius <modestas@vainius.eu>
Diffstat (limited to 'Debian/Debhelper/Dh_Buildsystems.pm')
-rw-r--r-- | Debian/Debhelper/Dh_Buildsystems.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Debian/Debhelper/Dh_Buildsystems.pm b/Debian/Debhelper/Dh_Buildsystems.pm index eade5002..5c72ebd7 100644 --- a/Debian/Debhelper/Dh_Buildsystems.pm +++ b/Debian/Debhelper/Dh_Buildsystems.pm @@ -58,8 +58,8 @@ sub load_buildsystem { else { # Try to determine build system automatically for $system (@BUILDSYSTEMS) { - my $inst = create_buildsystem_instance($system, build_step=>$step); - if ($inst->is_buildable()) { + my $inst = create_buildsystem_instance($system); + if ($inst->check_auto_buildable($step)) { return $inst; } } @@ -133,7 +133,7 @@ sub buildsystems_list { # List buildsystems (including auto and specified status) my ($auto, $specified); - my @buildsystems = load_all_buildsystems(undef, build_step => undef); + my @buildsystems = load_all_buildsystems(undef); for my $inst (@buildsystems) { my $is_specified = defined $opt_buildsys && $opt_buildsys eq $inst->NAME(); if (! defined $specified && defined $opt_buildsys && $opt_buildsys eq $inst->NAME()) { |