This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Reliably check if we're running under cygwin inside Makefile
- From: Grant Edwards <grante at visi dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 12 Jan 2009 20:10:06 +0000 (UTC)
- Subject: Re: Reliably check if we're running under cygwin inside Makefile
- References: <496B828A.3010006@bonhard.uklinux.net>
On 2009-01-12, Fergus <fergus@bonhard.uklinux.net> wrote:
> > osname := $(shell uname -s)
> > osver := $(shell uname -r)
> > cpuarch := $(shell uname -m)
>
> Probably the fault is mine but I can't get this to do anything useful in
> Cygwin. You could try (something like):
>
> case `uname` in
> *CYGWIN*)
> OS=Cygwin
> ;;
> *Darwin*)
> OS=Darwin
> ;;
> *)
> OS=Linux
> ;;
> esac
>
> and then try things like
>
> if [ ${OS} == "Linux" ]
> then
> ..
> fi
That looks like shell to me. I thought the OP was asking for
something to use in a Makefile.
--
Grant Edwards grante Yow! MERYL STREEP is my
at obstetrician!
visi.com
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/