Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Sep 2000 14:20:45 +0300
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        Peter Pentchev <roam@orbitel.bg>
Cc:        Marco van de Voort <marcov@stack.nl>, freebsd-ports@FreeBSD.org
Subject:   Re: Freepascal
Message-ID:  <39C0B48C.EDDDDC73@FreeBSD.org>
References:  <20000913201407.4E4E52E802@hermes.tue.nl> <39C0ADA0.EBE7FE9F@FreeBSD.org> <20000914140034.B32524@ringwraith.office1.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39C0B48C.EDDDDC73>