arm-trusted-firmware/make_helpers
Pali Rohár 4727fd1320 Makefile: Fix ${FIP_NAME} to be rebuilt only when needed
Currently ${FIP_DEPS} as prerequisite for ${BUILD_PLAT}/${FIP_NAME}
contains .PHONY targets check_$(1) and therefore ${BUILD_PLAT}/${FIP_NAME}
is always rebuilt even when other file target prerequisites are not
changed.

These changes fix above issue and ${BUILD_PLAT}/${FIP_NAME} target is
rebuilt only when its prerequisites are changed.

There are 3 changes:

Content of check_$(1) target is moved into check_$(1)_cmd variable so it
can be easily reused.

.PHONY check_$(1) targets are not put into ${FIP_DEPS} and ${FWU_FIP_DEPS}
dependencies anymore and required checks which are in ${CHECK_FIP_CMD} and
${CHECK_FWU_FIP_CMD} variables are executed as part of targets
${BUILD_PLAT}/${FIP_NAME} and ${BUILD_PLAT}/${FWU_FIP_NAME} itself.

To ensure that ${BUILD_PLAT}/${FIP_NAME} and ${BUILD_PLAT}/${FWU_FIP_NAME}
are rebuilt even when additional dependency file image added by
TOOL_ADD_IMG is changed, this file image (if exists) is added as file
dependency to ${FIP_DEPS} and ${FWU_FIP_DEPS}. If it does not exist then
FORCE target is added to ensure that FIP/FWU_FIP is rebuilt. Command
${CHECK_FIP_CMD}/${CHECK_FWU_FIP_CMD} will then thrown an error message if
the file is required but not present.

So this change ensures that if BL33 image is updated then final FIP image
is updated too. And if BL33 image is not specified or does not exist and is
required to be present then check_$(1)_cmd call from ${CHECK_FIP_CMD} would
ensure that error message is thrown during build.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: I635cf82e2b667ff57e2af83500d4aca71d235e3e
2021-01-08 11:20:53 +01:00
..
tbbr make_helpers: tbbr: Fix FWU certificate generation 2020-11-09 08:51:10 +00:00
armv7-a-cpus.mk build_macros.mk: include assert and define loop macros 2020-09-14 09:27:53 -05:00
build_env.mk Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
build_macros.mk Makefile: Fix ${FIP_NAME} to be rebuilt only when needed 2021-01-08 11:20:53 +01:00
cygwin.mk Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
defaults.mk Merge "Add support for FEAT_MTPMU for Armv8.6" into integration 2020-12-15 19:33:40 +00:00
msys.mk Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
plat_helpers.mk Change PLATFORM_ROOT to TF_PLATFORM_ROOT 2018-03-05 14:18:04 +08:00
unix.mk Makefile: Fix verbose builds on Windows 2018-10-19 15:54:27 +01:00
windows.mk Update makefile to build fiptool for Windows 2020-09-14 15:06:56 +01:00