[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

parallel builds using DEB_BUILD_OPTIONS



Hi,

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)))
  MAKEFLAGS += -j$(NUMJOBS)
endif


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?

Thanks,
-Steve


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

Attachment: signature.asc
Description: Digital signature


Reply to: