Comment

Comment by adekok

Tup's main problem is it's unusual, and it doesn't have a library of build rules. But it's fast!

On a related note, I've always wondered if it was possible to have a build system based on dynamic library injection / strace.

The idea would be that you just write your build rules in shell script. Then, you run it with a special shell that catches open(), etc. in child processes (via library injection, etc). These system calls get tracked, and stored in a special build table. One that you don't have to edit.

Then, when you want to run the build again, you just re-run the magic shell. It catches the various commands, and checks their inputs / outputs, and then skips running the command if the targets are up to date.

e.g.

  $(CC) -c foo.c -o foo.o
Hmm... "foo.o" is up to date with "foo.c", so I don't need to run the compiler. I just return "success!"

That would get rid of all magic build systems. All build syntax. All dependency ordering. The build system would just take care of it itself.

I've played with this before, enough to note that it's likely possible. But I haven't got far enough to publish it.

parent adekok 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton