Bug 622435 - Enable parallel builds for Debian & Ubuntu
Summary: Enable parallel builds for Debian & Ubuntu
Status: NEW
Alias: None
Product: openSUSE.org
Classification: openSUSE
Component: BuildService (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Adrian Schröter
QA Contact: Adrian Schröter
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-15 01:34 UTC by Stephan Kleine
Modified: 2010-07-15 01:58 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Kleine 2010-07-15 01:34:05 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.
Comment 1 Stephan Kleine 2010-07-15 01:58:14 UTC
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.