]> git.donarmstrong.com Git - debhelper.git/blobdiff - Debian/Debhelper/Buildsystem.pm
misc minor changes
[debhelper.git] / Debian / Debhelper / Buildsystem.pm
index da43b7d76ee86f544bd7c3e01df6b2dca9e402ff..c63f8153b5358457f7d59c7dfea7965e3933d39e 100644 (file)
@@ -91,16 +91,16 @@ sub _set_builddir {
        }
 }
 
-# This instance method is called to check if the build system is capable
+# This instance method is called to check if the build system is able
 # to auto build a source package. Additional argument $step describes
 # which operation the caller is going to perform (either configure,
 # build, test, install or clean). You must override this method for the
 # build system module to be ever picked up automatically. This method is
 # used in conjuction with @Dh_Buildsystems::BUILDSYSTEMS.
 #
-# This method is supposed to be called with source root directory being
-# working directory. Use $this->get_buildpath($path) method to get full
-# path to the files in the build directory.
+# This method is supposed to be called inside the source root directory.
+# Use $this->get_buildpath($path) method to get full path to the files
+# in the build directory.
 sub check_auto_buildable {
        my $this=shift;
        my ($step) = @_;
@@ -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." .
@@ -255,7 +257,7 @@ sub _cd {
        }
 }
 
-# Changes working directory to the source directory (if needed)
+# Changes working directory to the source directory (if needed),
 # calls doit(@_) and changes working directory back to the top
 # directory.
 sub doit_in_sourcedir {
@@ -372,4 +374,4 @@ sub clean {
        my $this=shift;
 }
 
-1;
+1