FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 10-15-2008, 12:17 PM
"Steve M. Robbins"
 
Default 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
 
Old 10-15-2008, 12:55 PM
Stefano Zacchiroli
 
Default parallel builds using DEB_BUILD_OPTIONS

On Wed, Oct 15, 2008 at 07:17:41AM -0500, Steve M. Robbins wrote:
> It strikes me, therefore, that the policy manual should be updated,
> removing MAKEFLAGS and instead showing an explicit "make -J$(NUMJOBS) ...".

Or better "$(MAKE) -j$(NUMJOBS)".

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

Maybe it's a ugly hack, but what about:

DEB_MAKE_BUILD_TARGET = -j$(NUMJOBS) ACTUAL_BUILD_TARGET

It should work at least in case you are using only the makefile.mk
class, I haven't checked if it can be made to work with autotools.mk.

Cheers.

--
Stefano Zacchiroli -*- PhD in Computer Science PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è sempre /oo All one has to do is hit the right
uno zaino -- A.Bergonzoni \__/ keys at the right time -- J.S.Bach
 

Thread Tools




All times are GMT. The time now is 04:10 PM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org