From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from moutng.kundenserver.de ([212.227.126.187]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1SAdGL-00058J-9m for ptxdist@pengutronix.de; Thu, 22 Mar 2012 09:20:51 +0100 From: Bernhard Walle Date: Thu, 22 Mar 2012 09:17:31 +0100 Message-Id: <1332404251-1245-1-git-send-email-bernhard@bwalle.de> In-Reply-To: <20120321231859.GQ20481@pengutronix.de> References: <20120321231859.GQ20481@pengutronix.de> Subject: [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Bernhard Walle When flashbench is not selected in "ptxdist menuconfig", then $(PTXCONF_FLASHBENCH_MAX_BUFSIZE) is undefined. In that case, the expr call fails. Fix the problem by delaying the evaluation of FLASHBENCH_MAKE_OPT until it's really needed, i.e. when flashbench has been selected. Signed-off-by: Bernhard Walle Signed-off-by: Bernhard Walle --- rules/flashbench.make | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rules/flashbench.make b/rules/flashbench.make index fcb669e..39bdfb6 100644 --- a/rules/flashbench.make +++ b/rules/flashbench.make @@ -31,7 +31,10 @@ FLASHBENCH_LICENSE := GPL v2 FLASHBENCH_CONF_TOOL := NO FLASHBENCH_MAKE_ENV := $(CROSS_ENV) -FLASHBENCH_MAKE_OPT := CC=$(CROSS_CC) \ + +# Use '=' instaed of ':=' because $(PTXCONF_FLASHBENCH_MAX_BUFSIZE) is not defined +# when flashbench is not selected to be built. +FLASHBENCH_MAKE_OPT = CC=$(CROSS_CC) \ EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE)) # ---------------------------------------------------------------------------- -- 1.7.9.4 -- ptxdist mailing list ptxdist@pengutronix.de