Let gen_build support TM_NINJA

This is for when building from TextMate and PATH has not been setup to contain the directory containing ninja.
This commit is contained in:
Allan Odgaard
2012-09-28 16:33:13 +02:00
parent 9f2a4c74da
commit c77c6fc4e2

View File

@@ -579,7 +579,7 @@ def all_targets(buildfile, builddir)
return res unless File.exists? buildfile
Dir.chdir(File.dirname(buildfile)) do
targets = %x{ ninja -f #{[ buildfile ].shelljoin } -t targets all }
targets = %x{ ${TM_NINJA:-ninja} -f #{[ buildfile ].shelljoin } -t targets all }
targets.each do |line|
if line =~ /.*(?=:(?! phony))/
path = $&