diff --git a/refpolicy/Rules.modular b/refpolicy/Rules.modular
index 450ee7c..9e90bb3 100644
--- a/refpolicy/Rules.modular
+++ b/refpolicy/Rules.modular
@@ -141,6 +141,10 @@ endif
 # Build module packages
 #
 tmp/%.mod: $(M4SUPPORT) tmp/generated_definitions.conf tmp/all_interfaces.conf %.te
+	@if test -z "$(filter $^,$(MOD_MODS))"; then \
+		echo "The $(notdir $(basename $@)) module is not configured to be compiled as a lodable module." ;\
+		false ;\
+	fi
 	@echo "Compliling $(NAME) $(@F) module"
 	$(QUIET) m4 $(M4PARAM) -s $^ > $(@:.mod=.tmp)
 	$(QUIET) $(CHECKMODULE) -m $(@:.mod=.tmp) -o $@