[Build-common-hackers] Bug#505328: Please add support for parallel= in DEB_BUILD_OPTIONS

Steve M. Robbins smr at debian.org
Tue Nov 11 19:08:34 UTC 2008

Package: cdbs
Version: 0.4.52
Severity: normal


The Policy Manual now suggests that packages support parallel building
where it makes sense [1].  I have several large packages that can
benefit from parallel builds and I'd like to make it easy to do with

It would be nice if I could either set some variable like
DEB_MAKE_PARALLEL=yes, or use something like
    include /usr/share/cdbs/1/rules/parallel.mk
and be finished.  

Failing that, I need some way to pass a -jN flag to the initial make
invocation.  Note that the recipe given in the Policy Manual -- to set
MAKEFLAGS -- 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.

I did not find in cdbs documentation how to pass a flag only to the
initial make.  In discussion on debian-devel, the following was
suggested [3]:


The poster suggested it might be an ugly hack and indeed, this
subverts the suggested intent of DEB_MAKE_BUILD_TARGET.  But it does
work, at least for my purposes (using class/makefile.mk).  Maybe
adding a parallel DEB_MAKE_BUILD_OPTIONS or something is the way to

Likely you have other, better ideas.


[1] http://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
[2] http://make.paulandlesley.org/jobserver.html
[3] http://lists.debian.org/debian-devel/2008/10/msg00317.html

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages cdbs depends on:
ii  debhelper                     7.0.17     helper programs for debian/rules

Versions of packages cdbs recommends:
ii  autotools-dev                 20080123.2 Update infrastructure for config.{

Versions of packages cdbs suggests:
ii  devscripts                    2.10.40    scripts to make the life of a Debi
ii  doc-base                      0.8.16     utilities to manage online documen

-- no debconf information

More information about the Build-common-hackers mailing list