summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Buildsystem.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Debian/Debhelper/Buildsystem.pm')
-rw-r--r--Debian/Debhelper/Buildsystem.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/Debian/Debhelper/Buildsystem.pm b/Debian/Debhelper/Buildsystem.pm
index 62c45b5..677e3bf 100644
--- a/Debian/Debhelper/Buildsystem.pm
+++ b/Debian/Debhelper/Buildsystem.pm
@@ -47,7 +47,12 @@ sub DEFAULT_BUILD_DIRECTORY {
# specified or empty, defaults to the current directory.
# - builddir - specifies build directory to use. Path is relative to the
# current (top) directory. If undef or empty,
-# DEFAULT_BUILD_DIRECTORY directory will be used.
+# DEFAULT_BUILD_DIRECTORY directory will be used.
+# - parallel - number of parallel process to be spawned for building
+# sources. Parallel building needs to be supported by the
+# underlying build system for this option to be effective.
+# Defaults to undef (i.e. parallel disabled, but do not try to
+# enforce this limit by messing with environment).
# Derived class can override the constructor to initialize common object
# parameters. Do NOT use constructor to execute commands or otherwise
# configure/setup build environment. There is absolutely no guarantee the
@@ -58,6 +63,7 @@ sub new {
my $this = bless({ sourcedir => '.',
builddir => undef,
+ parallel => undef,
cwd => Cwd::getcwd() }, $class);
if (exists $opts{sourcedir}) {
@@ -71,6 +77,9 @@ sub new {
if (exists $opts{builddir}) {
$this->_set_builddir($opts{builddir});
}
+ if (defined $opts{parallel} && $opts{parallel} >= 1) {
+ $this->{parallel} = $opts{parallel};
+ }
return $this;
}
@@ -243,6 +252,11 @@ sub get_source_rel2builddir {
return $dir;
}
+sub get_parallel {
+ my $this=shift;
+ return $this->{parallel};
+}
+
# When given a relative path to the build directory, converts it
# to the path that is relative to the source directory. If $path is
# not given, returns a path to the build directory that is relative