mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
GNUMakefile: fix compilation on Macs
Previously, attempting to compile on Macs would bring in the SELinux dependencies (runcon) which led to compilation errors on Macs. Fixes #7695.
This commit is contained in:
parent
d6de30eef1
commit
2408bd6b36
1 changed files with 14 additions and 0 deletions
14
GNUmakefile
14
GNUmakefile
|
@ -57,6 +57,13 @@ TOYBOX_ROOT := $(BASEDIR)/tmp
|
|||
TOYBOX_VER := 0.8.12
|
||||
TOYBOX_SRC := $(TOYBOX_ROOT)/toybox-$(TOYBOX_VER)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Detect the host system.
|
||||
# On Windows the environment already sets OS = Windows_NT.
|
||||
# Otherwise let it default to the kernel name returned by uname -s
|
||||
# (Linux, Darwin, FreeBSD, …).
|
||||
#------------------------------------------------------------------------
|
||||
OS ?= $(shell uname -s)
|
||||
|
||||
ifdef SELINUX_ENABLED
|
||||
override SELINUX_ENABLED := 0
|
||||
|
@ -180,6 +187,13 @@ SELINUX_PROGS := \
|
|||
chcon \
|
||||
runcon
|
||||
|
||||
$(info Detected OS = $(OS))
|
||||
|
||||
# Don't build the SELinux programs on macOS (Darwin)
|
||||
ifeq ($(OS),Darwin)
|
||||
SELINUX_PROGS :=
|
||||
endif
|
||||
|
||||
ifneq ($(OS),Windows_NT)
|
||||
PROGS := $(PROGS) $(UNIX_PROGS)
|
||||
# Build the selinux command even if not on the system
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue