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

Bug#740397: busybox: please add support for parallel building



On 1 March 2014 03:01, Cyril Brulebois <kibi@debian.org> wrote:
> Ian Campbell <ijc@hellion.org.uk> (2014-03-01):
>> On Sat, 2014-03-01 at 03:17 +0100, Cyril Brulebois wrote:
>> > -       $(MAKE) -C ${DIR} install docs/busybox.1 \
>> > +       $(MAKE) -j$(NUMJOBS) -C ${DIR} install docs/busybox.1 \
>>
>> If parallel build is not set then won't this end up passing a bare "-j"
>> which will run an unlimited number of jobs...
>>
>> https://www.debian.org/doc/debian-policy/ch-source.html suggests:
>>
>>      ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
>>          NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
>>          MAKEFLAGS += -j$(NUMJOBS)
>>      endif
>>
>> to avoid this.
>
> Well I didn't want to set MAKEFLAGS unconditionally (not sure how other
> $(MAKE) calls deal with parallelism), so I've written crap instead; oops
> thanks for catching. If following policy's suggestion isn't possible, we
> could add "else\nNUMJOBS = 1" to avoid what you spotted.
>

I typically choose:
dh_auto_build --parallel -B${DIR} -- install docs/busybox.1

That does DEB_BUILD_OPTIONS processing, et.al. One does not need to
the rest of dh, to use parallel dh_auto_build invocations.

-- 
Regards,

Dimitri.


Reply to: