[U-Boot] [PATCH] mkconfig: deny messed up ARCH definition

Menon, Nishanth nm at ti.com
Mon Nov 2 16:26:54 CET 2009


> From: Wolfgang Denk [mailto:wd at denx.de]
> Sent: Sunday, November 01, 2009 8:58 AM
> 
> Dear Mike Frysinger,
> 
> In message <200911010838.08938.vapier at gentoo.org> you wrote:
> >
> > > > > +if [ ! -z "$ARCH" -a "$ARCH" != "$2" ]; then
> > > >
> > > > is the !-z really needed ?
> > >
> > > We don't want the check to trigger if ARCH is not defined.
> > > [ "$ARCH" != "$2" ] will trigger as "" != "arm"
> >
> > the implied question is whether this is a valid state.  i know you dont
> wan> t
> > that kind of comparison, but i thought the Makefile would have set it up
> fo> r
> > you by default.  now that i think about it a bit more, that isnt what
> happe> ns
> > at all.
> >
> > so only thing to change here is to use -n and not !-z
> 
> Or even omit the (redundant) "-n" and just write
> 
> 	if [ "$ARCH" -a "$ARCH" != "$2" ]; then
Ack. V2 coming up

Regards,
Nishanth Menon


More information about the U-Boot mailing list