From eb66233b5cd4ea83ccebfcbc9814f74715802960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Niew=C3=B6hner?= Date: Sun, 6 Sep 2020 17:06:40 +0200 Subject: lib/Makefile.inc: fail build when SPD would be empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45131 Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/lib/Makefile.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 6829578800..62f10be2ea 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); \ -- cgit v1.2.3