From 52b6104396baea962eaa3781aaa24c10672686e3 Mon Sep 17 00:00:00 2001 From: Martin Nowak Date: Fri, 11 Jan 2013 04:50:58 +0100 Subject: [PATCH] cleanup OS detection - the wrong variable was set for OpenBSD and Solaris --- posix.mak | 47 +++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/posix.mak b/posix.mak index 512a81eaa3..0052f21ab9 100644 --- a/posix.mak +++ b/posix.mak @@ -3,33 +3,28 @@ # pkg_add -r gmake # and then run as gmake rather than make. +OS:= +uname_S:=$(shell uname -s) +ifeq (Darwin,$(uname_S)) + OS:=osx +endif +ifeq (Linux,$(uname_S)) + OS:=linux +endif +ifeq (FreeBSD,$(uname_S)) + OS:=freebsd +endif +ifeq (OpenBSD,$(uname_S)) + OS:=openbsd +endif +ifeq (Solaris,$(uname_S)) + OS:=solaris +endif +ifeq (SunOS,$(uname_S)) + OS:=solaris +endif ifeq (,$(OS)) - OS:=$(shell uname) - ifeq (Darwin,$(OS)) - OS:=osx - else - ifeq (Linux,$(OS)) - OS:=linux - else - ifeq (FreeBSD,$(OS)) - OS:=freebsd - else - ifeq (OpenBSD,$(OS)) - TARGET=OPENBSD - else - ifeq (Solaris,$(OS)) - TARGET=SOLARIS - else - ifeq (SunOS,$(OS)) - TARGET=SOLARIS - else - $(error Unrecognized or unsupported OS for uname: $(OS)) - endif - endif - endif - endif - endif - endif + $(error Unrecognized or unsupported OS for uname: $(uname_S)) endif DMD?=dmd