Searched hist:cba8ca1c37cbc93ec5d624c3ab7bafbe91a8f187 (Results 1 – 1 of 1) sorted by relevance
| /optee_os/mk/ |
| H A D | subdir.mk | cba8ca1c37cbc93ec5d624c3ab7bafbe91a8f187 Fri Sep 13 16:01:48 UTC 2019 Jerome Forissier <jerome@forissier.org> build: prevent produce-* from being forced built before current submodule
Problem:
$ make -s out/arm-plat-vexpress/core/mm/fobj.o $ rm out/arm-plat-vexpress/ldelf/ldelf.elf $ rm out/arm-plat-vexpress/core/mm/fobj.o $ make out/arm-plat-vexpress/core/mm/fobj.o CHK out/arm-plat-vexpress/conf.mk CHK out/arm-plat-vexpress/include/generated/conf.h LD out/arm-plat-vexpress/ldelf/ldelf.elf GEN out/arm-plat-vexpress/core/ldelf_hex.c CC out/arm-plat-vexpress/core/mm/fobj.o
Why would fobj.o depend on ldelf.elf and ldelf_hex.c? Answer is: it shouldn't. This behavior is caused by FORCE-GENSRC$(sm) depending on all the produce-<something> targets. In fact, such a dependency is rarely needed. It makes sense for include files for instance; but certainly not for C source files which are pulled in the build by other means.
This patch introduces force-gensrc-<something> to prevent the generated file $(produce-<something>) from being added to FORCE-GENSRC$(sm) unless $(force-gensrcs-<something>) is "y". The test case above works as expected:
$ make -s out/arm-plat-vexpress/core/mm/fobj.o $ rm out/arm-plat-vexpress/ldelf/ldelf.elf $ rm out/arm-plat-vexpress/core/mm/fobj.o $ make out/arm-plat-vexpress/core/mm/fobj.o CHK out/arm-plat-vexpress/conf.mk CHK out/arm-plat-vexpress/include/generated/conf.h CC out/arm-plat-vexpress/core/mm/fobj.o
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
|