From owner-freebsd-ports Thu Sep 14 4:21: 6 2000 Delivered-To: freebsd-ports@freebsd.org Received: from blizzard.sabbo.net (blizzard.sabbo.net [193.193.218.18]) by hub.freebsd.org (Postfix) with ESMTP id 5A75337B422 for ; Thu, 14 Sep 2000 04:21:00 -0700 (PDT) Received: from vic.sabbo.net (root@[193.193.218.96]) by blizzard.sabbo.net (8.9.1/8.9.3) with ESMTP id OAA09316; Thu, 14 Sep 2000 14:20:48 +0300 (EEST) Received: from FreeBSD.org (big_brother.vega.com [192.168.1.1]) by vic.sabbo.net (8.11.0/8.9.3) with ESMTP id e8EBKkB01120; Thu, 14 Sep 2000 14:20:46 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Message-ID: <39C0B48C.EDDDDC73@FreeBSD.org> Date: Thu, 14 Sep 2000 14:20:45 +0300 From: Maxim Sobolev Organization: Vega International Capital X-Mailer: Mozilla 4.75 [en] (WinNT; U) X-Accept-Language: uk,ru,en MIME-Version: 1.0 To: Peter Pentchev Cc: Marco van de Voort , freebsd-ports@FreeBSD.org Subject: Re: Freepascal References: <20000913201407.4E4E52E802@hermes.tue.nl> <39C0ADA0.EBE7FE9F@FreeBSD.org> <20000914140034.B32524@ringwraith.office1.bg> Content-Type: text/plain; charset=x-user-defined Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Peter Pentchev wrote: > On Thu, Sep 14, 2000 at 01:51:12PM +0300, Maxim Sobolev wrote: > > Marco van de Voort wrote: > > > > > The actual porting is now nearly finished, so I can start creating a > > > port. > > > > > > One of the things I still need is the recommended way to tell the > > > difference between Linux and FreeBSD in a makefile. (for > > > autosettings that can be overruled), preferably without using external > > > programs except the binutils package. > > > > > > A unique way to tell FreeBSD apart from all other *nix platforms > > > would even be better :-) > > > > "uname -s"? > > > > -Maxim > > ..which brings up a question. > > Since make processes ifdef's before anything else in the Makefile, > one cannot assign `uname -s` to a variable, and then test against this; > the shell escape shall be processed *after* the includes, and the test > will inevitably fail. > > Is there a way around this? Is there a Makefile-only way to test > OS/platform/whatever, and set variables accordingly? I'm not sure what you are talking about, but what wrong with the following: OSNAME!= uname -s .if ${OSNAME} == "FreeBSD" blabla .else ... .endif -Maxim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message