File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 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
5757TOYBOX_VER := 0.8.12
5858TOYBOX_SRC := $(TOYBOX_ROOT ) /toybox-$(TOYBOX_VER )
5959
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)
6067
6168ifdef SELINUX_ENABLED
6269 override SELINUX_ENABLED := 0
@@ -179,6 +186,13 @@ SELINUX_PROGS := \
179186 chcon \
180187 runcon
181188
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+
182196ifneq ($(OS ) ,Windows_NT)
183197 PROGS := $(PROGS) $(UNIX_PROGS)
184198# Build the selinux command even if not on the system
You can’t perform that action at this time.
0 commit comments