Skip to content

Commit

Permalink
make: change macOS host detection
Browse files Browse the repository at this point in the history
Use `$(MAKE_HOST)` variable instead of uname.
  • Loading branch information
benoit-pierre authored and Frenzie committed Jul 15, 2024
1 parent 23cecf2 commit f925273
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Makefile.defs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ else
CCACHE := $(or $(CCACHE),$(shell command -v ccache))
endif

UNAME:=$(shell uname -s)
UNAME_ARCH:=$(shell uname -m)

# Should point at the actual directory in which *this* makefile resides, as opposed to $(CURDIR),
# which is simply $PWD *at the time of the original make call*, which is not necessarily the same thing.
# NOTE: Will only behave as long as there aren't any spaces in the paths involved!
Expand Down Expand Up @@ -237,9 +234,9 @@ else
$(error Invalid TARGET: "$(TARGET)")
endif

ifneq (,$(filter $(UNAME), Darwin))
ifneq (,$(findstring darwin,$(MAKE_HOST)))
DARWINHOST=1
ifneq (,$(filter $(UNAME_ARCH), arm64))
ifneq (,$(findstring aarch64,$(MAKE_HOST)))
DARWIN_AARCH64_HOST=1
endif
ifdef EMULATE_READER
Expand Down

0 comments on commit f925273

Please sign in to comment.