From 95fb1fd809780e71848c339f8e3e035d1ae015d6 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 14 May 2013 23:39:56 +0900 Subject: mrbc to take multiple files, preserving debug information if -g given; close #1243 --- tasks/mruby_build_commands.rake | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'tasks') 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 -- cgit v1.2.3