Makefile: Add infrastructure to handle missing dependencies

Add a macro `mark_missing_dep` to gather information about missing
dependencies for selected (default or explicit) features. If anything
is tagged as missing, we print an error message and bail out.

This should make sure that we don't miss anything when building
releases. It comes with a slight inconvenience for casual builds:
One has to disable the affected features manually. This should be
handled better with Meson which discerns release builds by default.

Change-Id: I7a816de20df4313985d7d270c08be1871616ea41
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/73445
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/Makefile.include b/Makefile.include
index 61dc982..aa4a3d1 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -20,6 +20,15 @@
 		$(eval override $(p) := no)))
 endef
 
+define mark_missing_dep
+$(foreach p,$2, \
+	$(if $(filter $($(p)),yes), \
+		$(eval MISSING_DEPENDENCY += $(1)) \
+		$(eval MISSING_DEPENDENCY_$(1) += $(p)=yes)))
+$(eval MISSING_DEPENDENCY := $(sort $(MISSING_DEPENDENCY)))
+$(eval MISSING_DEPENDENCY_NOTE_$(1) := $(if $(3),$(3),""))
+endef
+
 define filter_deps
 $(strip $(foreach p,$1, \
 	$(if $(filter $($(p)),yes), \