summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortake_cheeze <[email protected]>2014-03-02 04:26:33 +0900
committertake_cheeze <[email protected]>2014-03-02 04:26:33 +0900
commit9968af45709da34d923569cd7b2329e11416c8b8 (patch)
tree0b9ae9451f56ad3cd6f8f898af52522622d54a88
parent873fae9f4505a5f2b5146f969917e8b083269f36 (diff)
downloadmruby-9968af45709da34d923569cd7b2329e11416c8b8.tar.gz
mruby-9968af45709da34d923569cd7b2329e11416c8b8.zip
allow command like "ccache gcc"
-rw-r--r--tasks/mruby_build_commands.rake10
1 files changed, 9 insertions, 1 deletions
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