diff options
author | Michael Niewöhner <foss@mniewoehner.de> | 2020-09-06 17:06:40 +0200 |
---|---|---|
committer | Michael Niewöhner <foss@mniewoehner.de> | 2020-09-23 09:01:04 +0000 |
commit | eb66233b5cd4ea83ccebfcbc9814f74715802960 (patch) | |
tree | 88efded5d07a6f1e953869a0af9b8c2fba1e9a72 /src/lib | |
parent | 87cc889e8b144b36555eff502f69ef296b99da92 (diff) |
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')
-rw-r--r-- | src/lib/Makefile.inc | 4 |
1 files changed, 4 insertions, 0 deletions
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); \ |