diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-11-14 12:37:39 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-11-14 14:48:30 +0100 |
commit | 31043704558efdeb25e2be9b03f211513047c635 (patch) | |
tree | b1452b6136ed3956914be2e09a4d3784075c0afa | |
parent | 0fd214d89fa970b967c1aaf5613f145c869db2b1 (diff) | |
download | upstream-31043704558efdeb25e2be9b03f211513047c635.tar.gz upstream-31043704558efdeb25e2be9b03f211513047c635.tar.bz2 upstream-31043704558efdeb25e2be9b03f211513047c635.zip |
build: detect broken make version on macOS
Apple ships a broken make version with the Xcode command line tools.
Homebrew installs make as gmake by default in order to not collide with
Apple's version.
Exit with an error if the broken one is used accidentally
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | include/toplevel.mk | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/toplevel.mk b/include/toplevel.mk index c233a4c214..4003b48241 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -29,6 +29,12 @@ export GNU_HOST_NAME:=$(shell $(TOPDIR)/scripts/config.guess) export HOST_OS:=$(shell uname) export HOST_ARCH:=$(shell uname -m) +ifeq ($(HOST_OS),Darwin) + ifneq ($(filter /Applications/Xcode.app/% /Library/Developer/%,$(MAKE)),) + $(error Please use a newer version of GNU make. The version shipped by Apple is not supported) + endif +endif + # prevent perforce from messing with the patch utility unexport P4PORT P4USER P4CONFIG P4CLIENT |