On Sat, Aug 04, 2007, Matthias Klose wrote: > Updated the Makefile example to work with whitespace and comma > separated values, without using the shell: > ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
I think this doesn't work as the test in the ifneq doesn't match a DEB_BUILD_OPTIONS with commas; instead, this is perhaps a simple way to support commas between DEB_BUILD_OPTIONS: , := , DEB_BUILD_OPTIONS := $(subst $(,), ,$(DEB_BUILD_OPTIONS)) and then parse DEB_BUILD_OPTIONS as proposed already: ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) MAKEFLAGS += -j$(NUMJOBS) endif But perhaps the biggest problem is that this would block us from ever allowing commas as part of the DEB_BUILD_OPTIONS, for example to pass LDFLAGS=-Wl,something (which would work if only spaces are allowed). -- Loïc Minier