From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Sun, 01 Nov 2009 15:57:40 +0100 Subject: [U-Boot] [PATCH] mkconfig: deny messed up ARCH definition In-Reply-To: <200911010838.08938.vapier@gentoo.org> References: <1256998321-17270-1-git-send-email-nm@ti.com> <200910311740.59507.vapier@gentoo.org> <7A436F7769CA33409C6B44B358BFFF0C012AE7CAE2@dlee02.ent.ti.com> <200911010838.08938.vapier@gentoo.org> Message-ID: <20091101145740.BEF294C022@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Mike Frysinger, In message <200911010838.08938.vapier@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 ... Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Use the Force, Luke.