File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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
@@ -180,6 +187,13 @@ SELINUX_PROGS := \
180187 chcon \
181188 runcon
182189
190+ $(info Detected OS = $(OS))
191+
192+ # Don't build the SELinux programs on macOS (Darwin)
193+ ifeq ($(OS ) ,Darwin)
194+ SELINUX_PROGS :=
195+ endif
196+
183197ifneq ($(OS ) ,Windows_NT)
184198 PROGS := $(PROGS) $(UNIX_PROGS)
185199# Build the selinux command even if not on the system
You can’t perform that action at this time.
0 commit comments