mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Bernhard Walle <bernhard@bwalle.de>
Subject: Re: [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined
Date: Tue, 20 Mar 2012 10:09:43 +0100	[thread overview]
Message-ID: <201203201009.43430.jbe@pengutronix.de> (raw)
In-Reply-To: <7397e853a04b4f647c9c73debb3830ea@bwalle.de>

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 <linux@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

  reply	other threads:[~2012-03-20  9:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 19:57 Remy Bohmer
2012-03-20  8:43 ` Michael Olbrich
2012-03-20  8:47   ` Bernhard Walle
2012-03-20  9:09     ` Juergen Beisert [this message]
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
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=201203201009.43430.jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=bernhard@bwalle.de \
    --cc=ptxdist@pengutronix.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