refactor ninja build generator