Ninja

From miki
Jump to navigation Jump to search

A simple alternative to Make

Reference

Example of use of Ninja

Example

From vector-of-bool:

# The name of the line sorting script
sort_lines_py = sort-lines.py

rule sort-lines
    command = python $sort_lines_py $in $out $sort
    description = Sorting lines in $in to $out

build sorted-names.txt: sort-lines names.txt | $sort_lines_py
    sort = asc

build sorted-ingredients.txt: sort-lines ingredients.txt | $sort_lines_py
    sort = desc