4 ms·
In the links to Ninja implementations at the bottom: > This tiny little implementation[0] in Python! 345 lines of well-commented Python. Cute as a button! It
by gary_0 3y ago
In the links to Ninja implementations at the bottom:
> This tiny little implementation[0] in Python!
345 lines of well-commented Python. Cute as a button! It doesn't seem to re-use already-built files, though.
I wonder how many lines that would add. I actually have a bit of Python in my build pipeline that basically just goes `if os.path.getmtime(src) > os.path.getmtime(target)` and it works fine for that one file (and took far less effort than trying to shoehorn that build step into my Makefile).
[0] https://github.com/gkbrk/scripts/blob/master/ninja.py https://github.com/gkbrk/scripts/blob/master/ninja.py
- tekknolagi 3y agoOh, that would be a nice addition. Maybe I will vendor this little script some day.
- tekknolagi 3y agoI put it all together here: https://github.com/tekknolagi/ninja-demo https://github.com/tekknolagi/ninja-demo