summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2022-11-22 14:42:13 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-03-29 08:18:08 +0000
commit5cd73dd1b9dad1e80db82ee713d6112db72e99eb (patch)
tree6f41e9c23aa2595ab6edca2b7e73d69d9efaa515
parent8592409767d3dc33b22a0d40186a881648fefe18 (diff)
downloadvboot-5cd73dd1b9dad1e80db82ee713d6112db72e99eb.tar.gz
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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4045570 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4380924 Tested-by: Phoebe Wang <phoebewang@chromium.org> Auto-Submit: Phoebe Wang <phoebewang@chromium.org> Commit-Queue: Cheng Yueh <cyueh@chromium.org> Reviewed-by: Cheng Yueh <cyueh@chromium.org>
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
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