Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
cleanup OS detection
Browse files Browse the repository at this point in the history
- the wrong variable was set for OpenBSD and Solaris
  • Loading branch information
MartinNowak committed Jan 11, 2013
1 parent f5ba691 commit 52b6104
Showing 1 changed file with 21 additions and 26 deletions.
47 changes: 21 additions & 26 deletions posix.mak
Expand Up @@ -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
Expand Down

0 comments on commit 52b6104

Please sign in to comment.