Remix.run Logo
bakudanen 7 months ago

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?

emmanueloga_ 7 months ago | parent [-]

Short answer: write a ninja configuration generator instead.

> ... Where other build systems are high-level languages, Ninja aims to be an assembler.

> ... Ninja is intended to be used with a separate program generating its input files.

> ... Ninja is pretty easy to implement for the fun 20% of it and the remaining 80% is "just" some fiddly details.

There are many ninja generators out there already [1] but writing a simple, custom one shouldn't be too hard [2] and could make sense for some projects.

BTW, ninja is great but I wish the configuration file had used a more standard format, easier to parse and generate from any language. JSON would have been a better option I think, given the abundance of tooling around it.

--

1: https://github.com/ninja-build/ninja/wiki/List-of-generators...

2: https://ninja-build.org/manual.html#ref_ninja_file