Corresponding blog post: http://neugierig.org/software/blog/2022/03/n2.html
Instead of relying on modification-time comparisons between dependency and target output, use hashes of the relevant "ingredients" of building a target (cmdline, arguments, meta-data about input files etc.).