From: Bernhard Walle <bernhard@bwalle.de>
To: ptxdist@pengutronix.de
Cc: Bernhard Walle <walle@corscience.de>
Subject: [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected
Date: Thu, 22 Mar 2012 09:17:31 +0100 [thread overview]
Message-ID: <1332404251-1245-1-git-send-email-bernhard@bwalle.de> (raw)
In-Reply-To: <20120321231859.GQ20481@pengutronix.de>
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 <bernhard@bwalle.de>
Signed-off-by: Bernhard Walle <walle@corscience.de>
---
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
next prev parent reply other threads:[~2012-03-22 8:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 19:57 [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined Remy Bohmer
2012-03-20 8:43 ` Michael Olbrich
2012-03-20 8:47 ` Bernhard Walle
2012-03-20 9:09 ` Juergen Beisert
2012-03-20 19:02 ` Bernhard Walle
2012-03-20 19:28 ` Juergen Beisert
2012-03-20 19:35 ` Bernhard Walle
2012-03-20 19:44 ` Remy Bohmer
2012-03-20 19:36 ` [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected Bernhard Walle
2012-03-20 19:46 ` Remy Bohmer
2012-03-21 23:18 ` Michael Olbrich
2012-03-22 7:26 ` Juergen Beisert
2012-03-22 7:40 ` Wolfram Sang
2012-03-22 8:17 ` Bernhard Walle [this message]
2012-03-22 8:19 ` Bernhard Walle
2012-03-20 19:43 ` [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined Remy Bohmer
2012-03-20 8:57 ` Michael Olbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1332404251-1245-1-git-send-email-bernhard@bwalle.de \
--to=bernhard@bwalle.de \
--cc=ptxdist@pengutronix.de \
--cc=walle@corscience.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox