diff options
Diffstat (limited to 'tasks/mruby_build_commands.rake')
| -rw-r--r-- | tasks/mruby_build_commands.rake | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake index 7b61b2dee..1d69fa54d 100644 --- a/tasks/mruby_build_commands.rake +++ b/tasks/mruby_build_commands.rake @@ -241,17 +241,16 @@ module MRuby def initialize(build) super @command = nil - @compile_options = "-B%{funcname} -o- -" + @compile_options = "-B%{funcname} -o-" end def run(out, infiles, funcname) @command ||= @build.mrbcfile - IO.popen("#{filename @command} #{@compile_options % {:funcname => funcname}}", 'r+') do |io| - [infiles].flatten.each do |f| - _pp "MRBC", f.relative_path, nil, :indent => 2 - io.write IO.read(f) - end - io.close_write + infiles = [infiles].flatten + infiles.each do |f| + _pp "MRBC", f.relative_path, nil, :indent => 2 + end + IO.popen("#{filename @command} #{@compile_options % {:funcname => funcname}} #{infiles.join(' ')}", 'r+') do |io| out.puts io.read end end |
