Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
X-Server-Uuid: ff9369ea-8e79-11d4-bb71-00508bd369f2
Message-ID: <200011171625.eAHGPWM02513@dymwsm11.mailwatch.com>
From: "Fleischer, Karsten (K.)" <kfleisc1@ford.com>
To: "Cygwin (E-mail)" <cygwin@sourceware.cygnus.com>
Subject: RE: testing if it's cygwin
Date: Fri, 17 Nov 2000 11:25:21 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2651.58)
X-WSS-ID: 160B83AE592994-01-01
Content-Type: text/plain; 
 charset=iso-8859-1
Content-Transfer-Encoding: 7bit

Hi Joerg,

> I use 
> 
> if ( test `uname | grep -ic Cygwin` -gt 0 ); then
> 	echo "Cygwin"
> fi
> 

Surely this will work. But if you have _one_ makefile used to bootstrap the
building process on _any_ machine (I think that's what Kris wants to do),
you'll have to do something very simple to determine the OS type to prevent
make from complaining about not finding 'uname' or whatever.
I provided a Cygwin build system for FreeType2 (www.freetype.org), which
will build on Windows, DOS, different Unices, from one makefile and I use
OSTYPE to differentiate between Windows/DOS and Cygwin.

> > I check the environment variable OSTYPE for "cygwin" in my 
> makefiles.
> > However, I don't know if it's reliable.
> 
> It's not. Changed from cygwin to cygwin32 and back to cygwin.

On B20, I think, it was cygwin32. If we could rely on it being "cygwin" now
and forever, we have no problems with it.

Karsten


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

