diff --git a/Makefile b/Makefile index 5806729cef64e37b4676c1f78e3425661d1590a7..26500ffc5eabeb08a219a3ed52495a0ae8776efd 100644 --- a/Makefile +++ b/Makefile @@ -128,6 +128,10 @@ _all: # Cancel implicit rules on top Makefile $(CURDIR)/Makefile Makefile: ; +ifneq ($(words $(subst :, ,$(CURDIR))), 1) + $(error main directory cannot contain spaces nor colons) +endif + ifneq ($(KBUILD_OUTPUT),) # Invoke a second make in the output directory, passing relevant variables # check that the output directory actually exists