Skip to content

Commit 7ec22ab

Browse files
committed
Merge pull request #376 from dawgfoto/cleanupMakefile
cleanup OS detection
2 parents 70f48c6 + 52b6104 commit 7ec22ab

File tree

1 file changed

+21
-26
lines changed

1 file changed

+21
-26
lines changed

posix.mak

+21-26
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,28 @@
33
# pkg_add -r gmake
44
# and then run as gmake rather than make.
55

6+
OS:=
7+
uname_S:=$(shell uname -s)
8+
ifeq (Darwin,$(uname_S))
9+
OS:=osx
10+
endif
11+
ifeq (Linux,$(uname_S))
12+
OS:=linux
13+
endif
14+
ifeq (FreeBSD,$(uname_S))
15+
OS:=freebsd
16+
endif
17+
ifeq (OpenBSD,$(uname_S))
18+
OS:=openbsd
19+
endif
20+
ifeq (Solaris,$(uname_S))
21+
OS:=solaris
22+
endif
23+
ifeq (SunOS,$(uname_S))
24+
OS:=solaris
25+
endif
626
ifeq (,$(OS))
7-
OS:=$(shell uname)
8-
ifeq (Darwin,$(OS))
9-
OS:=osx
10-
else
11-
ifeq (Linux,$(OS))
12-
OS:=linux
13-
else
14-
ifeq (FreeBSD,$(OS))
15-
OS:=freebsd
16-
else
17-
ifeq (OpenBSD,$(OS))
18-
TARGET=OPENBSD
19-
else
20-
ifeq (Solaris,$(OS))
21-
TARGET=SOLARIS
22-
else
23-
ifeq (SunOS,$(OS))
24-
TARGET=SOLARIS
25-
else
26-
$(error Unrecognized or unsupported OS for uname: $(OS))
27-
endif
28-
endif
29-
endif
30-
endif
31-
endif
32-
endif
27+
$(error Unrecognized or unsupported OS for uname: $(uname_S))
3328
endif
3429

3530
DMD?=dmd

0 commit comments

Comments
 (0)