News for hackers. Stuff that matters.
Re:Afraid of Makefiles? Don't be by sorbits on Friday August 18, 2017 @07:17AM (#15045170)
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?

Re:Afraid of Makefiles? Don't be by ejholmes on Friday August 18, 2017 @07:58AM (#15045360)
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.