From dbeab0da963de2efd82ca748e6d3a112e54e49e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Thu, 25 Mar 2021 16:08:09 +0100 Subject: [PATCH] fiptool: Do not call 'make clean' in 'all' target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Calling 'make clean' in 'all' target is causing recompilation of binary at every 'make' call, which is wrong. Also building a new target via 'make TARGET' can cause infinite loop as it is not defined as explicit make dependency. Dependent targets must be specified after colon when defining target, which also prevents infinite loops as make is able to detect these circular dependencies. Moreover calling 'make clean' is supposed to be done by user when configuration is changing. So remove calling 'make clean' in 'all' target and define dependency for '${PROJECT}' at correct place. Signed-off-by: Pali Rohár Change-Id: I70e7fd2b04b02f6a0650c82df91d58c9a4cb24d9 --- tools/fiptool/Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/fiptool/Makefile b/tools/fiptool/Makefile index b75907de0..11d2e7b0b 100644 --- a/tools/fiptool/Makefile +++ b/tools/fiptool/Makefile @@ -44,11 +44,7 @@ endif .PHONY: all clean distclean -# Clean before build as old fiptool might be created with -# including different PLAT_FIPTOOL_HELPER_MK. -all: - ${MAKE} clean - ${MAKE} ${PROJECT} +all: ${PROJECT} ${PROJECT}: ${OBJECTS} Makefile @echo " HOSTLD $@"