On Fri, Dec 14, 2012 at 04:48:48PM +0100, Dan Horák wrote:
Parag N(पराग़) píše v Pá 14. 12. 2012 v 21:14 +0530:
Hi, I want to know is there any documentation available on parallel make? If a package is not building with parallel make then can we fix Makefile?
https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#...
Random thoughts on parallel builds:
In cases where parallel builds fail, I try to fix the problem, but sometimes this is not possible. I try to add a comment about this in the spec file, and I think that's a good idea for everyone to do that. Can we amend the above guidelines to say so?
Also, I have MAKEFLAGS=-j9 set on my development machine. This is passed through to rpmbuild, and it does break 'fedpkg local' on some packages. One way to avoid this is to unset MAKEFLAGS in %build, but better ways are:
(1) Fix the build so it works in parallel.
(2) If (1) is not possible, push a patch upstream to add
.NOTPARALLEL:
to the troublesome Makefile (can also be added to Makefile.am etc).
We use .NOTPARALLEL in a couple of libguestfs subdirectories to cope with certain hard-to-fix cases, or where we haven't had the time yet to work out precisely what dependencies are missing. [The vast majority of libguestfs builds in parallel]. Using .NOTPARALLEL is ideal for upstream if they can't / don't want to fix parallel builds, and want to ensure that even if MAKEFLAGS is set it won't break things.
Finally, weird build systems. A few OCaml packages have this, where it's just not obvious *how* one could do a parallel build, particularly where it's not even using 'make'. (eg. anything using ocamlbuild, I really wish ocamlbuild would die)
Rich.