summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Buildsystem.pm
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2009-06-18 00:56:57 +0300
committerModestas Vainius <modestas@vainius.eu>2009-06-18 00:56:57 +0300
commitd6c1c26e558a849f9d696558fbed74ea539023b0 (patch)
treeb189567948ba234d98bd7eff27efb027bfb17254 /Debian/Debhelper/Buildsystem.pm
parent95f0a0968c30a6737c3f321f305985b3fd33a63e (diff)
Less code in the build system classes to call enforce_out_of_source_building().
Signed-off-by: Modestas Vainius <modestas@vainius.eu>
Diffstat (limited to 'Debian/Debhelper/Buildsystem.pm')
-rw-r--r--Debian/Debhelper/Buildsystem.pm12
1 files changed, 7 insertions, 5 deletions
diff --git a/Debian/Debhelper/Buildsystem.pm b/Debian/Debhelper/Buildsystem.pm
index da43b7d7..3ee37a5f 100644
--- a/Debian/Debhelper/Buildsystem.pm
+++ b/Debian/Debhelper/Buildsystem.pm
@@ -119,13 +119,15 @@ sub enforce_in_source_building {
# Derived class can call this method in its constructor to enforce
# out of source building even if the user didn't request it. However,
-# if $builddir is specified, accept it even if it matches the source
-# directory (i.e. out of source is prefered to in source).
+# if 'builddir' named parameter is passed, accept its value as the
+# build directory even if it matches the source directory (meaning out
+# of source is only prefered to in source, not enforced).
sub enforce_out_of_source_building {
- my ($this, $builddir) = @_;
+ my $this=shift;
+ my %args=@_;
if (!defined $this->get_builddir()) {
- $this->_set_builddir($builddir);
- if (!defined $this->get_builddir() && !$builddir) {
+ $this->_set_builddir($args{builddir});
+ if (!defined $this->get_builddir() && !$args{builddir}) {
# If we are here, DEFAULT_BUILD_DIRECTORY matches
# the source directory, building might fail.
error("default build directory is the same as the source directory." .