Bernhard Walle wrote: > Am 20.03.2012 09:43, schrieb Michael Olbrich: > > On Mon, Mar 19, 2012 at 08:57:50PM +0100, Remy Bohmer wrote: > >> This error occurs in case PTXCONF_FLASHBENCH_MAX_BUFSIZE is not > >> defined: > >> $ ptxdist get > >> expr: syntax error > >> make: Nothing to be done for `get'. > >> > >> Change-Id: I1978d62b8781dbd5090b8a47b8fd8b944e6c79dc > >> Signed-off-by: Remy Bohmer <li...@bohmer.net> > >> --- > >> rules/flashbench.make | 8 +++++++- > >> 1 files changed, 7 insertions(+), 1 deletions(-) > >> > >> diff --git a/rules/flashbench.make b/rules/flashbench.make > >> index fcb669e..b312979 100644 > >> --- a/rules/flashbench.make > >> +++ b/rules/flashbench.make > >> @@ -31,8 +31,14 @@ FLASHBENCH_LICENSE := GPL v2 > >> > >> FLASHBENCH_CONF_TOOL := NO > >> FLASHBENCH_MAKE_ENV := $(CROSS_ENV) > >> + > >> +ifdef PTXCONF_FLASHBENCH_MAX_BUFSIZE > >> +FLASHBENCH_MAX_BUFSIZE := $(PTXCONF_FLASHBENCH_MAX_BUFSIZE) > >> +else > >> +FLASHBENCH_MAX_BUFSIZE := 1 > >> +endif > > > > I think we should report an error here: > > > > ifndef PTXCONF_FLASHBENCH_MAX_BUFSIZE > > $(error some error message here) > > endif > > I think the problem is here that flashbench is not selected, so the > PTXCONF_FLASHBENCH_MAX_BUFSIZE > option is unset.
Just delay the evaluation of the expression to the point of time when it is really required. diff --git a/rules/flashbench.make b/rules/flashbench.make index fcb669e..0ef52d1 100644 --- a/rules/flashbench.make +++ b/rules/flashbench.make @@ -31,7 +31,7 @@ FLASHBENCH_LICENSE := GPL v2 FLASHBENCH_CONF_TOOL := NO FLASHBENCH_MAKE_ENV := $(CROSS_ENV) -FLASHBENCH_MAKE_OPT := CC=$(CROSS_CC) \ +FLASHBENCH_MAKE_OPT = CC=$(CROSS_CC) \ EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE)) jbe -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | -- ptxdist mailing list ptxdist@pengutronix.de