makefiles/suit: avoid unwanted key creation trigger #18344
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
This fixes a trigger of re-creation of an already existing SUIT
key when combining a build target with the clean target, e.g.
make clean all
.Testing procedure
Without the changes of this PR
make -j
in${RIOTBASE}/examples/suit_update
will build & conditionally create a key in${RIOTBASE}/keys/default.pem
if none is there.Running
make clean
will leave the key in place.Re-running
make -j
will reuse the existing key.Running
make -j clean all
will try to re-create a key in the location although it exists. The process will fail because the key generator checks for an existing key. However, it should not even be executed.With the changes of this PR
Making the dependency on
CLEAN
order-only will avoid attempting to re-create a key when there is already one.make -j clean all
does not touch an existing key runs the clean build without error.Issues/PRs references
None.