3 ms·
Thanks for the clarifications. As for #1, what I do not understand is how a `Walkfile` allows me to use a content hash change to trigger a rebuild. Your docum
by sorbits 9y ago
Thanks for the clarifications.
As for #1, what I do not understand is how a `Walkfile` allows me to use a content hash change to trigger a rebuild.
Your documentation says that a file list should be returned for `deps`, so how does the `Walkfile` communicate that e.g. `main.o` should be updated if `sha1sum main.c` is different than on last invocation?
- ejholmes 9y agoGood 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-compile/Walkfile#L49 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.