Bugzilla – Bug 622435
Enable parallel builds for Debian & Ubuntu
Last modified: 2010-07-15 01:58:14 UTC
According to http://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options you need to export "DEB_BUILD_OPTIONS=parallel=n" before starting the build. "n" should be replaced with whatever "%{?_smp_mflags}" resolves to but _only_ the number (as in without "-j"). Then one apparently is able to do parallel builds with something like: NUMJOBS=1 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) endif $(MAKE) -j$(NUMJOBS) I know it is pretty hackish but that's apparently how they like to do it.
On reading that again one prolly could simply export whatever "%{?_smp_mflags}" resolves to and later just use "$(MAKE) $(NUMJOBS)" but I certainly don't know a thing about those debian macros. Also that ifneq line needs to be fixed since "(,...)" doesn't work and ("",...) neither so don't just copy it.