mirror of
https://github.com/dlang/phobos.git
synced 2025-05-05 01:20:40 +03:00
cleanup OS detection
- the wrong variable was set for OpenBSD and Solaris
This commit is contained in:
parent
bfb6d3d2f3
commit
39999fb8f9
1 changed files with 21 additions and 26 deletions
47
posix.mak
47
posix.mak
|
@ -22,33 +22,28 @@
|
||||||
# OS can be linux, win32, win32remote, win32wine, osx, or freebsd. If left
|
# OS can be linux, win32, win32remote, win32wine, osx, or freebsd. If left
|
||||||
# blank, the system will be determined by using uname
|
# blank, the system will be determined by using uname
|
||||||
|
|
||||||
|
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))
|
ifeq (,$(OS))
|
||||||
OS:=$(shell uname)
|
$(error Unrecognized or unsupported OS for uname: $(uname_S))
|
||||||
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
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# For now, 32 bit is the default model
|
# For now, 32 bit is the default model
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue