aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2018-08-13 15:19:23 +0200
committerJérôme Forissier <jerome.forissier@linaro.org>2018-08-13 18:03:57 +0200
commit8452bf4e34e0e6a25461ad66bfe81852fbb6e253 (patch)
treec1be96b3414a91b83419adcd6cb2a3e61993a7e1
parent066be2bcfb0226c6b8e04258ac9ae10967f4e613 (diff)
Do not make in-tree TAs depend on a phony target
Commit cf903a62bc12 ("Add dependency on ta-dev-kit when building in-tree TA") introduces a dependency of the in-tree TA object files on the phony target 'ta_dev_kit'. The purpose was to make sure the dev kit files are available when make starts building the TA. Unfortunately, this introduces useless recompilation (the lines marked with >): $ make -s && make CHK out/arm-plat-vexpress/conf.mk CHK out/arm-plat-vexpress/include/generated/conf.h CHK out/arm-plat-vexpress/conf.cmake CHK out/arm-plat-vexpress/export-ta_arm32/mk/conf.mk > CC out/arm-plat-vexpress/ta/avb/entry.o > CC out/arm-plat-vexpress/ta/avb/user_ta_header.o > CPP out/arm-plat-vexpress/ta/avb/ta.lds > LD out/arm-plat-vexpress/ta/avb/023f8f1a-292a-432b-8fc4-de8471358067.elf > OBJDUMP out/arm-plat-vexpress/ta/avb/023f8f1a-292a-432b-8fc4-de8471358067.dmp > OBJCOPY out/arm-plat-vexpress/ta/avb/023f8f1a-292a-432b-8fc4-de8471358067.stripped.elf > SIGN out/arm-plat-vexpress/ta/avb/023f8f1a-292a-432b-8fc4-de8471358067.ta This happens because phony targets are always considered new by the make program, so they'd rather not be used as dependencies. Instead, replace 'ta-dev-kit' by the actual list of all the files in the TA dev kit. Then, the second make invocation will not rebuild anything: $ make -s && make CHK out/arm-plat-vexpress/conf.mk CHK out/arm-plat-vexpress/include/generated/conf.h CHK out/arm-plat-vexpress/conf.cmake CHK out/arm-plat-vexpress/export-ta_arm32/mk/conf.mk Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
-rw-r--r--ta/mk/build-user-ta.mk2
-rw-r--r--ta/ta.mk1
2 files changed, 2 insertions, 1 deletions
diff --git a/ta/mk/build-user-ta.mk b/ta/mk/build-user-ta.mk
index 9a3d7145..6c028e2f 100644
--- a/ta/mk/build-user-ta.mk
+++ b/ta/mk/build-user-ta.mk
@@ -37,6 +37,6 @@ include mk/subdir.mk
spec-out-dir := $(link-out-dir$(sm))
spec-srcs += $(ta-dev-kit-dir$(sm))/src/user_ta_header.c
-additional-compile-deps := ta_dev_kit # TA dev kit should be built before in-tree TAs
+additional-compile-deps := $(ta_dev_kit-files) # TA dev kit should be built before in-tree TAs
include mk/compile.mk
include ta/arch/$(ARCH)/link.mk
diff --git a/ta/ta.mk b/ta/ta.mk
index 84659061..6b452ba0 100644
--- a/ta/ta.mk
+++ b/ta/ta.mk
@@ -89,6 +89,7 @@ $2/$$(notdir $1): $1
cleanfiles += $2/$$(notdir $1)
ta_dev_kit: $2/$$(notdir $1)
+ta_dev_kit-files += $2/$$(notdir $1)
endef
# Copy the .a files