Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
fiptool: Do not call 'make clean' in 'all' target
Browse files Browse the repository at this point in the history
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 <pali@kernel.org>
Change-Id: I70e7fd2b04b02f6a0650c82df91d58c9a4cb24d9
  • Loading branch information
pali committed Apr 7, 2021
1 parent 9ad1031 commit dbeab0d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tools/fiptool/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@"
Expand Down

0 comments on commit dbeab0d

Please sign in to comment.