I had my stint with build systems. Nx, Bazel to name a few. In the past I was always the go to guy to configure these stuffs.
OP said that ninja is small enough to be implemented in your favorite programming language. I wonder if there is step by step tutorial to create your own build system?