diff --git a/Makefile b/Makefile index f6350317..5f4f24f6 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,12 @@ +ifeq ($(origin MAKE_VERSION),undefined) + $(error GNU make >= 4 is required. MAKE_VERSION is undefined, so GNU make may not be installed or in use. Run 'make --version' to verify.) +endif + +MAKE_MAJOR := $(firstword $(subst ., ,$(MAKE_VERSION))) +ifneq ($(filter 0 1 2 3,$(MAKE_MAJOR)),) + $(error GNU make >= 4 is required. Found version $(MAKE_VERSION). Run 'make --version' to check your current version.) +endif + .PHONY: all configure pkgs pre-stow quick stow MKFILE_PATH := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))