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

Re: Bug#209008: debian-policy: [PROPOSAL] common interface for parallel building in DEB_BUILD_OPTIONS



Robert Jordens wrote:
> +ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS)))
> +    PARALLEL_JOBS := $(shell echo $(DEB_BUILD_OPTIONS) | \
> +        sed -e 's/.*parallel=\([0-9]\+\).*/\1/')
> +    ifeq ($(DEB_BUILD_OPTIONS),$(PARALLEL_JOBS))
> +        PARALLEL_JOBS := $(shell if [ -f /proc/cpuinfo ]; \
> +            then echo `cat /proc/cpuinfo | grep 'processor' | wc -l`; \
> +            else echo 1; fi)
> +    endif
> +endif
> +MAKEFLAGS += $(NJOBS)

That's a lot of boilerplate, almost enough to call for a program
to parse DEB_BUILD_OPTIONS.

I don't understand why we have an environment variable with a complex
set of values in the first place. Surely something lile
DEB_BUILD_OPTIONS_PARALLELL=n, DEB_BUILD_OPTIONS_NOPT, and
DEB_BUILD_OPTIONS_NOSTRIP would not run us out of environment space,
and it's far easier to work with.

BTW, the link you gave appears to be to a large thread that covers a
lot of unrlated ground. I have not found any technical problems with
MAKE="make -jn" in it yet, but then I'm on dialup.

-- 
see shy jo

Attachment: pgpFatFBDIlB7.pgp
Description: PGP signature


Reply to: