From owner-freebsd-hackers Tue Mar 7 1:50:31 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from iclub.nsu.ru (iclub.nsu.ru [193.124.222.66]) by hub.freebsd.org (Postfix) with ESMTP id BD90137BF28 for ; Tue, 7 Mar 2000 01:49:41 -0800 (PST) (envelope-from fjoe@iclub.nsu.ru) Received: from localhost (fjoe@localhost) by iclub.nsu.ru (8.9.3/8.9.3) with ESMTP id PAA51767; Tue, 7 Mar 2000 15:28:05 +0600 (NS) (envelope-from fjoe@iclub.nsu.ru) Date: Tue, 7 Mar 2000 15:28:05 +0600 (NS) From: Max Khon To: chet@po.CWRU.Edu Cc: iedowse@maths.tcd.ie, imp@village.org, jhix@mindspring.com, Doug@gorean.org, hackers@FreeBSD.ORG Subject: Re: empty lists in for In-Reply-To: <1000306221330.AA36812.SM@nike.ins.cwru.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, there! On Mon, 6 Mar 2000, Chet Ramey wrote: > > >: 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. man 1 sh: -u nounset Write a message to standard error when attempting to expand a variable that is not set, and if the shell is not interactive, exit immediately. (UNIMPLEMENTED) ^^^^^^^^^^^^^ :) /fjoe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message