File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,13 @@ TOYBOX_ROOT := $(BASEDIR)/tmp
57
57
TOYBOX_VER := 0.8.12
58
58
TOYBOX_SRC := $(TOYBOX_ROOT ) /toybox-$(TOYBOX_VER )
59
59
60
+ # ------------------------------------------------------------------------
61
+ # Detect the host system.
62
+ # On Windows the environment already sets OS = Windows_NT.
63
+ # Otherwise let it default to the kernel name returned by uname -s
64
+ # (Linux, Darwin, FreeBSD, …).
65
+ # ------------------------------------------------------------------------
66
+ OS ?= $(shell uname -s)
60
67
61
68
ifdef SELINUX_ENABLED
62
69
override SELINUX_ENABLED := 0
@@ -179,6 +186,13 @@ SELINUX_PROGS := \
179
186
chcon \
180
187
runcon
181
188
189
+ $(info Detected OS = $(OS))
190
+
191
+ # Don't build the SELinux programs on macOS (Darwin)
192
+ ifeq ($(OS ) ,Darwin)
193
+ SELINUX_PROGS :=
194
+ endif
195
+
182
196
ifneq ($(OS ) ,Windows_NT)
183
197
PROGS := $(PROGS) $(UNIX_PROGS)
184
198
# Build the selinux command even if not on the system
You can’t perform that action at this time.
0 commit comments