[Build-common-hackers] parallel builds using DEB_BUILD_OPTIONS

Steve M. Robbins steve at sumost.ca
Wed Oct 15 12:17:41 UTC 2008


The Policy Manual [1] gives the following recipe for supporting
parallel make:

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
  NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))

Unfortunately, for packages that use recursive makefiles (the most
common practice) this results in the following warning

  make[1]: warning: -jN forced in submake: disabling jobserver mode.

which apparently is sub-optimal [2].  The issue in that MAKEFLAGS
is applied to each recursive make.  The recommended practice is to
supply -jN *only* to the initial invocation of make.  

It strikes me, therefore, that the policy manual should be updated,
removing MAKEFLAGS and instead showing an explicit "make -J$(NUMJOBS) ...".

However, my problem is with cdbs: how can I supply -jN to only the
initial make?


[1] http://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
[2] http://make.paulandlesley.org/jobserver.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/build-common-hackers/attachments/20081015/44901e51/attachment.pgp 

More information about the Build-common-hackers mailing list