From e952b9017fab97d0ff480102c569272ff5f56d27 Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Tue, 22 Nov 2022 14:42:13 +0800 Subject: Makefile: Fix missing utilities for 'make all' The default make target 'all' should depend on either ${UTIL_FILES_SDK} or ${UTIL_FILES_BOARD}. However, these variables are defined after the 'all' rule, so they actually evaluate to empty strings. This causes the utility files such as 'crossystem' to be missing. The bug was introduced by CL:3299836. Fortunately, these files are also dependencies of the 'install' target. Therefore this bug doesn't lead to any problem for the vboot_reference package, because the utilities will be built in src_install(). BUG=none TEST=make clean && make all -j8 && make install DESTDIR=./install TEST=make run2tests -j BRANCH=none Change-Id: I0abb320e38f17fead373ba44521f3db5346add65 Signed-off-by: Yu-Ping Wu Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4045570 Reviewed-by: Hsuan Ting Chen --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9cfe65be..129ace99 100644 --- a/Makefile +++ b/Makefile @@ -307,8 +307,7 @@ SRC_RUN = $(subst ${SYSROOT},,${SRCDIR}) # Default target. .PHONY: all -all: fwlib futil utillib hostlib cgpt tlcl \ - $(if ${SDK_BUILD},${UTIL_FILES_SDK},${UTIL_FILES_BOARD}) \ +all: fwlib futil utillib hostlib cgpt tlcl util_files \ $(if $(filter x86_64,${ARCH}),$(if $(filter clang,${CC}),fuzzers)) \ $(if $(filter-out 0,${COV}),coverage) @@ -997,6 +996,9 @@ cgpt_wrapper_install: cgpt_install ${CGPT_WRAPPER} # ---------------------------------------------------------------------------- # Utilities +.PHONY: util_files +util_files: $(if ${SDK_BUILD},${UTIL_FILES_SDK},${UTIL_FILES_BOARD}) + # These have their own headers too. ${BUILD}/utility/%: INCLUDES += -Iutility/include -- cgit v1.2.1