mcuboot.mk: Add mcuboot targets to BUILDDEPS.#10492
Conversation
|
I added the |
|
The test is not enough to show the issue with only the reference commits. I used this one instead: And with it this does not currently fix it. |
|
It really follows the big issue that variables should be defined first and rules after. |
|
@cladmi push the fix to my branch, |
makefiles/mcuboot.mk
Outdated
|
|
||
| export IMAGE_HDR_SIZE ?= 512 | ||
|
|
||
| BUILDDEPS += $(MCUBOOT_KEYFILE) $(MCUBOOT_BIN) mcuboot |
There was a problem hiding this comment.
However, we discussed it IRL, none of these files should be declared as BUILDDEPS they are not build dependencies, they just need to be done after clean if it is there.
The reason being that they are in the BINDIR directory that can be deleted.
I will propose a pre-first fix to go in the direction of adding this BINDIR variable and target.
|
After some more discussions and verification, putting a directory as target dependency forces rebuild whenever a file is put inside. The correct way is to declare it as order-only target. But order-only targets and clean at the same time cannot work properly, for good reasons. I added an updated commit message in the My tests commands were verifying the creation commands are indeed done after and |
7aa7eda to
221f719
Compare
|
Squashed and removed the test commits. |
|
The squashed message is wrong as it still references |
221f719 to
356a41b
Compare
|
I amended the commit message. |
|
Commit title still references |
356a41b to
46da35e
Compare
When doing `make -j clean all' the directories can be cleaned after files are made. To ensure files are created after clean, those targets are made conditionally dependent on the clean target. This copies the handling done in Makefile.include.
cladmi
left a comment
There was a problem hiding this comment.
ACK I re-tested the squashed version with #10461 and the test commands from #10492 (comment) and it is working as expected
You can merge when murdock is happy
Read this before reviewing
The first two commits are taken from #10461 and are not part of this PR. They are there just to force an error.
Contribution description
The mcuboot targets were not being added to BUILDDEPS and so the mcuboot targets was being made simultaneous with the clean. See the failed murdock output from #10461.
Testing procedure
In
tests/mcubootrunBUILD_IN_DOCKER=1 DOCKER="sudo docker" make clean allEDIT: the test command is running this merged with #10461
Issues/PRs references
This is one of the issues derived from #10459 .