-# Defines debhelper buildsystem class interface and implementation
+# Defines debhelper build system class interface and implementation
# of common functionality.
#
# Copyright: © 2008-2009 Modestas Vainius
use Debian::Debhelper::Dh_Lib;
# Cache DEB_BUILD_GNU_TYPE value. Performance hit of multiple
-# invocations is noticable when listing buildsystems.
+# invocations is noticable when listing build systems.
our $DEB_BUILD_GNU_TYPE = dpkg_architecture_value("DEB_BUILD_GNU_TYPE");
# Build system name. Defaults to the last component of the class
return $1;
}
else {
- error("ınvalid buildsystem class name: $class");
+ error("ınvalid build system class name: $class");
}
}
# 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 (soft mode).
+# directory (i.e. out of source is prefered to in source).
sub enforce_out_of_source_building {
my ($this, $builddir) = @_;
if (!defined $this->get_builddir()) {
# In case of failure, the method may just error() out.
#
# These methods should be overriden by derived classes to
-# implement buildsystem specific steps needed to build the
+# implement build system specific steps needed to build the
# source. Arbitary number of custom step arguments might be
# passed. Default implementations do nothing.
sub configure {
-# A buildsystem plugin for handling autoconf based projects
+# A debhelper build system class for handling Autoconf based projects
#
# Copyright: © 2008 Joey Hess
# © 2008-2009 Modestas Vainius
-# A buildsystem plugin for handling CMake based projects.
-# It enforces out of source tree building.
+# A debhelper build system class for handling CMake based projects.
+# It prefers out of source tree building.
#
# Copyright: © 2008-2009 Modestas Vainius
# License: GPL-2+
my $class=shift;
my $this=$class->SUPER::new(@_);
my %args=@_;
- # Enforce out of source tree building (soft mode).
+ # Prefer out of source tree building.
$this->enforce_out_of_source_building($args{builddir});
return $this;
}
-# A buildsystem plugin for handling simple Makefile based projects.
+# A debhelper build system class for handling simple Makefile based projects.
#
# Copyright: © 2008 Joey Hess
# © 2008-2009 Modestas Vainius
-# A buildsystem plugin for handling Perl Build based projects.
+# A build system class for handling Perl Build based projects.
#
# Copyright: © 2008-2009 Joey Hess
# © 2008-2009 Modestas Vainius
-# A buildsystem plugin for handling Perl MakeMaker based projects.
+# A debhelper build system class for handling Perl MakeMaker based projects.
#
# Copyright: © 2008-2009 Joey Hess
# © 2008-2009 Modestas Vainius
-# A buildsystem plugin for building Python Distutils based
-# projects.
+# A debhelper build system class for building Python Distutils based
+# projects. It prefers out of source tree building.
#
# Copyright: © 2008 Joey Hess
# © 2008-2009 Modestas Vainius
use base 'Debian::Debhelper::Buildsystem';
sub DESCRIPTION {
- "Python distutils"
+ "Python Distutils (setup.py)"
}
sub DEFAULT_BUILD_DIRECTORY {
-# A module for loading and managing debhelper buildsystem plugins.
+# A module for loading and managing debhelper build system plugins.
# This module is intended to be used by all dh_auto_* helper commands.
#
# Copyright: © 2009 Modestas Vainius
our @EXPORT=qw(&buildsystems_init &buildsystems_do &load_buildsystem &load_all_buildsystems);
# Historical order must be kept for backwards compatibility. New
-# buildsystems MUST be added to the END of the list.
+# build systems MUST be added to the END of the list.
our @BUILDSYSTEMS = (
"autoconf",
"perl_makemaker",
eval "use $module";
if ($@) {
- error("unable to load buildsystem class '$system': $@");
+ error("unable to load build system class '$system': $@");
}
if (!exists $bsopts{builddir} && defined $opt_builddir) {
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
+# Similar to create_build system_instance(), but it attempts to autoselect
+# a build system if none was specified. In case autoselection fails, undef
# is returned.
sub load_buildsystem {
my $system=shift;
}
}
- # Push debhelper built-in buildsystems first
+ # Push debhelper built-in build systems first
for my $name (@BUILDSYSTEMS) {
- error("debhelper built-in buildsystem '$name' could not be found/loaded")
+ error("debhelper built-in build system '$name' could not be found/loaded")
if not exists $buildsystems{$name};
push @buildsystems, $buildsystems{$name};
delete $buildsystems{$name};
}
- # The rest are 3rd party buildsystems
+ # The rest are 3rd party build systems
for my $name (keys %buildsystems) {
my $inst = $buildsystems{$name};
$inst->{thirdparty} = 1;
sub buildsystems_list {
my $step=shift;
- # List buildsystems (including auto and specified status)
+ # List build systems (including auto and specified status)
my ($auto, $specified);
my @buildsystems = load_all_buildsystems();
for my $inst (@buildsystems) {
);
test_buildsystem_paths_api($bs, "default builddir, sourcedir=autoconf", \%tmp);
-# Enforce "hard" out of source tree building
+# Enforce out of source tree building
# sourcedir=builddir=autoconf hence default builddir is implied
$bs = $BS_CLASS->new(builddir => "autoconf", sourcedir => "autoconf/");
$bs->enforce_out_of_source_building();
);
test_buildsystem_paths_api($bs, "no builddir, sourcedir=autoconf", \%tmp);
-# Enforce "soft" out of source tree building when
+# Prefer out of source tree building when
# sourcedir=builddir=autoconf hence builddir should be dropped.
$bs->enforce_out_of_source_building("autoconf");
test_buildsystem_paths_api($bs, "soft out of source enforced, sourcedir=builddir", \%tmp);