When building the Cactus secure partition, a DTB file is generated as part of the normal build process.
```
> make distclean
> make cactus
CC spm/cactus/cactus_main.c
[...snip...]
DTBGEN spm/cactus/cactus.dts
Built build/fvp/release/cactus.dtb successfully
[...snip...]
```
When attempting to rebuild cactus straight away, one would expect that the build system would do nothing, because no file was changed in between. However, the DTB file is incorrectly rebuilt:
```
> make cactus
DTBGEN spm/cactus/cactus.dts
Built build/fvp/release/cactus.dtb successfully
```
If attempting to build Cactus a 3rd time, this behaves as expected:
```
> make cactus
make: Nothing to be done for 'cactus'.
```
This seems to be down to the way the `cactus.mk` makefile is written. The build directory being updated after the DTB file generation triggers the 2nd incorrect rebuild. See the discussion in Gerrit around [[ https://review.trustedfirmware.org/#/c/TF-A/tf-a-tests/+/410/ | the patch ]] that introduced the issue.