diff options
| author | take_cheeze <[email protected]> | 2014-03-02 04:26:33 +0900 |
|---|---|---|
| committer | take_cheeze <[email protected]> | 2014-03-02 04:26:33 +0900 |
| commit | 9968af45709da34d923569cd7b2329e11416c8b8 (patch) | |
| tree | 0b9ae9451f56ad3cd6f8f898af52522622d54a88 /tasks | |
| parent | 873fae9f4505a5f2b5146f969917e8b083269f36 (diff) | |
| download | mruby-9968af45709da34d923569cd7b2329e11416c8b8.tar.gz mruby-9968af45709da34d923569cd7b2329e11416c8b8.zip | |
allow command like "ccache gcc"
Diffstat (limited to 'tasks')
| -rw-r--r-- | tasks/mruby_build_commands.rake | 10 |
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 |
