[Build-common-hackers] Bug#505328: Bug#505328: Add support for parallel builds

Peter Eisentraut peter_e at gmx.net
Sun Jun 14 12:44:06 UTC 2009


On Saturday 30 May 2009 13:34:12 Felipe Sateler wrote:
> Attached is a patch that gets the number of parallel jobs, and adds support
> for parallel building in the makefile, autotools, qmake,  permodule and
> cmake classes.

The problem I see is that probably for a very significant number of packages, 
parallel make won't work, meaning the upstream build system isn't robust 
enough to support it.  So we can't turn this on by default, or we will break 
potentially hundreds of packages.

Policy says that the package maintainer should decide whether applying 
parallel builds is safe and appropriate for a given package.  So the best we 
could do, I think, is to add some code for parsing DEB_BUILD_OPTIONS, and make 
the user set a variable to enable parallelism, such as

DEB_BUILD_PARALLEL = yes

> PS: why do all these classes override the default DEB_MAKE_INVOKE? This had
> me wondering why it didn't work for a while.

Yeah, it's a bit weird.  I applied a small patch to make this easier.

> PPS: I don't think the make invocation should have a +, because if the
> configure stage creates stuff that the makefile needs for running, calling
> debian/rules -n doesn't work anymore (which is the case in cdbs itself).

I think this is actually an artifact of a previous variant of parallel make 
support, in which you passed -j from the environment to debian/rules.  We can 
remove this once we have the new support in place.





More information about the Build-common-hackers mailing list