From owner-freebsd-hackers Mon Mar 6 14:15: 1 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from nike.ins.cwru.edu (nike.INS.CWRU.Edu [129.22.8.219]) by hub.freebsd.org (Postfix) with ESMTP id E20E837BFCA for ; Mon, 6 Mar 2000 14:14:54 -0800 (PST) (envelope-from chet@nike.ins.cwru.edu) Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi) id RAA37031; Mon, 6 Mar 2000 17:14:24 -0500 (EST) (from chet) Date: Mon, 6 Mar 2000 17:13:30 -0500 From: Chet Ramey To: iedowse@maths.tcd.ie Subject: Re: empty lists in for Cc: imp@village.org, jhix@mindspring.com, Doug@gorean.org, hackers@FreeBSD.ORG, iedowse@maths.tcd.ie Reply-To: chet@po.CWRU.Edu Message-ID: <1000306221330.AA36812.SM@nike.ins.cwru.edu> Read-Receipt-To: chet@po.CWRU.Edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-In-Reply-To: Message from iedowse@maths.tcd.ie of Mon, 06 Mar 2000 20:38:44 +0000 (id <200003062038.aa62975@salmon.maths.tcd.ie>) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > In message <200003062015.NAA61215@harmony.village.org>, Warner Losh writes: > > >: to > >: > >: sh_subdirs=${SUBDIRS}; for f in $$sh_subdirs ; do ... > > > > >there's lots of other workarounds, from seeing if SUBDIRS is defined, > >to using make's .foreach. > > Another option is: > > for f in $$empty_list ${SUBDIRS}; do ... > > where 'empty_list' is any undefined sh variable. Not bad, but will break if the shell is run with the `-u' option on for some reason. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet) Chet Ramey, CWRU chet@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message