www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/01/12/12:49:56

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_20,J_CHICKENPOX_25,J_CHICKENPOX_26
X-Spam-Check-By: sourceware.org
Message-ID: <496B828A.3010006@bonhard.uklinux.net>
Date: Mon, 12 Jan 2009 17:48:58 +0000
From: Fergus <fergus AT bonhard DOT uklinux DOT net>
User-Agent: Thunderbird 2.0.0.18 (Windows/20081105)
MIME-Version: 1.0
To: Cygwin ML <cygwin AT cygwin DOT com>
CC: Fergus <fergus AT bonhard DOT uklinux DOT net>
Subject: Re: Reliably check if we're running under cygwin inside Makefile
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Note-from-DJ: This may be spam

 > 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

Fergus



--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019