News for hackers. Stuff that matters.
Re:Tup – A file-based build system for Linux, OS X, and Windows by norswap on Sunday October 02, 2016 @12:23PM (#12623030)
Tup does this.

See here: http://gittup.org/tup/ex_a_first_tupfile.html

> The trick is that tup instruments all commands that it executes in order to determine what files were actually read from (the inputs) and written to (the outputs). When the C preprocessor opens the header file, tup will notice that and automatically add the dependency. In fact, we don't have to specify the C input file either, but you can leave that in there for now since we'll use it in the next section.

Re:Tup – A file-based build system for Linux, OS X, and Windows by iainmerrick on Sunday October 02, 2016 @04:16PM (#12624019)
Not really, although it's closer than other build systems. You can omit some dependencies but not all. If I remember right (I tried out tup a few months back) you still have to specify outputs, and there are some fiddly restrictions around writing files to other directories (although they were in the process of improving that).

Writing a tup build script doesn't really feel like just writing a shell script that does the thing you want. It's very cool technology and fun to play with, but I didn't find it fundamentally easier to use than other build systems.