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

Bug#209008: parallel building: DEB_BUILD_OPTIONS or DEB_BUILD_OPTIONS_PARALLEL



[Loïc Minier]
> On Wed, Jul 04, 2007, Russ Allbery wrote:
> > +ifneq (,$(findstring parallel=,$(DEB_BUILD_OPTIONS)))
> > +NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
> > +MAKEFLAGS += -j$(NUMJOBS)
> > +endif
> 
>  Since this fails for DEB_BUILD_OPTIONS="x=1,parallel=2", please change
>  the ifneq to use the same macro as in the jobs computation.
> 
> ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
> NUMJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
> MAKEFLAGS += -j$(NUMJOBS)
> endif

$(filter) filters on whitespace, so this still will not work for
"x=1,parallel=2".  My code, posted earlier, handles the (perhaps
common) case of comma-separated DEB_BUILD_OPTIONS.

Also, suggesting that one add this directly to MAKEFLAGS is probably
not great, as a lot of upstream Makefiles may not be -j-safe
everywhere.  This is true of one package I maintain, so I construct a
$(MAKE_-J) and pass it manually to the $(MAKE) targets that are
-j-safe, and not to the ones that aren't.
-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/

Attachment: signature.asc
Description: Digital signature


Reply to: