Commit 802d2dd2 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

Build: check if specified external image exists



check_* targets check if the required option are given, but do not
check the validity of the argument.  If the specified file does not
exist, let the build fail immediately instead of passing the invalid
file path to tools.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 334e1ceb
# #
# Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. # Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
...@@ -132,6 +132,7 @@ define FIP_ADD_IMG ...@@ -132,6 +132,7 @@ define FIP_ADD_IMG
.PHONY: check_$(1) .PHONY: check_$(1)
check_$(1): check_$(1):
$$(if $(value $(1)),,$$(error "Platform '${PLAT}' requires $(1). Please set $(1) to point to the right file")) $$(if $(value $(1)),,$$(error "Platform '${PLAT}' requires $(1). Please set $(1) to point to the right file"))
$$(if $(wildcard $(value $(1))),,$$(error '$(1)=$(value $(1))' was specified, but '$(value $(1))' does not exist))
endef endef
# FWU_FIP_ADD_PAYLOAD appends the command line arguments required by fiptool # FWU_FIP_ADD_PAYLOAD appends the command line arguments required by fiptool
...@@ -166,6 +167,7 @@ define FWU_FIP_ADD_IMG ...@@ -166,6 +167,7 @@ define FWU_FIP_ADD_IMG
.PHONY: check_$(1) .PHONY: check_$(1)
check_$(1): check_$(1):
$$(if $(value $(1)),,$$(error "Platform '${PLAT}' requires $(1). Please set $(1) to point to the right file")) $$(if $(value $(1)),,$$(error "Platform '${PLAT}' requires $(1). Please set $(1) to point to the right file"))
$$(if $(wildcard $(value $(1))),,$$(error '$(1)=$(value $(1))' was specified, but '$(value $(1))' does not exist))
endef endef
################################################################################ ################################################################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment