From owner-freebsd-hackers Thu Nov 12 11:13:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA09927 for freebsd-hackers-outgoing; Thu, 12 Nov 1998 11:13:07 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from yonge.cs.toronto.edu (yonge.cs.toronto.edu [128.100.2.11]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id LAA09902 for ; Thu, 12 Nov 1998 11:13:04 -0800 (PST) (envelope-from dholland@cs.toronto.edu) Received: from qew.cs.toronto.edu ([128.100.2.15]) by yonge.cs.toronto.edu with SMTP id <86461-8532>; Thu, 12 Nov 1998 14:12:39 -0500 Received: by qew.cs.toronto.edu id <37768-2936>; Thu, 12 Nov 1998 14:12:20 -0500 Subject: Re: bsd make to gnu make conversion, anyone?? From: David Holland To: joelh@gnu.org (Joel Ray Holveck) Date: Thu, 12 Nov 1998 14:12:14 -0500 Cc: dholland@cs.toronto.edu, kline@tao.thought.org, hackers@FreeBSD.ORG In-Reply-To: <86hfw5ie8q.fsf@detlev.UUCP> from "Joel Ray Holveck" at Nov 12, 98 02:04:05 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <98Nov12.141220edt.37768-2936@qew.cs.toronto.edu> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > This is the cleanest solution. Still, if you want alternatives, I > haven't tried this, but foreach may work here, as a generalization of > for: > > define do-lang > $(lang).mv.cat: $(.CURDIR)/nls/$(lang)/mv.msg > gencat -new $(.TARGET) $(.ALLSRC) > endef > $(foreach lang,$(LANGS),$(do-lang)) eww. I didn't know this would work. I wish someone would add support for bsd make syntax to gmake. (Before you tell me to put my code where my mouth is, I looked into this at one point and concluded it would take me longer to figure out how gmake's parser worked than to write a whole new make. So I didn't. Why doesn't it use yacc?) > What's wrong with using sh like God intended? Two reasons; one that issuing complex shell commands makes make -n output less useful (for an extreme case of this, try make -n install in gnu binutils), and the other that when you do loops in the shell they don't always terminate on error like you (usually) want. For install this may not be that significant, but when you're doing recursion into subdirectories it sucketh. Hard. -- - David A. Holland | (please continue to send non-list mail to dholland@cs.utoronto.ca | dholland@hcs.harvard.edu. yes, I moved.) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message