This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Reliably check if we're running under cygwin inside Makefile


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]