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 b/Makefile
index ec4537f..9ca9d79 100644
--- a/Makefile
+++ b/Makefile
@@ -961,8 +961,16 @@
echo "You have to enable at least one programmer driver!"; \
exit 1; \
fi
+ @$(foreach dep,$(MISSING_DEPENDENCY), \
+ printf "The following features require $(dep): "; \
+ printf "$(MISSING_DEPENDENCY_$(dep))\n"; \
+ printf $(MISSING_DEPENDENCY_NOTE_$(dep));)
@if [ "$(UNSUPPORTED_FEATURES)" ]; then \
echo "The following features are unavailable on your machine: $(UNSUPPORTED_FEATURES)"; \
+ fi
+ @if [ "$(MISSING_DEPENDENCY)" -o "$(UNSUPPORTED_FEATURES)" ]; then \
+ printf "You can disable individual features with "; \
+ printf "CONFIG_feature=no in your make command.\n"; \
exit 1; \
fi