Date: Mon, 6 Mar 2000 17:13:30 -0500 From: Chet Ramey <chet@nike.ins.cwru.edu> To: iedowse@maths.tcd.ie Cc: imp@village.org, jhix@mindspring.com, Doug@gorean.org, hackers@FreeBSD.ORG, iedowse@maths.tcd.ie Subject: Re: empty lists in for Message-ID: <1000306221330.AA36812.SM@nike.ins.cwru.edu>
next in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1000306221330.AA36812.SM>