diff --git a/engine.mk b/engine.mk index e56d1b23f..66b36747d 100644 --- a/engine.mk +++ b/engine.mk @@ -165,6 +165,9 @@ BUILDID ?= # comment out or override if you want to see the full output of each command NOECHO ?= @ +# Any modules you want to explictly prevent from being used +DENY_MODULES := + # try to include the project file -include project/$(PROJECT).mk ifndef TARGET diff --git a/make/module.mk b/make/module.mk index 8a10712a9..bf7618052 100644 --- a/make/module.mk +++ b/make/module.mk @@ -46,6 +46,10 @@ $(error MODULE $(MODULE) is probably setting OBJS, change to MODULE_SRCS) endif endif +ifneq ($(filter $(MODULE),$(DENY_MODULES)),) +$(error MODULE $(MODULE) is not allowed by PROJECT $(PROJECT)'s DENY_MODULES list) +endif + MODULE_SRCDIR := $(MODULE) MODULE_BUILDDIR := $(call TOBUILDDIR,$(MODULE_SRCDIR))