From owner-freebsd-hackers Mon Mar 9 16:03:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA07243 for freebsd-hackers-outgoing; Mon, 9 Mar 1998 16:03:23 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.119.24.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA05264 for ; Mon, 9 Mar 1998 15:55:13 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [194.198.43.36]) by ns1.yes.no (8.8.7/8.8.7) with ESMTP id XAA12817; Mon, 9 Mar 1998 23:06:29 GMT Received: (from eivind@localhost) by bitbox.follo.net (8.8.6/8.8.6) id AAA06724; Tue, 10 Mar 1998 00:06:27 +0100 (MET) Message-ID: <19980310000627.12328@follo.net> Date: Tue, 10 Mar 1998 00:06:27 +0100 From: Eivind Eklund To: nik@iii.co.uk, hackers@FreeBSD.ORG Subject: Re: Odd(?) sh/make behaviour. References: <199802250423.UAA17980@dingo.cdrom.com> <19980225103215.15997@iii.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: <19980225103215.15997@iii.co.uk>; from nik@iii.co.uk on Wed, Feb 25, 1998 at 10:32:15AM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Feb 25, 1998 at 10:32:15AM +0000, nik@iii.co.uk wrote: > On a vaguely related note (I'm trying to port some of the FreeBSD makefiles > to use GNU make), does anyone know how to emulate the > > .if !target(foo) > foo: bar > do_something > .endif > > construct in GNU make? I spent most of yesterday working through the > documentation, Alta Vista and Deja News in search of an answer, and came > up with none. Yeah - the following should do it: # .if !target(foo) foo: bar do_something # .endif The first rule encountered are used, while the last variable definition encountered is used. Thus, just defining the target without any .if's should work. Now, have anybody got a good way of exporting variables from BSD make for me? .export seems to be missing... (Yes, I know I can type them in for a recursive make, but it doesn't quite fit my standards of 'user friendliness'.) > I suspect it might (in the long term) be simpler to port the BSD make to > Solaris. You're probably right. I'll see if we might happen to have a port of bmake for Solaris lying around - I seem to remember some of my co-workers saying they did one for a project here. Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message