# 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 - max number of parallel processes to be spawned for building
+# sources (-1 = unlimited; 1 = no parallel)
# 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
my $this = bless({ sourcedir => '.',
builddir => undef,
+ parallel => undef,
cwd => Cwd::getcwd() }, $class);
if (exists $opts{sourcedir}) {
if (exists $opts{builddir}) {
$this->_set_builddir($opts{builddir});
}
+ if (defined $opts{parallel}) {
+ $this->{parallel} = $opts{parallel};
+ }
return $this;
}
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