diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-05-14 23:39:56 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-05-14 23:39:56 +0900 |
| commit | 95fb1fd809780e71848c339f8e3e035d1ae015d6 (patch) | |
| tree | 48d1f572b8c1cb25472bdb8c6b1a0c1d4ecc835f /tasks/mruby_build_commands.rake | |
| parent | 7cc66cf819beb5398d6fd40711373f9cfe79b77a (diff) | |
| download | mruby-95fb1fd809780e71848c339f8e3e035d1ae015d6.tar.gz mruby-95fb1fd809780e71848c339f8e3e035d1ae015d6.zip | |
mrbc to take multiple files, preserving debug information if -g given; close #1243
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 |
