}
}
-# 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) = @_;
}
}
-# 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 {
my $this=shift;
}
-1;
+1
$this->doit_in_builddir($this->get_source_rel2builddir("configure"), @opts, @_);
}
-1;
+1
$this->doit_in_builddir("cmake", $this->get_source_rel2builddir(), @flags);
}
-1;
+1
$this->do_perl("Build", "--allow_mb_mismatch", 1, "distclean", @_);
}
-1;
+1
$this->SUPER::install($destdir, "PREFIX=/usr", @_);
}
-1;
+1
$this->doit_in_sourcedir('find', '.', '-name', '*.pyc', '-exec', 'rm', '{}', ';');
}
-1;
+1
}
}
- # Push standard debhelper build systems first
+ # Standard debhelper build systems first
for my $name (@BUILDSYSTEMS) {
error("standard debhelper build system '$name' could not be found/loaded")
if not exists $buildsystems{$name};
# List build systems (including auto and specified status)
my ($auto, $specified);
- my @buildsystems = load_all_buildsystems();
- for my $inst (@buildsystems) {
+ for my $inst (load_all_buildsystems()) {
my $is_specified = defined $opt_buildsys && $opt_buildsys eq $inst->NAME();
if (! defined $specified && defined $opt_buildsys && $opt_buildsys eq $inst->NAME()) {
$specified = $inst->NAME();
return 0;
}
-1;
+1
A buildsystem class needs to inherit or define these methods: DESCRIPTION,
check_auto_buildable, build, test, install, clean. See the comments
-inside Debian::Debhelper::Buildsystem for details.
+inside Debian::Debhelper::Buildsystem for details. Note that this interface
+is still subject to change.
Note that third-party buildsystems will not automatically be used by default,
but can be forced to be used via the --buildsystem parameter.