This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
RE: testing if it's cygwin
- To: "Cygwin (E-mail 3)" <cygwin at cygwin dot com>
- Subject: RE: testing if it's cygwin
- From: "Schaible, Joerg" <Joerg dot Schaible at gft dot com>
- Date: Fri, 17 Nov 2000 17:00:36 +0100
Hi Kris ans Karsten,
> > what would be the recommended way of testing (in a shell
> > script file, or a
> > Makefile) if it's being run on CYGWIN?
> > At the moment, I do
> > uname
> > and test on CYGWIN-NT4.0, but that seems like a bad idea,
> as I want to
> > support W9? or W2000 as well. Also, it relies on the
> > existence of uname of
> > course...
I use
if ( test `uname | grep -ic Cygwin` -gt 0 ); then
echo "Cygwin"
fi
> 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.
Greetings,
Jörg
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com