From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11564 invoked by alias); 12 Jan 2009 20:10:56 -0000 Received: (qmail 11556 invoked by uid 22791); 12 Jan 2009 20:10:56 -0000 X-SWARE-Spam-Status: No, hits=-0.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_25,J_CHICKENPOX_26,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Jan 2009 20:10:19 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LMT73-0007vf-R6 for cygwin@cygwin.com; Mon, 12 Jan 2009 20:10:17 +0000 Received: from 64.251.14.41 ([64.251.14.41]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Jan 2009 20:10:17 +0000 Received: from grante by 64.251.14.41 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Jan 2009 20:10:17 +0000 To: cygwin@cygwin.com From: Grant Edwards Subject: Re: Reliably check if we're running under cygwin inside Makefile Date: Mon, 12 Jan 2009 21:52:00 -0000 Message-ID: References: <496B828A.3010006@bonhard.uklinux.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: slrn/pre0.9.9-102 (Linux) X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2009-01/txt/msg00331.txt.bz2 On 2009-01-12, Fergus 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/