Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Mar 2000 13:15:45 -0700
From:      Warner Losh <imp@village.org>
To:        chet@po.CWRU.Edu
Cc:        jhix@mindspring.com, Doug@gorean.org, hackers@FreeBSD.ORG
Subject:   Re: empty lists in for 
Message-ID:  <200003062015.NAA61215@harmony.village.org>
In-Reply-To: Your message of "Mon, 06 Mar 2000 12:09:02 EST." <1000306170902.AA22857.SM@nike.ins.cwru.edu> 
References:  <1000306170902.AA22857.SM@nike.ins.cwru.edu>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <1000306170902.AA22857.SM@nike.ins.cwru.edu> Chet Ramey writes:
: The idiomatic solution for this sort of thing is changing
: your makefile recipes from
: 
: 	for f in ${SUBDIRS} do ...
: 
: to
: 
: 	sh_subdirs=${SUBDIRS}; for f in $$sh_subdirs ; do ...

That's much better than what I've tended to do:
	for f in x ${FOO}; do
		if [  $f != x ]; then
		fi
	done

there's lots of other workarounds, from seeing if SUBDIRS is defined,
to using make's .foreach.

Warner


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?200003062015.NAA61215>