From ff63106decc6ee78dacea8598dc048a6a4495832 Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Fri, 29 Sep 2023 17:35:22 +0000 Subject: util/amdfwtool: Check for pkg-config presence Check for pkg-config presence and fail out with actionable message. BUG=b:302521446 TEST=Build successfully with working pkg-config and failed build with no pkg-config Change-Id: I5d604145c919e7f71680d1e095dc68cb21868319 Signed-off-by: Karthikeyan Ramasubramanian Reviewed-on: https://review.coreboot.org/c/coreboot/+/78191 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel --- util/amdfwtool/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'util/amdfwtool/Makefile') diff --git a/util/amdfwtool/Makefile b/util/amdfwtool/Makefile index e9bc1ab761..9392f02fed 100644 --- a/util/amdfwtool/Makefile +++ b/util/amdfwtool/Makefile @@ -14,7 +14,7 @@ TOOL_OBJ = $(TOOL_SRC:%.c=%.o) HEADER=amdfwtool.h TARGETS = amdfwread amdfwtool WERROR=-Werror -CFLAGS=-O2 -Wall -Wextra -Wshadow ${WERROR} +CFLAGS :=-O2 -Wall -Wextra -Wshadow ${WERROR} CFLAGS += -I $(top)/src/commonlib/bsd/include CFLAGS += -D_GNU_SOURCE # memmem() from string.h @@ -24,6 +24,9 @@ else HOSTPKGCONFIG ?= pkg-config endif CFLAGS += $(shell $(HOSTPKGCONFIG) --cflags libcrypto) +ifneq ($(.SHELLSTATUS),0) +$(error "Ensure that pkg-config is installed.") +endif LDFLAGS += $(shell $(HOSTPKGCONFIG) --libs libcrypto) all: $(TARGETS) -- cgit v1.2.3