diff --git a/Makefile b/Makefile index a57bf3f75..f4616023d 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,21 @@ $(foreach var, $(SANITIZE_GCC_VARS), $(eval $(call SANITIZE_VAR,$(var),disallowe SANITIZE_DEPRECATED_VARS := USE_BOOTLOADER $(foreach var, $(SANITIZE_DEPRECATED_VARS), $(eval $(call SANITIZE_VAR,$(var),deprecated))) +# Deal with unreasonable requests +# See: http://xkcd.com/149/ +ifeq ($(MAKECMDGOALS),me a sandwich) + ifeq ($(shell whoami),root) + $(error Okay) + else + $(error What? Make it yourself) + endif +endif + +# Make sure this isn't being run as root +ifeq ($(shell whoami),root) +$(error You should not be running this as root) +endif + # Decide on a verbosity level based on the V= parameter export AT := @