From 9968af45709da34d923569cd7b2329e11416c8b8 Mon Sep 17 00:00:00 2001 From: take_cheeze Date: Sun, 2 Mar 2014 04:26:33 +0900 Subject: allow command like "ccache gcc" --- tasks/mruby_build_commands.rake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tasks') diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake index b0965ea09..10cc215dc 100644 --- a/tasks/mruby_build_commands.rake +++ b/tasks/mruby_build_commands.rake @@ -24,9 +24,17 @@ module MRuby target end + NotFoundCommands = {} + private 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 -- cgit v1.2.3