Fix problem of dependencies on the fiptool makefile target
authorSandrine Bailleux <sandrine.bailleux@arm.com>
Mon, 27 Oct 2014 17:10:46 +0000 (17:10 +0000)
committerSandrine Bailleux <sandrine.bailleux@arm.com>
Wed, 26 Nov 2014 10:13:08 +0000 (10:13 +0000)
The 'fiptool' target doesn't depend on fip_create's source files,
neither directly nor indirectly. As a result, the FIP tool is not
rebuilt whenever its source files change.

This patch makes the ${FIPTOOL} target into a phony target so that the
FIP tool's sub-makefile is always called. The sub-makefile correctly
handles the dependencies. It also moves the completion message into
the sub-makefile so that it is only displayed when the tool is
actually recompiled.

Fixes ARM-software/tf-issues#278

Change-Id: Ia027519fe51d3c42be30665d1ad20a7b89fa350f

Makefile
tools/fip_create/Makefile

index 9b15c213e8446a2cc14b3ef228ba9a23cdcf4c8e..8979f7f8b52afa5f7dfed78ff6d982273a64c242 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -290,11 +290,9 @@ checkpatch:                locate-checkpatch
                        @echo "  CHECKING STYLE"
                        @git format-patch --stdout ${BASE_COMMIT} | ${CHECKPATCH} ${CHECKPATCH_ARGS} - || true
 
+.PHONY: ${FIPTOOL}
 ${FIPTOOL}:
                        ${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH}
-                       @echo
-                       @echo "Built $@ successfully"
-                       @echo
 
 define match_goals
 $(strip $(foreach goal,$(1),$(filter $(goal),$(MAKECMDGOALS))))
index 69569a1b2f679c146141569e430d19073ed18728..c72bae535ae87db17ab9d94d89243308e81b182a 100644 (file)
@@ -52,6 +52,9 @@ all: ${PROJECT}
 ${PROJECT}: ${OBJECTS} Makefile
        @echo "  LD      $@"
        ${Q}${CC} ${OBJECTS} -o $@
+       @echo
+       @echo "Built $@ successfully"
+       @echo
 
 %.o: %.c %.h Makefile
        @echo "  CC      $<"