allow command like "ccache gcc"

This commit is contained in:
take_cheeze
2014-03-02 04:26:33 +09:00
parent 873fae9f45
commit 9968af4570
+9 -1
View File
@@ -24,9 +24,17 @@ module MRuby
target target
end end
NotFoundCommands = {}
private private
def _run(options, params={}) def _run(options, params={})
sh build.filename(command) + ' ' + ( options % params ) return sh command + ' ' + ( options % params ) if NotFoundCommands.key? @command
begin
sh build.filename(command) + ' ' + ( options % params )
rescue RuntimeError
NotFoundCommands[@command] = true
_run options, params
end
end end
end end