Good question. It's not a concern of walk(1) itself, since it's impossible to generalize for every use case. walk(1) _always_ executes the target, but the target itself can decide whether it actually needs to do work.
For a C project, you would just do something like this: https://github.com/ejholmes/walk/blob/master/test/111-compil....
That's a trivial example using mtime. You could replace it with a hash function if you wanted.
That's a trivial example using mtime. You could replace it with a hash function if you wanted.