[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



On Sat, 6 Sep 2003 19:12:50 -0400, Joey Hess <joeyh@debian.org> said: 

> 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.

	One of the reasons was to not have to have policy amended for
 every little variable that one came up with; the omnibus version
 allows the list of things to be added to at will. Admittedly, this
 makes for complex code; if the list gets too large

	manoj
-- 
It's amazing how many people you could be friends with if only they'd
make the first approach.
Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



Reply to: