From owner-freebsd-hackers Thu Nov 12 03:50:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA27472 for freebsd-hackers-outgoing; Thu, 12 Nov 1998 03:50:29 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from quackerjack.cc.vt.edu (quackerjack.cc.vt.edu [198.82.160.250]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA27466 for ; Thu, 12 Nov 1998 03:50:26 -0800 (PST) (envelope-from jobaldwi@vt.edu) Received: from sable.cc.vt.edu (sable.cc.vt.edu [128.173.16.30]) by quackerjack.cc.vt.edu (8.8.8/8.8.8) with ESMTP id GAA10277; Thu, 12 Nov 1998 06:49:40 -0500 (EST) Received: from john.baldwinfamily.org (jobaldwi.campus.vt.edu [198.82.67.63]) by sable.cc.vt.edu (8.8.8/8.8.8) with ESMTP id GAA28547; Thu, 12 Nov 1998 06:49:39 -0500 (EST) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <199811120641.WAA04442@tao.thought.org> Date: Thu, 12 Nov 1998 06:49:39 -0500 (EST) Reply-To: jobaldwi@vt.edu Organization: Virginia Tech From: John Baldwin To: Gary Kline Subject: Re: bsd make to gnu make conversion, anyone?? Cc: hackers@FreeBSD.ORG, (David Holland) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- On 12-Nov-98 Gary Kline wrote: > Can't. We're doing the entire BSD built using > gmake. .... > > Is there a cleaner way using /bin/sh commands > within gmake? Something like > > for $${lang} in $${LANGS} > do > .... > done > > thanks for your input, > > gary I'm using the following for loop in a makefile that works fine with both pmake and gmake: SUBDIRS = lib scripts support all clean cleanclean install: @for dir in $(SUBDIRS) ;\ do \ (cd $$dir ; echo "making $@ in $(CURRENT_DIR)/$$dir..." ; $(MAKE) $(MFLAGS) $@ ) ;\ done Hopefully that'll help. The only thing is that you need a semicolon before the do and after every statement. Also, it wants a for loop to all be on one line (?) so that you have to use \'s to make it concatenate the various lines. The ampersand on the for is to prevent the command from being echoed, btw. - --- John Baldwin -- http://members.freedomnet.com/~jbaldwin/ PGP Key: http://members.freedomnet.com/~jbaldwin/pgpkey.asc Lawyer (n) - one skilled in the circumvention of the law. -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQB1AwUBNkrKEYjYza302vYpAQHw1AL+Lwulc7TRmnqEFUpVuVhzl2n0c/Xt+v8b XMT0aQz3At3fG97rWz2ACHl4JFnD7Nf+fkxfZrChu9yfgiPnJxhAzwoP7EqKVngf t+MYK0FrIH/RdcdsYU5J/6RLYn4x8vLJ =jgKw -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message