summaryrefslogtreecommitdiffstats
path: root/src/lib/Makefile.inc
diff options
context:
space:
mode:
authorMichael Niewöhner <foss@mniewoehner.de>2020-09-06 17:06:40 +0200
committerMichael Niewöhner <foss@mniewoehner.de>2020-09-23 09:01:04 +0000
commiteb66233b5cd4ea83ccebfcbc9814f74715802960 (patch)
tree88efded5d07a6f1e953869a0af9b8c2fba1e9a72 /src/lib/Makefile.inc
parent87cc889e8b144b36555eff502f69ef296b99da92 (diff)
downloadcoreboot-eb66233b5cd4ea83ccebfcbc9814f74715802960.tar.gz
coreboot-eb66233b5cd4ea83ccebfcbc9814f74715802960.tar.bz2
coreboot-eb66233b5cd4ea83ccebfcbc9814f74715802960.zip
lib/Makefile.inc: fail build when SPD would be empty
Add a check to be sure that at least one SPD file will be added and fail the build when the resulting spd.bin would be empty. Change-Id: Ic6db1dbe5fed5f242e408bcad4f36dda1b1fa1b4 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45131 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/lib/Makefile.inc')
-rw-r--r--src/lib/Makefile.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index 6829578800e9..62f10be2ead4 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -357,6 +357,10 @@ LIB_SPD_DEPS = $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(
# Include spd ROM data
$(LIB_SPD_BIN): $(LIB_SPD_DEPS)
+ test -n "$(SPD_SOURCES)" || \
+ (echo "HAVE_SPD_BIN_IN_CBFS is set but SPD_SOURCES is empty" && exit 1)
+ test -n "$(LIB_SPD_DEPS)" || \
+ (echo "SPD_SOURCES is set but no SPD file was found" && exit 1)
for f in $(LIB_SPD_DEPS); \
do for c in $$(cat $$f | grep --binary-files=text -v ^#); \
do printf $$(printf '\\%o' 0x$$c); \