fix(arm): don't race on the build directory
Wait for it to have been created. This is the same issue as
commit db69d118294f08aae86378c98aa082ac73e15b73.
Change-Id: I32bd0c713e2837563d32131fb0beddb5533c0792
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
diff --git a/plat/arm/board/common/board_common.mk b/plat/arm/board/common/board_common.mk
index 889b8b3..3a6637f 100644
--- a/plat/arm/board/common/board_common.mk
+++ b/plat/arm/board/common/board_common.mk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2015-2025, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -148,14 +148,14 @@
$(BUILD_PLAT)/bl2/arm_dev_swd_rotpk.o: $(ARM_SWD_ROTPK)
endif
-$(ARM_PROTPK): $(ARM_PROT_KEY)
+$(ARM_PROTPK): $(ARM_PROT_KEY) | $$(@D)/
ifndef ARM_PROT_KEY
$(error Cannot generate hash: no PROT_KEY defined)
endif
${OPENSSL_BIN_PATH}/openssl ${CRYPTO_ALG} -in ${ARM_PROT_KEY} -pubout -outform DER | \
${OPENSSL_BIN_PATH}/openssl dgst -${HASH_ALG} -binary -out $@
-$(ARM_SWD_ROTPK): $(ARM_SWD_ROT_KEY)
+$(ARM_SWD_ROTPK): $(ARM_SWD_ROT_KEY) | $$(@D)/
ifndef ARM_SWD_ROT_KEY
$(error Cannot generate hash: no SWD_KEY defined)
endif